pages creation and edition - adeo/mozaic-design-system GitHub Wiki

navigation and pages :

the styleguide will create navigation items following the directory structure, and the markdown file found in place. It will look into the src/pages directory.

For each directory found, it will search for an index.md that will be considered as the index related to the nav item. each md file encoutered in the directory will be available as diferent tabs in the page.

eg, for the folowing directory tree in src page:

- atoms (dir)
    - index.md
    - usage.md
    - button (dir)
        - index.md
- intro (dir)
    - index.md
    - tab1.md
    - tab2.md
    - other dir (dir)
        - index.md

the navigation will be :

- atoms (with a usage tab)
    - button
- intro (with tab1 and tab2 tabs)
    - other dir

create content :

You can create content using commun markdown + some nice features :

manage navigation titles, page titles and menu order

by adding the folowing at the top of the index.md markdown file, you indicate the menu item title as well as the order you want them to display in the main menu.

folowing the previous directory tree exemple, adding this to the src/pages/atoms/index.md :

---
title: 'Atoms title'
order: 2
---

will allow you to modify the navigation like this :

- atoms title (with a usage tab)
    - button
- intro (with tab1 and tab2 tabs)
    - other dir

the same is true for tabs into a page, adding an order and a title into the tabs markdonw files will change tabs order and title.