You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey! I use Feliz since for a lot of projects and wanted to contribute to the documentation, but nothing was working for me 😅
I checked the documentation project and saw that it was very complex with ~1400 lines of code for routing alone.
Combined with a comment i found, i came here with a suggestion.
Hi there @Darkle, apologies for the delay. I've merged your PR but the docs application is broken and needs an update. Probably an overhaul along with the changes to the CI. I will be fixing it as soon as time permits 🙏
My goal was using a well developed documentation framework, while displaying f# code and the resulting react components.
Tip
Check out the PR #627 if you want to see it in action.
go to public and run npm run dev 🚀
Implementation
I forked this repo and set up a astrostarlight documentation in the public folder.
Note
Astro can render any frontend framework components (react, svelte, vue,...)
Create a f# project in public/src/components/fsharp.
Update npm run dev to include fable transpilation dotnet fable watch src/components/fsharp -e jsx --run astro dev
Add dependency to Feliz nuget package (the Feliz.fsproj did not work for me. There were transpilation errors vor Feliz.CompilerPlugins and i wanted to get some feedback before investigating any deeper issues)
Create POC react components in f# in public/src/components/fsharp
Add Feliz core documentation to public/src/docs/Feliz
Showcase code and component import for example in public/src/docs/Feliz/ReactApiSupport.mdx
it just works™️ ; Astro works well and is highly customizable. Far less code to maintain. No routing logic, etc.
Display actual code used for component next to the component. Feature changes/obsolete stuff gets caught easily.
Disadvantages
No full f#?
Conclusion
The current documentation setup is very complicated and can create a entry barrier for new contributers. My suggestion offers an easy alternative to a full f# documentation project, reusing existing features from astro while focusing on f# components.
The text was updated successfully, but these errors were encountered:
Hey! I use Feliz since for a lot of projects and wanted to contribute to the documentation, but nothing was working for me 😅
I checked the documentation project and saw that it was very complex with ~1400 lines of code for routing alone.
Combined with a comment i found, i came here with a suggestion.
Originally posted by @Zaid-Ajaj in #618 (comment)
Goal
My goal was using a well developed documentation framework, while displaying f# code and the resulting react components.
Tip
Check out the PR #627 if you want to see it in action.
go to
public
and runnpm run dev
🚀Implementation
I forked this repo and set up a astro starlight documentation in the
public
folder.Note
Astro can render any frontend framework components (react, svelte, vue,...)
public/src/components/fsharp
.npm run dev
to include fable transpilationdotnet fable watch src/components/fsharp -e jsx --run astro dev
public/src/components/fsharp
public/src/docs/Feliz
public/src/docs/Feliz/ReactApiSupport.mdx
Advantages
Disadvantages
Conclusion
The current documentation setup is very complicated and can create a entry barrier for new contributers. My suggestion offers an easy alternative to a full f# documentation project, reusing existing features from astro while focusing on f# components.
The text was updated successfully, but these errors were encountered: