You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

locizify-ssg

Package Overview
Dependencies
Maintainers
2
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

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
277
decreased by-19.48%
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

Package last updated on 13 Dec 2023

Did you know?

Socket

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
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc