A blog by @phantie on GitHub
А то как сапожник без сапог
Source Code on GitHub
This is the third generation of my personal website.
- Elixir (Phoenix) → Rust (Yew) → Rust (Leptos)
-
Articles
- Article reading progress bar
- Code highlighting
- Selection from a list of articles
- Auto anchor creation
- SSR (Server-side rendering) and CSR (Client-side rendering)
- HTML meta tags (description, keywords) for SEO
- Support footnotes
- Return 404 status code on SSR for not found articles for SEO caching
-
Hydration
- Fixed stale artifacts serving and site breaking because of it
-
Artifact Caching
- In dev:
- Optimal caching with Etags
- In prod and in front of CloudFlare:
- Optimal caching with Etags for images
- Yet not working with Etags for .wasm, .js, .css
- In dev:
-
Front page
-
Header
- Continuous deployment on main branch push
- Deployed as a DigitalOcean App using misc/Dockerfile
- Connected to phantie.dev
- SSL included
- Continuous deployment on staging branch push
- Deployed as a DigitalOcean App using misc/Dockerfile
Then follow Leptos Guide
cargo install cargo-edit
cargo upgrade --verbose
or
Might break the build. But after running the next command after 4 months since I started developing this project, nothing has broken.
cargo upgrade --verbose --incompatible
- Hidden maze
- Experiment with Leptos signals
- Unlike in React, only the affected cells, not the whole component, are redrawn.
- DragAndDrop
- Experiment with JS drag events
- Implemented drag-and-drop of local files
- Discarding items using drag-and-drop