Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Page bundles / nested navigation #871

Closed
theletterf opened this issue Jul 25, 2018 · 7 comments
Closed

Page bundles / nested navigation #871

theletterf opened this issue Jul 25, 2018 · 7 comments

Comments

@theletterf
Copy link
Contributor

theletterf commented Jul 25, 2018

🚀 Feature

I'd like Docusaurus to feature something like Hugo's page bundles:

https://gohugo.io/content-management/page-bundles/

As far as I can tell, Docusaurus only allows for a single level of documentation: all docs are in the same folder and there's no depth beyond that level. This prevents from creating complex documentation. For instance, in Docusaurus I cannot have something like...

- Index.md
  - /assets
  - /section
     - index.md
     - another page
     - /assets
     -/subsection
             - index.md
             - /assets

Have you read the Contributing Guidelines on issues?

Yes.

Motivation

Docusaurus cannot scale beyond very simple documentation projects if it doesn't support this sort of nesting.

Pitch

I'd like to be able to have a folder structure within /docs and have the build process go through it recursively, and build an overall ToC out of it.

@endiliey
Copy link
Contributor

@theletterf

As far as I can tell, Docusaurus only allows for a single level of documentation: all docs are in the same folder and there's no depth beyond that level.

This is not true. You can actually nest your doc as deep as you like.
Example:
https://github.com/olistic/warriorjs/tree/master/docs

@theletterf
Copy link
Contributor Author

theletterf commented Jul 25, 2018

Ha! Then it is possible after all. Going to look into that. I couldn't find any reference on that in the docs...

Edit: Still, I see that having no actual effect on the navigation.

@endiliey
Copy link
Contributor

endiliey commented Jul 25, 2018

You have to set the navigation on your own. (e.g: headerlinks). If you need high level TOC document, you can build your own markdown docs as a high level TOC doc. Else, high level TOC in sidebar might be possible as well (see #868)

Either way, I think the main point is that you can nest your docs so I'm closing this.

Edit: feel free to ping us on Discord for any question/help 😊

@theletterf
Copy link
Contributor Author

Thanks!

@JoelMarcey
Copy link
Contributor

@theletterf I thought we had the nested docs information on docusaurus.io, but maybe we didn't add it.

Would you like to submit a PR to add the information? Probably either in https://docusaurus.io/docs/en/site-creation or https://docusaurus.io/docs/en/site-preparation?

@theletterf
Copy link
Contributor Author

theletterf commented Jul 25, 2018

Sure.

Edit: Maybe once #868 is up?

@areohbe
Copy link

areohbe commented Oct 10, 2018

Nesting works fine for *.md files, but I am unable to link to any static assets in a bundled directory.

I've tried in a assets subdirectory docs/foo/assets/bar-example.png and in the root directory docs/foo/bar-example.png.

Is this supported?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants