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

Prerender specific paths #20

Open
marinasundstrom opened this issue Oct 16, 2022 · 10 comments
Open

Prerender specific paths #20

marinasundstrom opened this issue Oct 16, 2022 · 10 comments

Comments

@marinasundstrom
Copy link

Is it possible to configure the rendering? To tell it to generate unique pages based on a route with specific parameter.

I want to prerender my blog which is written in Blazor. To get SEO.

I have posts stored as markdown files which are loaded by page which has the following route:

@page "/posts/{id}"

id is mapped to the name of a markdown file. test.md has Id test

So I wish that I could configure the generator to iterate the markdown files in a folder, and to construct the paths (with parameters) for it to prerender into separate files.

@jsakamoto
Copy link
Owner

@marinasundstrom

Currently, I don't provide any feature on this library to directly support your scenario.

However, this library will recursively traverse all links inter pages, starting with the root page, and save them into static HTML files. So, as long as users can read all posts on your blog by traversing links on that blog pages on a web browser, this library can prerender those pages to static HTML files. Therefore I assume that you don't have to do such as "iterate the markdown files in a folder".

Could you tell me the URL of your blog site? And the source code of your blog site is disclosed? If so, could you show me the source code of your blog site? I'll take a look at it if you can do that.

@marinasundstrom
Copy link
Author

marinasundstrom commented Oct 17, 2022 via email

@jsakamoto
Copy link
Owner

@marinasundstrom
I tried to pre-render your project with the "BlazorWasmPreRendering.Build" package. But unfortunately, I ran into an unexpected critical error. 😱 The error was caused by the incompatible version between assemblies used from your project and used from the "BlazorWasmPreRendering.Build" package. This error depends on the architecture of the "BlazorWasmPreRendering.Build" package, so I'll resolve this problem by my hand.

Please wait for a while until I get it done. 🙇‍♂️

@marinasundstrom
Copy link
Author

marinasundstrom commented Oct 17, 2022

@jsakamoto Thanks! I'm reading your comment after my own attempt at compiling it. I got the error.

I'll be waiting for your fix! 🙂

@marinasundstrom
Copy link
Author

When will this be solved? 🙂

@jsakamoto
Copy link
Owner

@marinasundstrom Well, I estimate it will take this weekend. So, if I did well, we might get the fixed version next Monday. This product is my hobby, and I can spend only about one or two hours per day maintaining my OSS software. Thank you for your patience and your understanding! Anyway, I'm working on it on this branch 👍.

@marinasundstrom
Copy link
Author

@jsakamoto I understand that. I just wanted an estimated timeframe. 🙂

Before reading your message I actually worried about having stressed you. Not my intent!

@jsakamoto
Copy link
Owner

@marinasundstrom Thank you for your patience.
I fixed the problem of the "Blazor Wasm Pre-rendering Build" NuGet package and released its new version today.

And moreover, I applied it to your project and sent a pull request.

marinasundstrom/marinas-blog#1

There are still some points that can be improved and an undesirable limitation, but I'll appreciate it if you check out the pull request above link.

@marinasundstrom
Copy link
Author

@jsakamoto Thank you! I will have a look this and see how well it works for me 🙂

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