1.1.7 • Published 5 months ago

locizify-ssg v1.1.7

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

Introduction

npm version

EXPERIMENTAL

This package helps to generate website pages on server side that uses locizify. This may help to improve SEO, etc.

Getting started

Source can be loaded via npm.

# npm package
$ npm install locizify-ssg

Usage via code:

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:

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\"}"
1.1.7

5 months ago

1.1.1

6 months ago

1.1.0

6 months ago

1.1.6

5 months ago

1.1.5

5 months ago

1.1.4

6 months ago

1.1.3

6 months ago

1.1.2

6 months ago

1.0.10

6 months ago

1.0.9

1 year ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago