routerino 2.3.4 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -91,6 +91,7 @@ This simple configuration automatically handles routing, meta tags, and SEO opti
91
91
  - Enhanced User Experience
92
92
  - Support for sharing and social preview metadata
93
93
  - Snappy page transitions with automatic scroll reset, eliminating the jarring experience of landing mid-page when navigating
94
+ - Hash link support: SPA navigation to `/page#section` correctly scrolls to the target element, mimicking native browser behavior
94
95
 
95
96
  ## Installation
96
97
 
@@ -812,6 +813,20 @@ This creates an engaging Twitter preview with a large image, title, and descript
812
813
 
813
814
  By following these practices, you'll improve your site's SEO performance and social media presence when using Routerino.
814
815
 
816
+ ### Hash Links
817
+
818
+ Routerino supports standard `<a href="/page#section">` links for SPA navigation — after React renders the new page, it finds the element with the matching `id` and scrolls it into view.
819
+
820
+ **Sticky headers**: If your site has a fixed header, use the CSS [`scroll-margin-top`](https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-margin-top) property to offset the scroll target so content isn't hidden behind the header:
821
+
822
+ ```css
823
+ [id] {
824
+ scroll-margin-top: 80px; /* match your header height */
825
+ }
826
+ ```
827
+
828
+ This works for SPA navigation, native browser hash navigation, and direct page loads — no extra props or router changes needed.
829
+
815
830
  ## Sitemap and robots.txt Generation
816
831
 
817
832
  When using Routerino Forge for static site generation, `sitemap.xml` and `robots.txt` files are automatically generated during the build process:
@@ -915,11 +930,11 @@ routerinoForge({
915
930
  - Smart sizing: Uses aspect-ratio only to prevent layout shift without forcing dimensions
916
931
  - Hides images initially with `opacity: 0` to prevent broken image icons during load
917
932
 
918
- **Note:** Image optimization requires `ffmpeg` to be installed. Without it, images work normally but without blur placeholders. Install with `brew install ffmpeg` (Mac), `apt install ffmpeg` (Ubuntu), or `choco install ffmpeg` (Windows).
933
+ **Note:** Image optimization requires `ffmpeg` to be installed on your system. Install with `brew install ffmpeg` (Mac), `apt install ffmpeg` (Debian/Ubuntu), or `choco install ffmpeg` (Windows). Without ffmpeg, the Image component still works but falls back to the original image without optimization. A warning is shown during build if ffmpeg is not found but Image components are used.
919
934
 
920
935
  ##### CI/CD Setup for Image Optimization
921
936
 
922
- To enable image optimization in your CI/CD pipeline, you need to install ffmpeg. Here are examples for the most common setups:
937
+ For CI/CD environments without ffmpeg pre-installed, you'll need to install it as part of your build process. Here are examples:
923
938
 
924
939
  ###### GitHub Actions
925
940