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

cannot click to blog page #4381

Closed
1 task
npmrun opened this issue Aug 18, 2022 · 1 comment
Closed
1 task

cannot click to blog page #4381

npmrun opened this issue Aug 18, 2022 · 1 comment

Comments

@npmrun
Copy link

npmrun commented Aug 18, 2022

What version of astro are you using?

1.0.6

Are you using an SSR adapter? If so, which one?

None

What package manager are you using?

npm

What operating system are you using?

Linux

Describe the Bug

cannot click to blog page
image

Link to Minimal Reproducible Example

https://stackblitz.com/edit/withastro-astro-nqgqjz

Participation

  • I am willing to submit a pull request for this issue.
@delucis
Copy link
Member

delucis commented Aug 18, 2022

Hi @npmrun — this is because you have moved the blog posts (first-post.md, second-post.md etc.) out of the src/pages/blog/ directory and into src/content/. To make a Markdown or MDX file a page on your site, the files must be inside src/pages/.

This is also why the links are missing in the list of posts because although you updated the Astro.glob in src/pages/blog.astro to use the new content location, in the template post.url will not be defined because files outside of src/pages/ do not have a url property.

I’ll close this as it is not a bug with Astro, but if you run into any other issues, you can join our Discord chat where the community will be happy to help! https://astro.build/chat

@delucis delucis closed this as not planned Won't fix, can't repro, duplicate, stale Aug 18, 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

No branches or pull requests

2 participants