Doctave / doctave

A batteries-included developer documentation site generator
https://cli.doctave.com
MIT License
549 stars 33 forks source link

Using README.md files results in confusing sidebar #32

Open jschaf opened 2 years ago

jschaf commented 2 years ago

Hi Niklas,

I reached out a few months ago. I have some time so giving doctave a go.

Our repo is structured so that docs live next to the code, e.g.:

app/
  - README.md
  - index.tsx
  - components/
      - README.md
      - NavBar.tsx

It seems that doctave uses the file name "README" when populating the navbar. Is docs in README a use-case for doctave? If so, it might be helpful to use either the title of the README or use the directory name instead of "README"

image

begleynk commented 2 years ago

Hi Joe! Glad to hear you're giving Doctave a spin.

Doctave treats the README.md file as the "index.html" of that folder. So a file under <your docs folder>/frontend/README.md can be accessed at /frontend in the browser.

As for the navigation, you can customize the title of the page by adding a frontmatter section to the top the file:

---
title: Title of the page
---

# Content goes here

That will change how it shows up in the navigation.

I guess an optimization we could add would be to use the name of the parent folder instead of just "README" as the title in order to save some typing.

Does that work for you?

CleanCodeDeveloper commented 2 years ago

I guess an optimization we could add would be to use the name of the parent folder instead of just "README" as the title in order to save some typing.

this would fit my use case as well. Would solve #42.