yewstack / yew

Rust / Wasm framework for creating reliable and efficient web applications
https://yew.rs
Apache License 2.0
30.35k stars 1.42k forks source link

Build Yew website with Yew #2779

Open ranile opened 2 years ago

ranile commented 2 years ago

Currently, yew.rs is built using Docusaurus, which uses React. It was used because at the time Yew did not have a way to render page to HTML files (SSG). This has now been resolved for the most part.

https://yew.rs should be built using Yew. It would be better to build a documentation engine like Docusaurus, then use it to build the website. But that's a huge undertaking that I'm not sure if anyone is willing to take on right now

simbleau commented 2 years ago

I wouldn't mind helping. I've contributed to abridge a lot, I've made my own site with Yew, and now I'm helping maintain Trunk. It would be a task probably spanning a few months for me, but I am receptive.

Would the scope be a verbatim 1:1 clone?

bnheise commented 2 years ago

I wouldn't mind helping out on this. I don't have enough experience with Yew to take a leading role, but I'd be happy to contribute.

simbleau commented 2 years ago

This would be a pretty big chore, to be honest. Not sure if this could be done by 1 person in a reasonable timeframe.

This project would require several pieces:

But honestly, I'd prefer the Blog was removed. It adds a lot of complexity (RSS/Tagging/Categories/Retrieval API/etc.) and it was never used meaningfully and currently serves no purpose. @hamza1311 might have more opinions.

I would probably be most willing to help with the CI/CD since I am currently maintaining Trunk and would like to see an official Trunk GitHub Action be used to deploy (to GitHub Pages). Otherwise, I'd be most interested in the search engine because this seems to be the most difficult thing to replicate correctly and there aren't many good choices for WASM search engines, imho.

bnheise commented 2 years ago

I think I would be pretty comfortable to put together some static pages. I think I could probably get an i18n solution up and running as well.

simbleau commented 2 years ago

Was perhaps thinking it may be worth it to make a Yew version of Docusaurus, because trunkrs.dev needs a makeover too, and I wouldn't mind leading the project more if it meant I could makeover Trunk (which I help maintain).

WorldSEnder commented 2 years ago

I think the mammoth part is porting the mdx format. Docusaurus allows one to embed and use react components written directly in the docs. It would be incredible (in effect and effort) to have that for yew components.

simbleau commented 2 years ago

I'd probably defer to a visual alternative, not a functional alternative. That seems out of scope.

bnheise commented 2 years ago

To put in my two cents, I think building a documentation generator is out of scope for this task. If that were the requirement, then having the documentation website built in Yew would very likely not happen for years to come. Rather than choosing the solution that we want (a documentation engine made from Yew) let's just choose good enough and just make the website using Yew without a documentation engine. What's most important is the proof of Yew's capabilities by building its own site with itself. Sure it'll result in more maintenance work to update things, but it's still way less work than building and maintaining a documentation engine.

ranile commented 1 year ago

I think the mammoth part is porting the mdx format. Docusaurus allows one to embed and use react components written directly in the docs. It would be incredible (in effect and effort) to have that for yew components.

It's not that hard if we can convert yew components to custom elements.

I agree that building a documentation engine is a huge undertaking. We should, however, prefer to keep the website we make as easily adaptable for others as possible

bnheise commented 1 year ago

@hamza1311 I have an example of converting a yew component to a custom element for another project I was working on. It's a pretty simple process. Check it out here: https://github.com/bnheise/lfr_rust_custom_element/blob/main/src/lib.rs

brahmachen commented 1 year ago

I am learning rust, and I was very familiar with react before,If anything I could help, please let me know

fundon commented 1 year ago

I created viz.rs docs website. It built with Yew.

Here is the repo: https://github.com/viz-rs/viz-rs.github.io.

simbleau commented 1 year ago

That’s pretty good work and faithful to the current design of yew.rs.

I’d support forking that and using it as a baseline.

From: Fangdun Tsai @.> Date: Saturday, December 10, 2022 at 11:10 To: yewstack/yew @.> Cc: simbleau @.>, Comment @.> Subject: Re: [yewstack/yew] Build Yew website with Yew (Issue #2779)

I created viz.rshttps://viz.rs docs website. It built with Yewhttps://yew.rs/.

Here is the repo: https://github.com/viz-rs/viz-rs.github.io.

— Reply to this email directly, view it on GitHubhttps://github.com/yewstack/yew/issues/2779#issuecomment-1345296622, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALPBK5I46CQM27YFMXN6S2LWMSTPVANCNFSM53YR4ZSQ. You are receiving this because you commented.Message ID: @.***>