-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade mkdocs and fix relative links in markdown #2783
base: main
Are you sure you want to change the base?
Conversation
This is partly because if we upgrade enough mkdocs-related things it'll make some dependency security warnings go away The changes here are mostly because mkdocs 1.5 does more aggressive checking for bad links and we previously had links in markdown that didn't work I'm not sure if/how those links worked in the html docs, but I guess I can get that after marking a PR
@@ -76,7 +76,7 @@ function compileExamples() { | |||
throw new Error(`${exampleFooterLink} is not a valid path`); | |||
} | |||
exampleFooterLink = `${SdkReferenceLink}${exampleFooterLink}`; | |||
learnMoreLink = example.linkData.url; | |||
learnMoreLink = example.linkData.url! + (example.linkData.url?.endsWith('/') ? 'index.md' : '.md'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is hacky, but I'm using a trailing slash to indicate links should go to /index.md
vs no trailing slash to mean /foo
means /foo.md
@@ -12,7 +12,7 @@ | |||
"url": "/guides/blocks/column-formats" | |||
}, | |||
"exampleFooterLink": "https://coda.io/packs/build/latest/guides/blocks/column-formats", | |||
"learnMoreLink": "/guides/blocks/column-formats", | |||
"learnMoreLink": "/guides/blocks/column-formats.md", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it will work to have the .md
links in this file, since it's used to power the Help side panel in the Pack Studio.
Instead of changing documentation_compiler.ts
to add the extension, instead add it in documentation/example_page_template.md
which only affects the generated markdown used by mkdocs.
This pull request has been inactive for 7 days: labeled as stale. To avoid auto-closure in 7 days, please do one of the following: Add |
This is partly because if we upgrade enough mkdocs-related things it'll make some dependency-related security warnings go away
The changes here are mostly because mkdocs 1.5 does more aggressive checking for bad links and we previously had links in markdown that didn't work
It seems like the links are still working in the HTML docs as well