Skip to content

Fix for #1691 #1699

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

Merged
merged 3 commits into from
May 7, 2022
Merged

Fix for #1691 #1699

merged 3 commits into from
May 7, 2022

Conversation

BilleLind
Copy link
Contributor

@BilleLind BilleLind commented May 4, 2022

Description of Problem

404 errors on the links in /tutorials/#step-15

  • Quick Start
  • Main Guide
  • Examples

Proposed Solution

Changing the links from markdown based links []() to <a href=""> like in the previous steps

Additional Information

Tough unrelated, it is my first time committing to an open source.

According to previous steps an <a href=""> where used where as in step vuejs#15 used markdown based links [Examples](/examples) which somehow caused 404.
@netlify
Copy link

netlify bot commented May 4, 2022

Deploy Preview for vuejs ready!

Name Link
🔨 Latest commit 89752c7
🔍 Latest deploy log https://app.netlify.com/sites/vuejs/deploys/62741fc4bd11b90008d2b526
😎 Deploy Preview https://deploy-preview-1699--vuejs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link
Contributor

@skirtles-code skirtles-code left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!

Could you remove the spaces between the tags and their content? It's pushing the linked text away from the adjacent punctuation (see https://deploy-preview-1699--vuejs.netlify.app/tutorial/#step-15).

I'm unclear what's causing the broken links. Do you have any insight into that? Your fix is consistent with some of the other steps, I just don't understand why it's happening in the first place.

@BilleLind
Copy link
Contributor Author

I would wager it is due to createMarkdownRenderer from vitepress, since i dont understand most of the code, i think it is because of a missing base string =>

in https://github.com/vuejs/docs/blob/main/src/tutorial/tutorial.data.ts
it utilizes "createMarkdownRenderer" from vitepress,

which accepts 3 params: srcDir, options and base
https://github.com/vuejs/vitepress/blob/main/src/node/markdown/markdown.ts

@BilleLind
Copy link
Contributor Author

BilleLind commented May 4, 2022

By changing the const md in /tutorial/tutorial.data.ts (added , '/' )

const md = createMarkdownRenderer(process.cwd(), { // @ts-ignore highlight: await createHighlighter() }, '/')
it makes it possible to utilize [example](/examples/), though with a flash of 404 before going to the correct page, which I am uncertain if it is caused by it being run locally.

Should I commit it along with the current pull request?

@yyx990803
Copy link
Member

I think simply adding the missing base to createMarkdownRenderer is good enough. I'm not seeing flash of 404 when testing locally.

@BilleLind
Copy link
Contributor Author

BilleLind commented May 5, 2022

Pushed the fix for createMarkdownRenderer which made it possible to use markdown links again.
Therefore i reverted the prior changes made in step 15, so it utilizes markdown links again.

@yyx990803 yyx990803 merged commit 3df42ca into vuejs:main May 7, 2022
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