-
-
Notifications
You must be signed in to change notification settings - Fork 86
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
Issue: Can't preview index.md of hugo reaf bundle with "previewPath": "/{{pathToken.relPath}}" #603
Comments
Thanks, @n-arakawa, for opening this issue. The issue here was the In case when you use this placeholder, an extra check is required for page bundles. |
Update coming up and you will be able to test it out in the new beta. |
Hi Elio, // frontmatter.json
{
"$schema": "https://frontmatter.codes/frontmatter.schema.json",
"frontMatter.framework.id": "astro",
"frontMatter.preview.host": "http://localhost:4321",
"frontMatter.content.publicFolder": {
"path": "src/assets",
"relative": true
},
"frontMatter.content.pageFolders": [{
"title": "Docs",
"path": "[[workspace]]/src/content/docs/",
"previewPath": "{{pathToken.relPath}}"
}
]
} $ tree content
src
└── content
└── docs
└── index.md // http://localhost:4321/docs -> expected http://localhost:4321/
└── test.md // http://localhost:4321/test
└── nested
└── index.md // http://localhost:4321/nested // This works If I can help out with some additional context, feel free to ask. |
Describe the bug
Previewing of hugo bundle(index.md) fails with 404.
Generated url is wrong when setting "previewPath" to "/{{pathToken.relPath}}"
To Reproduce
frontmatter.json
contents
previewing
content/post/bundle/index.md
leads to wrong url:http://localhost:1313/post/bundle/bundle
Expected behavior
expected url:
http://localhost:1313/post/bundle
Desktop (please complete the following information):
Additional context
The
vscode-front-matter/src/commands/Preview.ts
seems try to handeleindex
as a special case,Howevere,
slug = Article.getSlug();
at line number 100 setsslag
to dir name(bundle
in above example)The text was updated successfully, but these errors were encountered: