Disable activeHeaderLinks for VuePress. Remove bullet points in server config doc. #2449
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Small UI changes regarding anchor links.
Disable activeHeaderLinks for VuePress
Currently, when clicking header links in server configuration doc, such as
--allow-fork-prs
, the expected anchor link https://www.runatlantis.io/docs/server-configuration.html#allow-fork-prs won't persist, but will be changed to https://www.runatlantis.io/docs/server-configuration.html#flags.The reason is that we are enabling Active Header Links with a
sidebarDepth
to be1
by default. So once we jump to the#allow-fork-prs
tag, we are immediately redirected to the parent tag withinsidebarDepth
, in this case,#flags
.One way to fix this is to increase the
sidebarDepth
, however, doing so will make our sidebar a bit cluttered as shown below (which might be fine).Another way is to disable the
activeHeaderLinks
behavior, so that the browser won't try to update the URL to the parent tag. Unless many of our users are relying on the behavior to get an anchor link, I feel it's a better option. It's less disruptive to our website layout and could be more flexible since we can have an arbitrarily deep anchor link without it being redirected to its parent tag anymore.Remove bullet points in server config doc
If we click through the link https://www.runatlantis.io/docs/server-configuration.html#allow-fork-prs, the page won't jump to the exact section, but with a small offset.
It's because we indented the headers with bullet points
* ###
, which inadvertently makes VuePress drop some of the styles it could have added to the headers. We could keep the bullet point and add some custom styles like vuejs/vuepress#2771 (comment) suggested, but I think we might as well drop the bullet points so that the styles would be rendered correctly.Also when we hover over the header, the hashtag and bullet point will overlap, so yet another reason to drop them in my opinion.