Skip to content
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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dweitzman-codaio
Copy link
Contributor

@dweitzman-codaio dweitzman-codaio commented Oct 17, 2023

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

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
@dweitzman-codaio dweitzman-codaio changed the title Attempting to upgrade mkdocs Upgrade mkdocs and fix relative links in markdown Oct 18, 2023
@@ -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');
Copy link
Contributor Author

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",
Copy link
Contributor

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.

@github-actions
Copy link

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 keep-active label, comment on PR, push new commit on PR.

@github-actions github-actions bot added the stale label Oct 25, 2023
@dweitzman-codaio dweitzman-codaio added keep-active Prevent auto-closing as stale and removed stale labels Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
keep-active Prevent auto-closing as stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants