https://github.com/locize/locizify-ssg
Node.js script to render and generate website pages that uses locizify, to optimize SEO
https://github.com/locize/locizify-ssg
Last synced: 8 days ago
JSON representation
Node.js script to render and generate website pages that uses locizify, to optimize SEO
- Host: GitHub
- URL: https://github.com/locize/locizify-ssg
- Owner: locize
- License: mit
- Created: 2022-02-23T18:21:50.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2026-07-06T15:06:51.000Z (13 days ago)
- Last Synced: 2026-07-09T03:33:35.580Z (10 days ago)
- Language: JavaScript
- Size: 43.9 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Introduction
[](https://www.npmjs.com/package/locizify-ssg)
**EXPERIMENTAL**
This package helps to generate website pages on server side that uses [locizify](https://github.com/locize/locizify). This may help to improve SEO, etc.
# Getting started
Source can be loaded via [npm](https://www.npmjs.com/package/locizify-ssg).
```bash
# npm package
$ npm install locizify-ssg
```
Usage via code:
```js
import ssg from 'locizify-ssg'
ssg('index.html', ['de', 'it'], '{{lng}}.html', {
// debug: true,
fallbackLng: 'en',
backend: {
projectId: '123aa5aa-4660-4154-b6d9-907dbef10bb2',
version: 'production'
},
namespace: 'landingpage'
})
// or
ssg('index.html', 'de', 'de.html', {
// debug: true,
fallbackLng: 'en',
backend: {
projectId: '123aa5aa-4660-4154-b6d9-907dbef10bb2',
version: 'production'
},
namespace: 'landingpage'
})
```
Usage via CLI:
```sh
npm install locizify-ssg -g
# -i is the input file
# -o is the output file
# -l the languages
# -s the locizify options
locizify-ssg -i /Users/user/my/index.html -o /Users/user/my/de.html -l de -s "{\"fallbackLng\":\"en\",\"backend\":{\"projectId\":\"123aa5aa-4660-4154-b6d9-907dbef10bb2\",\"version\":\"production\"},\"namespace\":\"landingpage\"}"
# or for multiple languages
locizify-ssg -i /Users/user/my/index.html -o /Users/user/my/{{lng}}.html -l de,it,fr -s "{\"fallbackLng\":\"en\",\"backend\":{\"projectId\":\"123aa5aa-4660-4154-b6d9-907dbef10bb2\",\"version\":\"production\"},\"namespace\":\"landingpage\"}"
```