-
Notifications
You must be signed in to change notification settings - Fork 29
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
Blog recipe posts in root URL #2
Comments
It’s definitely possible, a couple different approaches come to mind. One way would be to override the output path at the end of the pipeline before the file gets written. Take a look at https://github.com/Wyamio/Wyam/issues/612#issuecomment-363944693 and the follow-up comments. I think that code is still valid but I’ve been so heads down in Statiq recently (the successor to Wyam) that I might be confusing parts of the two. Let me know if you run into any trouble adapting that code. If that doesn’t work or seems to confusing/heavyweight let me know and I’ll brainstorm some alternatives. One of the things I love about how Wyam worked out is that it’s so flexible - the downside is that’s it’s not always immediately obvious the best way to customize something since there are so many possibilities :) |
Thanks! It has helped.
Now I have the following environment:
So the main problem is solved. But it would be nice to change the archive URL to |
FYI - the original Wyam project is being moved to statiqdev to continue work there as Statiq Web (the successor to Wyam and the Wyam blog recipe). Since this issue relates specifically to Wyam, I've transfered it to a new replacement project for legacy Wyam issues. |
I've managed to do renaming of the "Archive" page web folder by rewriting
|
Great, glad you found a solution! |
We're migrating our blog to WYAM.
For SEO reasons we'd like to keep our posts in root URL (not in
/posts/
subfolder).For example
/my-article-1
instead of/posts/my-article-1
.I know we can use redirects (using metadata
RedirectFrom:
), but it is not enough for us. We need the final (redirected) URL to stay in root.When setting
BlogKeys.PostsPath
to/
, an error "Rooted globbing patterns are not supported" occurs.When setting
BlogKeys.PostsPath
to empty string, an error "Access to the path 'c:\index.html' is denied." occurs (because WYAM is trying to overwrite index of homepage with index of archive page).Is there any way how to do it properly?
The text was updated successfully, but these errors were encountered: