humanmade / altis-documentation

Documentation module for Altis
https://docs.altis-dxp.com/
6 stars 3 forks source link

Issue 118 sidebar nav not showing links #433

Open mikelittle opened 2 years ago

mikelittle commented 2 years ago

I think the fix to this is to rename the root README.md file to be something other than that name. I also spotted that empty title attribute in the front matter is rendered as 'null'.

roborourke commented 2 years ago

Ah, tests may need updating if this changes how the admin area docs render.

mikelittle commented 2 years ago

That would do it! I'll double check on renaming the README.md files for the docs site. Guessing things are ok still when it renders in the WP admin?

Yes. It still renders fine in the dashboard.

mikelittle commented 2 years ago

That would do it! I'll double check on renaming the README.md files for the docs site. Guessing things are ok still when it renders in the WP admin?

Yes. It still renders fine in the dashboard.

Actually, it didn't render properly in the dashboard, That's what the Travis error was.

roborourke commented 2 years ago

Ah, I suspected that would be the case. I think this may need some custom handling on the docs site generation, perhaps with a special YAML frontmatter flag to mark something as top level. We have a special exceptions here to add the guides and welcome section for the dev docs: https://github.com/humanmade/altis-dev-docs-site/blob/main/src/config.docs.js#L4-L8

Maybe we can take a similar approach and change the config to achieve what we want e.g.

const REPOS = [
    {
        name: 'humanmade/altis-documentation',
        docsPath: 'user-docs',
        // mainBranch: 'master', // optional.
    },
    {
        name: 'humanmade/altis-documentation',
        docsPath: 'user-docs/administration',
        urlPrefix: '/administration'
    },
    //... etc...
];