From b590ca0aea8bbae34885e98b59bc465c09400ca3 Mon Sep 17 00:00:00 2001 From: Joris Guyonvarch Date: Fri, 26 Jun 2015 10:45:11 +0200 Subject: Using npm to generate static pages, WIP --- .gitignore | 2 + gen.sh | 24 ++++++++++++ index.html | 124 ++++++++++++++++++++++++++++++----------------------------- package.json | 13 +++++++ 4 files changed, 103 insertions(+), 60 deletions(-) create mode 100644 .gitignore create mode 100755 gen.sh create mode 100644 package.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1ca9571 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +node_modules/ +npm-debug.log diff --git a/gen.sh b/gen.sh new file mode 100755 index 0000000..9fbf044 --- /dev/null +++ b/gen.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +MARKDOWN_DIR="Pages" +MARKDOWN_DIR_LENGTH=$(expr 1 + ${#MARKDOWN_DIR}) + +HTML_DIR="Html" + + + + +SELECTOR="${MARKDOWN_DIR}/**/*.md" +for FILENAME in $SELECTOR; do + WITHOUT_DIR=${FILENAME:$MARKDOWN_DIR_LENGTH} + WITHOUT_EXT=${WITHOUT_DIR%.*} + HTML_FILENAME="$HTML_DIR/$WITHOUT_EXT.html" + + # echo $FILENAME + # echo $HTML_FILENAME + + # echo "pandoc -o $HTML_FILENAME $FILENAME" + # pandoc -o "\"$HTML_FILENAME\"" "\"$FILENAME\"" +done + +pandoc -o Html/accessoires/eponges.html Pages/accessoires/eponges.md diff --git a/index.html b/index.html index edf2a69..9b02a37 100644 --- a/index.html +++ b/index.html @@ -15,70 +15,74 @@ - - icône - +
+ + icône + - + +
-
- Contact : Auriane -
+ diff --git a/package.json b/package.json new file mode 100644 index 0000000..656665a --- /dev/null +++ b/package.json @@ -0,0 +1,13 @@ +{ + "name": "makeup", + + "dependencies": { + "pandoc-bin": "0.1.2" + }, + + "scripts": { + "build": "./gen.sh" + }, + + "license": "GPL-3" +} -- cgit v1.2.3