diff --git a/docs/README.md b/docs/README.md index 47ecfcfb083e..5e5fee07e08d 100644 --- a/docs/README.md +++ b/docs/README.md @@ -148,48 +148,7 @@ In order to add a new Card button in the respective hub page ([send-money/index. Then replace the article title accordingly (in this case replace the value `SmartScan` with the new article title) and add a link to the relative path of the article (in this case replace `./request-money/SmartScan` accordingly to the path of the new article file without the file extension). ## Add a new entry in the LHN page - -There are 2 main components in the LHN page associated with the hub you're adding an article to: - 1. Stage title anchor: which navigates the Stage title in the hub page and contains an unordered list of Article links. - 2. Article links: which navigate to the corresponding article page. - -```html - -
  • Request Money - - -
  • - - -``` - -### Add a new Stage title anchor (optional) - -Just add copy and paste the following HTML block in the corresponding navigation tree file (either for [Request Money](https://github.com/Expensify/App/blob/main/docs/_includes/request-money-lhn.html) or [Send Money](https://github.com/Expensify/App/blob/main/docs/_includes/send-money-lhn.html)): - -``` -
  • Request Money - -
  • -``` - -Where `"#request-money"` is the ID of Stage title in the hub page (the same as in the example of the `Add a Stage title (optional)` section). - -### Add a new Article link - -Add the next HTML block inside of the corresponding Stage title anchor: - -``` - -``` - -Where `./request-money/SmartScan` will be the relative path of the file name (exactly the same as in the `Add a Card button` example above). +To add a new entry to the LHN, simply update the _data/hubs.yml file with the new entry. Note that LHN "hubs" contain 1 or more stages, and stages can be either 1 article or multiple articles. # How the site is deployed This site is hosted on GitHub Pages. GitHub Pages has a built-in Jekyll integration, and we have it configured such that whenever code is merged to main, GitHub will automatically build the Jekyll site housed in the `/docs` directory and deploy it straight to production. The help site is publicly discoverable at https://help.expensify.com/ diff --git a/docs/_data/hubs.yml b/docs/_data/hubs.yml new file mode 100644 index 000000000000..ab2ed00d4093 --- /dev/null +++ b/docs/_data/hubs.yml @@ -0,0 +1,15 @@ +- href: send-money + title: Send money + stages: + - href: workspaces + title: Workspaces + articles: + - href: The-Free-Plan + title: The Free Plan +- href: request-money + title: Request money +- href: other + title: Other + stages: + - href: Account-Management + title: Account Management diff --git a/docs/_includes/home-lhn.html b/docs/_includes/home-lhn.html deleted file mode 100644 index 605201e5c454..000000000000 --- a/docs/_includes/home-lhn.html +++ /dev/null @@ -1,23 +0,0 @@ - diff --git a/docs/_includes/lhn-template.html b/docs/_includes/lhn-template.html new file mode 100644 index 000000000000..1eb41341fad0 --- /dev/null +++ b/docs/_includes/lhn-template.html @@ -0,0 +1,48 @@ + diff --git a/docs/_includes/other-lhn.html b/docs/_includes/other-lhn.html deleted file mode 100644 index 1ea35d96e3bf..000000000000 --- a/docs/_includes/other-lhn.html +++ /dev/null @@ -1,34 +0,0 @@ - diff --git a/docs/_includes/request-money-lhn.html b/docs/_includes/request-money-lhn.html deleted file mode 100644 index a608a785095b..000000000000 --- a/docs/_includes/request-money-lhn.html +++ /dev/null @@ -1,31 +0,0 @@ - diff --git a/docs/_includes/send-money-lhn.html b/docs/_includes/send-money-lhn.html deleted file mode 100644 index 5357a6d215f5..000000000000 --- a/docs/_includes/send-money-lhn.html +++ /dev/null @@ -1,40 +0,0 @@ - diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html index 4cc233aa70c9..488cdc9dabab 100644 --- a/docs/_layouts/default.html +++ b/docs/_layouts/default.html @@ -1,6 +1,5 @@ - Expensify Help @@ -16,82 +15,77 @@ {% seo %} - {% if page.lhn_content == 'coming_soon' %} {{ content }} {% else %} +
    -
    +
    +
    + + +
    + +
    -
    -
    - - + +
    + {% case page.lhn_content %} + {% when "homepage" %} + {% include lhn-template.html activeHub="home" %} + {% when "request-money" %} + {% include lhn-template.html activeHub="request-money" %} + {% when "send-money" %} + {% include lhn-template.html activeHub="send-money" %} + {% when "other" %} + {% include lhn-template.html activeHub="other" %} + {% else %} + + {% if page.lhn_content == nil %} + In this article +
    + {% endif %} + {% endcase %}
    - -
    - -
    - {% case page.lhn_content %} - {% when "homepage" %} - {% include home-lhn.html %} - {% when "request-money" %} - {% include request-money-lhn.html %} - {% when "send-money" %} - {% include send-money-lhn.html %} - {% when "other" %} - {% include other-lhn.html %} - {% else %} - - {% if page.lhn_content == nil %} - In this article -
    - {% endif %} - {% endcase %} + + {% include floating-concierge-button.html id="floating-concierge-button-lhn" %}
    +
    - - {% include floating-concierge-button.html id="floating-concierge-button-lhn" %} -
    - -
    - - - {% if page.lhn_content == nil %} -

    - {{ page.name | remove: '.md' | split: "-" | join: " " }} -

    + + {% if page.lhn_content == nil %} +

    + {{ page.name | remove: '.md' | split: "-" | join: " " }} +

    -
    - {{ content }} -
    - {% else %} -
    - {{ content }} -
    - {% endif %} +
    + {{ content }} +
    + {% else %} +
    + {{ content }} +
    + {% endif %} - - -
    -

    Didn't find what you were looking for?

    -

    Concierge is here to answer all your questions.

    -
    -
    - -
    -
    -
    + + +
    +

    Didn't find what you were looking for?

    +

    Concierge is here to answer all your questions.

    +
    +
    + +
    +
    +
    {% endif %} - -