just-the-docs icon indicating copy to clipboard operation
just-the-docs copied to clipboard

Support for Easy custom nav / nav additions?

Open cycomachead opened this issue 3 years ago • 3 comments

Is your feature request related to a problem? Please describe. I would like a way to add navigation links to the nav bar, but maybe do it in my own way. :) See #238

Describe the solution you'd like I would like to be able to include nav_custom.html right before the closing </nav> tag.

Describe alternatives you've considered #238's approach of building this in works well, if it's just a list of additional links. However, I feel like I will eventually want to customize this, potentially styling them differently, and maybe adding additional text. So, a custom HTML file feels more flexible.

Additional context Right now, i've just duplicated nav.html since that seems like the best place, but it's a lot of include/copy in case of version skew.

cycomachead avatar Jan 24 '22 08:01 cycomachead

Not really a fix, but an alternative way to implement custom navigation links is by editing the _layouts/default.html. This doesn't get around the version skew problem, but could be preferable to your solution if you're already making edits to the default.html anyways.

kevinlin1 avatar Jan 27 '22 21:01 kevinlin1

I did the same thing. :) https://github.com/cs10/sp22/commit/1949977d09b111b326540c1b21650b15f10c0843

cycomachead avatar Jan 28 '22 01:01 cycomachead

Hi all, just circling back to more open issues. I think this is a reasonable suggestion - a PR to implement another custom _includes is welcome from my perspective. (for context: https://github.com/just-the-docs/just-the-docs/pull/238 is abandoned).

If you do submit a PR, happy to review and push forward. We've also been looking to better document custom additions/includes - documenting this would be great!

(other maintainers, feel free to chime in - in particular, I have no strong thoughts on naming)

Labelling this as needs-discussion so others can chime in.

mattxwang avatar Jun 28 '22 06:06 mattxwang

Going to close this as stale for now. Feel free to re-open, etc. if necessary!

mattxwang avatar Dec 21 '22 22:12 mattxwang