diff --git a/CHANGELOG.md b/CHANGELOG.md index e0f1edd2..351f0417 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and [Pydantic's HISTORY.md](https://github.com/pydantic/pydantic/blob/main/HISTORY.md), and this project *mostly* adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [UNRELEASED] + +### Added + +* Allow adding custom links to the web book navbar ([docs](https://hexdoc.hexxy.media/docs/guides/template)). + ## `1!0.1.0a18` ### Fixed diff --git a/noxfile.py b/noxfile.py index ea897acc..0b2d3642 100644 --- a/noxfile.py +++ b/noxfile.py @@ -507,6 +507,18 @@ def dummy_setup(session: nox.Session): mod_name = "Dummy" author = "author" show_landing_text = true + + [template.args.navbar] + left = [ + { text="Left", href="https://google.ca" }, + ] + center = [ + { text="Center 1", href="https://google.ca", external=false }, + { text="Center 2", href="https://google.ca", external=false, icon="box-arrow-down-right" }, + ] + right = [ + { text="Right", href="https://google.ca", icon="box-arrow-up-left" }, + ] """ ), "nodemon.json": { diff --git a/src/hexdoc/_templates/components/navbar.html.jinja b/src/hexdoc/_templates/components/navbar.html.jinja index f29e0e3e..2ff8a91d 100644 --- a/src/hexdoc/_templates/components/navbar.html.jinja +++ b/src/hexdoc/_templates/components/navbar.html.jinja @@ -1,6 +1,7 @@ +{% import "macros/formatting.html.jinja" as fmt with context -%} +