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

Folder API has no effect #14

Open
aateeque opened this issue May 28, 2020 · 1 comment
Open

Folder API has no effect #14

aateeque opened this issue May 28, 2020 · 1 comment

Comments

@aateeque
Copy link

aateeque commented May 28, 2020

I have a folder structure as follows:

|-
|--/src
|--|--/API
|--|--/blog
|--|--/products
|--|--/docs

No matter what a put inside that API folder (index.html, docs.md, etc) it doesn't appear in the nav bar in the Docs theme:

image

But if I change the name of that folder from API to anything else it works. It seems like a bug, a user shouldn't have to cater for specially named folders out of the box. But I guess I am doing something wrong, however haven't been able to figure out what.

@daveaglick
Copy link
Member

The API folder is special because that's where the results of code analysis go by default so the theme doesn't check for other pages there. While maybe not a bug exactly, I totally agree the reliance on specific folder names isn't great (more on that below).

You can override the default navigation behavior by creating a _Navbar.cshtml file in your "input" folder. For reference, here's the default one: https://github.com/Wyamio/Wyam/blob/develop/themes/Docs/Samson/_Navbar.cshtml. Whatever you put in that file will override the default - so you can copy and paste the current one and then customize it to your needs.

Back to this being a bug/undesired behavior - it likely won't get fixed in Wyam. That's because Statiq is essentially a successor to Wyam (think of it as Wyam v3 + a rebrand). I'm not really doing much more in this codebase. Statiq uses a different folder-agnostic technique for finding files for the themes, so this hopefully won't be a problem there. That said, the docs portion of Statiq isn't ready to go yet so the solution above will hopefully work for you until it is.

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

2 participants