Skip to content

Use relative paths for generated docsify links#32

Merged
ltvolks merged 1 commit intomainfrom
ltvolks/docs-relative-paths
May 31, 2023
Merged

Use relative paths for generated docsify links#32
ltvolks merged 1 commit intomainfrom
ltvolks/docs-relative-paths

Conversation

@ltvolks
Copy link
Contributor

@ltvolks ltvolks commented May 31, 2023

Relative paths in markdown do not work w/ the default docsify settings.

e.g. currently published docs (via #31) @ https://rss-engineering.github.io/terraform/#/modules/security_hub have a relative link to another doc in the same folder:

This should be provisioned together with the [guardduty](./guardduty.md) product.

When rendered by docsify, it results in a non-existent destination:

- /#/./guardduty

Setting relativePath: true will correctly render the link and preserve the ability to navigate *.md docs in the Github UI:

- /#/./guardduty
+/#/modules/guardduty

See https://docsify.js.org/#/configuration?id=relativepath

Copy link
Contributor

@explorigin explorigin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should not break existing relative links (those without ./ prefix) either so I don't see any harm.

@ltvolks ltvolks merged commit cf68812 into main May 31, 2023
@ltvolks ltvolks deleted the ltvolks/docs-relative-paths branch May 31, 2023 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants