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

How to hyperlink to another page #462

Open
ak4zh opened this issue Jul 13, 2022 · 2 comments
Open

How to hyperlink to another page #462

ak4zh opened this issue Jul 13, 2022 · 2 comments
Milestone

Comments

@ak4zh
Copy link

ak4zh commented Jul 13, 2022

I am trying to create hyperlink to another post but it crashes on build. I have this structure:

blog
    /first-post
        /index.md
    /second-post.md

I have tried:
[Second post](./second-post)
[Second post](../second-post)

@pngwn
Copy link
Owner

pngwn commented Jul 13, 2022

This should work, do you have a reproduction? What is the specific error message you are receiving?

@ak4zh
Copy link
Author

ak4zh commented Jul 13, 2022

introducing-bummer.md has a hyperlink to lets-talk-about-failures.md in similar way as described in the above example.
It seems the error happens during pre-rendering
Both method results in same error when I run npm run build, with npm run dev it works fine.

The build works when I specifically hardcode the url as /blog/lets-talk-about-failures.

Prerendering
--
11:53:53.334 | (node:350) ExperimentalWarning: buffer.Blob is an experimental feature. This feature could change at any time
11:53:53.334 | (Use `node --trace-warnings ...` to show where the warning was created)
11:53:53.335 | 200 /
11:53:53.335 | 200 /__data.json
11:53:53.345 | 200 /projects
11:53:53.353 | 200 /sitemap.xml
11:53:53.360 | 200 /rss.xml
11:53:53.374 | 200 /blog
11:53:53.375 | 200 /blog/__data.json
11:53:53.393 | 200 /blog/indroducing-bummer
11:53:53.393 | 200 /blog/indroducing-bummer/__data.json
11:53:53.404 | [vite-plugin-svelte-kit] 404 /lets-talk-about-failures (linked from /)
11:53:53.406 | > 404 /lets-talk-about-failures (linked from /)
11:53:53.406 | at file:///vercel/path0/node_modules/.pnpm/@sveltejs+kit@1.0.0-next.357_svelte@3.45.0/node_modules/@sveltejs/kit/dist/vite.js:1034:11
11:53:53.406 | at save (file:///vercel/path0/node_modules/.pnpm/@sveltejs+kit@1.0.0-next.357_svelte@3.45.0/node_modules/@sveltejs/kit/dist/vite.js:1253:4)
11:53:53.406 | at visit (file:///vercel/path0/node_modules/.pnpm/@sveltejs+kit@1.0.0-next.357_svelte@3.45.0/node_modules/@sveltejs/kit/dist/vite.js:1144:3)

@pngwn pngwn added this to the 1.0 milestone Feb 23, 2024
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

No branches or pull requests

2 participants