Announcing v1.5.0
Welcome to the all-new Routify blog. For our first post, we’re very happy to announce that 1.5 is finally ready. Among the highlights in this version are:
- support for meta tags
- Dynamic basepaths
- node api
- CLI enhancements
- A unified __index.html (starter template)
- spassr server (starter template)
- Netlify + Github integration (starter template)
### **Meta tags and Open Graph**
Set meta tags and Open Graph data directly from Routify, in a single line. For example this code...
import { metatags} from "@sveltech/routify";
$: metatags.title = ‘My app - home’;
will output the following:
My app - home
You can read more about meta tags [here](/guide/metadata).
### **Dynamic basepaths**
Basepaths can now be set from anywhere within your app. Basepaths are strings but will be converted to RegExp’s internally.
To prerender multiple basepaths add a basepath argument to your exporter.
routify export --basepath mybase
### **Updated CLI**
The init command now accepts `--branch --no-example --no-install and --start-dev`. If you are already used to Routify, this way you can get a starter template with a minimal amount of files.
### **Auto-generated navigation with Layout and Page helpers**
With the new layout and page helpers you can read a file’s metadata or access its adjacent nodes.
Here’s an example of creating automatic navigation with a layout helper:
-
{#each $layout.children as { path, title }}
- {title} {/each}
Kommentarer
Send en kommentar