Socket
Socket
Sign inDemoInstall

locizify-ssg

Package Overview
Dependencies
205
Maintainers
2
Versions
19
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    locizify-ssg

Node.js script to render and generate website pages that uses locizify, to optimize SEO


Version published
Weekly downloads
263
increased by14.35%
Maintainers
2
Created
Weekly downloads
 

Readme

Source

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

Keywords

FAQs

Last updated on 13 Dec 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc