Table of Contents
Les générateurs de sites statiques
Une alternative à un CMS pour créer un site web.
Bien pour un site style vitrine. Pour intégrer un fil RSS, des commentaires, un livre d'or, il faudra faire appel à des services externes.
Introduction sur les générateurs de sites statiques.
Exemples de générateurs :
- Hugo
- note pour un site multilingue
- Pelikan
- Jekyll
-
Lectures
- Working with Static Sites Camden, Rinaldi, 03/2017
Harp
Installation
sudo aptitude install npm sudo npm install -g harp
Cela ne fonctionne pas :
npm ERR! Error: ENOENT, chown '/usr/local/lib/node_modules/harp/node_modules/terraform/node_modules/less/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/co/package.json' npm ERR! If you need help, you may report this log at: npm ERR! <http://github.com/isaacs/npm/issues> npm ERR! or email it to: npm ERR! <npm-@googlegroups.com>
C'est parce que la version de nodejs est trop ancienne (sur ma machine : linuxmint 17.1) :
nodejs --version v0.10.25
et http://harpjs.com/blog/v0-20-0-node-5-compatibility :
Harp v0.20.0 supports Node v5.x, and simultaneously removes support for Node v0.10.x.
Il faut donc installer une version plus récente de node.js: https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions
sudo aptitude install curl curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - sudo aptitude install nodejs sudo aptitude install nodejs
La première fois qu'on fait install nodejs, il désinstalle npm et nodejs (ancienne version), la 2e fois il installe nodejs :
nodejs --version v6.10.3 npm --version 3.10.10 sudo npm install -g harp
Il y a des avertissements:
npm WARN deprecated jade@1.11.0: Jade has been renamed to pug, please install the latest version of pug instead of jade npm WARN deprecated transformers@2.1.0: Deprecated, use jstransformer /usr/bin/harp -> /usr/lib/node_modules/harp/bin/harp
Mais harp est installé:
harp --version 0.23.0