Releases: thecodrr/docgen
v0.3.3
v0.3.2
v0.3.1
What's new
index
property has been removed from document frontmatter. It is recommended that you now usenavigation
property indocgen.yaml
to organize your navigation- Writing the navigation structure by hand is tedious. That is why this release introduces a new command:
docgen nav
that generates the navigation from your directory structure automatically. - Docgen will now automatically reload the site when you change
docgen.yaml
file.
v0.3.0
More modern looking UI
Sticky sidebars
Edit this page link
It is now possible to enable Edit this page
links on every page. To enable this, open docgen.yaml
:
edit_root: https://github.com/thecodrr/docgen/blob/master/
edit_root
is the root URL path to your documentation site. You can use any Git/non-Git URL for this.
Animated nested navigation tree
Sitemap generation
A very basic feature but essential for SEO. The sitemap automatically uses the last_modified
time from your markdown files for the <mod>
tag.
v0.2.2
This release fixes a few minor issues:
- Make both sidebars sticky using CSS
- Multiline navigation links are better differentiated
- Fix argins of lists inside the document
- Simplify styling of callouts & fix their vertical margins
v0.2.1
This release fixes a few things:
- Add horizontal padding inside tab panels
- Remove top margins on headings
- Remove top padding in child navigation trees
- Top-level navigation links are no longer bold
- Fix issue where top-level navigation links could not be sorted via the
index
property
v0.2.0
Performance
Compared to v0.1, performance has been improved by a lot:
v0.1
Benchmark 1: ./target/release/docgen build --release
Time (mean ± σ): 65.9 ms ± 7.0 ms [User: 47.9 ms, System: 26.0 ms]
Range (min … max): 53.5 ms … 79.4 ms 22 runs
v0.2
Benchmark 1: ./target/release/docgen build --release
Time (mean ± σ): 43.8 ms ± 3.7 ms [User: 41.7 ms, System: 15.1 ms]
Range (min … max): 38.5 ms … 52.0 ms 33 runs
That is a 33% improvement.
docgen.yaml
Subtitle
Instead of having a fixed "DOCS" subtitle under your site logo & title, you can now change it:
subtitle: HELP
Footer
It is now possible to add custom links in the footer. This change added new optional properties in docgen.yaml
file:
footer:
groups:
- title: Docs
links:
- title: Link 1
href: https://example.org/
- title: Link 2
href: https://example.org/
- title: Community
links:
- title: Link 3
href: https://example.org/
# marking a link as external will add target=_blank to it
external: true
- title: More
links:
- title: Link 4
href: https://example.org/
- title: Link 5
href: https://example.org/
copyright: Copyright © 2023 Docgen
Colors
colors
property has been removed. Changing colors can now be done via themes.
Themes
Docgen now has full support for theming. To override light & dark themes, just add dark.css
or light.css
files in the _include
directory. Docgen will eventually support VSCode themes.
New syntax for callouts
Instead of:
{% info Title %}
Body
{% end %}
Callouts can now be added as:
> info Title
>
> Body
Reasons for change:
- No new syntax to learn (it's just a quote block)
- Can be rendered by any Markdown renderer
- Simpler
Custom sorting for navigation
Previously the only way to sort navigation entries in the sidebar was through the navigation
property in docgen.yaml
. This was truly cumbersome especially in nested hierarchies. This release adds a new frontmatter property to each document called index
. This is a zero based sort index you can use to order your navigation links easily.
v0.1.0
Why Docgen?
This is the first release after forking off of Doctave which seems to have stagnated. Even though the original author plans to move it to a separate personal repo, it seems it is on low priority. Seeing how it has stagnated, I have decided to continue this amazing project under a different name: Docgen. So "Why not just push the changes upstream?"_ Because I am taking a different approach to this project. I want this to be simple yet feature-full. Here are some infrastructural changes I have made:
- Moved the markdown library inside the main project so it's just one repo. This allows for faster development of new features.
- Markdown tests are now snapshot based thanks to insta.rs. This means I don't have to think about the results, just the input.
- Do not introduce new syntax into markdown. This hasn't been completed yet. I intend to change the callouts syntax to use quotes or something else. This is absolutely necessary to allow non-docgen editors to view & edit the markdown files without all the garbage.
With that being said, let's move on to what new features I have added.
⭐ New stuff
- Symlink paths are now supported. This was a trivial change but HUGE — for example, the docs for
docgen
now share the mainREADME.md
file. - Tabs are now here. (this was the only limitation & also the reason I forked docgen). The best thing is tabs don't introduce yet another new syntax. The parser implicitly understands when you use
# [Tab title](#/tab/tab-id)
that you want tabs. Everything else is the same.
🐛 Fixes & improvements
- Dark/light theme are now more consistent looking thanks to CSS variables.