Support custom `$nav$` rendering using templates
- Dominant language
- Haskell
- Stars
- 407
- Forks
- 38
- PR merge metrics
- No merged PRs in 30d
Description
`$nav$` currently generates hard-coded HTML (see https://github.com/jgm/yst/blob/e3838d318318012d9237c9a34e792d1a630805d5/Yst/Render.hs#L77). It would be great if users could specify a template for it instead.
If you're interested I can work on this and file a PR.
## Possible solution
Custom nav templates could be specified by setting an optional setting in the config.
#### config.yaml
```
navigation: navmenu.st
```
If it isn't set `$nav$` in a layout template could fallback to a default template which renders the same HTML yst does now. The default would be something like this:
#### navmenu.st
```
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in Yst/Render.hs at the $nav$ rendering code linked in the issue, then inspect how config.yaml settings and templates are loaded. Implement the optional navigation setting and preserve the existing HTML through a default template when it is absent. Done means custom navmenu.st rendering works and the fallback matches current output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- web-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100