basecamp / kamal-site

kamal-deploy.org
https://kamal-deploy.org
41 stars 46 forks source link

Add in automatic anchor headings for documentation #30

Closed nickhammond closed 2 months ago

nickhammond commented 9 months ago

With most of the documentation moving from Github to the kamal-deploy.org website with the MRSK migration, we lost the ability to easily link to documentation sections via anchor tags. I was thinking there might be a plugin or something simple to add to Jekyll to auto-link the headings again and I found https://github.com/allejo/jekyll-anchor-headings, this is a PR to add that in.

It changes the docs headers to have an anchor tag link at the end of it and links to the heading, for example:

http://localhost:4002/docs/configuration#using-rolling-deployments

image
nickhammond commented 8 months ago

We're often linking people to the docs on Discord but we just have to dump them onto the full configuration page. For instance, someone is asking about how to customize a healthcheck. It'd be great to just link them to the "Using a custom healthcheck" heading by clicking it and copying that link. We lost a lot of the README benefits from when it was mrsk on github, hoping we can use something like this to bring that feature back.

image
acidtib commented 8 months ago

This feature would be incredibly valuable in our efforts to assist individuals. @djmb, could you please guide us on how to advance this pull request? Our Discord server frequently receives inquiries from new users, and having the ability to direct them to relevant information would greatly enhance their learning experience.

djmb commented 4 months ago

@nickhammond, @acidtib - sorry for the delay here. We'll have a think about this and get this sorted out soon.

nickhammond commented 4 months ago

I've been grabbing the ID from the source and appending that to the URL for now which works without this PR since that's a standard browser feature.

Or maybe the answer is adding a few more subnavigation links to the sidebar? It's really just the configuration section that needs the help, maybe the commands section.

nickhammond commented 2 months ago

Yay, there's a more built-out sidebar nav to handle this, closing.