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
savornicesei opened this issue Jun 3, 2021 · 1 comment
Open

Folder API has no effect #14

savornicesei opened this issue Jun 3, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@savornicesei
Copy link
Contributor

Issue by aateeque
Thursday May 28, 2020 at 14:11 GMT
Originally opened as Wyamio/Wyam#14


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.

@savornicesei
Copy link
Contributor Author

Comment by daveaglick
Friday May 29, 2020 at 19:57 GMT


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.

@savornicesei savornicesei added the enhancement New feature or request label Jun 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant