static-site-creator

1.0.2 • Public • Published

Static site creator

npm version

Creator of static sites content for template managers (like pug ex-blade)

Example site we are not responsable for any issues, also issues realted to privacy and security of the storage

To save the images into files you cna use json images saver

Features

  • Export to javascript object for pug (ex balde) template
  • Export to any text format
  • Multiple git repositories support
  • Multiple websites support
  • Multiple sections per website support
  • Git integration to push the site
  • Editor users
  • Simple webhook support
  • Async (for client) git operations
  • Cache git repositories
  • Fast git clone (min history)
  • Multiple remote server support for the same repository (multiple push)
  • Tmp storage for data before pushing
  • Editors log and history (who has done what)
  • Git auto retry in case of failure
  • Boolean type in templates

How it works

  1. Each user can add some websites with a git repository associated
  2. Each site has some subsections that correspond to the physical pages

How to use

How to Install

Type npm install

How to Compile

This task is done automatically by the previous one.
Type gulp

How to configure

How to set .env file

Copy .env.example as .env

How to set secret

Type node secret.js and copy the secret obtained in the right field of .env

How to perform migrations

This task is done automatically on server init (next step).
Type knex migrate:latest (install knex via npm install knex -g)

How to run

Production mode

Type pm2 start server.js (install pm2 via npm install pm2 -g)

Dev mode

Type node server.js

EBNF templates

S -> OBJ
OBJ -> "{"OBJELE ("," OBJELE)*"}"
OBJELE -> NAME ":" ELEMENT
ElEMENT -> OBJ | ARRAY | BASICELE
OBJA -> "{"OBJELEA | (OBJELE ("," OBJELE)*)"}"
OBJELEA -> NAME :" ORELEMENT
ARRAY -> "[" OBJA|ARRAY "]"
BASICELE -> "text" | "textRow" | "img" | "youtube"
ORELEMENT -> BASICELE ("|" BASICELE)*
NAME -> (LETTER) (DIGIT|LETTER)*

TODO

  • ES6 support
  • Production model (mysql data set in .env)
  • Data seeds
  • NPM package
  • Vendor dirs generated by gulp (so they can be not loaded in git)
  • Set pug (ex jade). Maybe it is useless since we use angular
  • Set license file
  • Browserify
  • Fix npm scripts and use them to run the app
  • Set automatically secret into .env, perform this task with installation (perform also .env copy if it doesn't exist)
  • Google auth key
  • Privacy policy
  • Password confirmation
  • XSS and CSRF protections
  • Validate data with JSON schema

Configuration

  • Platform: node
  • Framework: express
  • Template Engine: jade
  • CSS Framework: bootstrap
  • CSS Preprocessor: sass
  • JavaScript Framework: angularjs
  • Build Tool: gulp
  • Unit Testing: mocha
  • Database: sqlite
  • Authentication: email
  • Deployment: none

Credits

License

The MIT License (MIT)

Copyright (c) 2016 Sahat Yalkabov

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Readme

Keywords

none

Package Sidebar

Install

npm i static-site-creator

Weekly Downloads

1

Version

1.0.2

License

none

Unpacked Size

2.27 MB

Total Files

173

Last publish

Collaborators

  • carduz