Skip to content

VTarakanov/translate-html-from-json

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Static html generator with fields from json

Organizing fast translations for static websites with gulp and pug.

Installation

Use the package manager npm to install.

npm i

Usage

Fill in json data, where the key is the name of the translation folder.

[{
    "ru": {
        "lang": "ru lang",
        "pretitle": "ru title"
    },

    "en": {
        "lang": "en lang",
        "pretitle": "en title"
    }  
}]

Insert fields from json into pug, if without a template engine, then translate html into pug and put fields.

p= lang
p= pretitle

Assembly in html

gulp build

Folder will be created based on your json keys.

folders example

About

Generating html translations from json

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published