From 762966db99f91f41d46cf88a5b208ebed6f3835f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20V=C3=A9ril?= Date: Sat, 14 Sep 2019 15:05:55 +0200 Subject: [PATCH] Replace Pelican by hugo as website generator --- .gitignore | 6 +- .gitmodules | 3 + Makefile | 77 +------------ archetypes/default.md | 6 + config.toml | 6 + content/{pages/index.html => _index.html} | 23 ++-- content/{pages/dataview.html => view.html} | 23 ++-- pelicanconf.py | 35 ------ publishconf.py | 25 ---- .../data/water_aug-cc-pVDZ_CC3.dat | 0 .../data/water_aug-cc-pVDZ_CCSDT.dat | 0 .../data/water_aug-cc-pVDZ_CCSDTQ.dat | 0 .../data/water_aug-cc-pVDZ_CCSDTQP.dat | 0 .../data/water_aug-cc-pVDZ_exFCI.dat | 0 .../data/water_aug-cc-pVTZ_CC3.dat | 0 .../data/water_aug-cc-pVTZ_CCSDT.dat | 0 .../data/water_aug-cc-pVTZ_CCSDTQ.dat | 0 .../data/water_aug-cc-pVTZ_exFCI.dat | 0 {content => static}/scripts/data.js | 0 .../scripts/getFullDataPath.js | 2 +- .../scripts/getTextFromFile.js | 0 .../scripts/parseQueryStringToDictionary.js | 0 tasks.py | 109 ------------------ themes/beautifulhugo | 1 + 24 files changed, 42 insertions(+), 274 deletions(-) create mode 100644 .gitmodules create mode 100644 archetypes/default.md create mode 100644 config.toml rename content/{pages/index.html => _index.html} (85%) rename content/{pages/dataview.html => view.html} (81%) delete mode 100644 pelicanconf.py delete mode 100644 publishconf.py rename {content => static}/data/water_aug-cc-pVDZ_CC3.dat (100%) rename {content => static}/data/water_aug-cc-pVDZ_CCSDT.dat (100%) rename {content => static}/data/water_aug-cc-pVDZ_CCSDTQ.dat (100%) rename {content => static}/data/water_aug-cc-pVDZ_CCSDTQP.dat (100%) rename {content => static}/data/water_aug-cc-pVDZ_exFCI.dat (100%) rename {content => static}/data/water_aug-cc-pVTZ_CC3.dat (100%) rename {content => static}/data/water_aug-cc-pVTZ_CCSDT.dat (100%) rename {content => static}/data/water_aug-cc-pVTZ_CCSDTQ.dat (100%) rename {content => static}/data/water_aug-cc-pVTZ_exFCI.dat (100%) rename {content => static}/scripts/data.js (100%) rename {content => static}/scripts/getFullDataPath.js (57%) rename {content => static}/scripts/getTextFromFile.js (100%) rename {content => static}/scripts/parseQueryStringToDictionary.js (100%) delete mode 100644 tasks.py create mode 160000 themes/beautifulhugo diff --git a/.gitignore b/.gitignore index ba08b01d..081081f9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,7 @@ -*~ .vscode -._* +public *.lock *.DS_Store *.swp *.out -*.py[cod] -output +public \ No newline at end of file diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..bf2b6842 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "themes/beautifulhugo"] + path = themes/beautifulhugo + url = https://github.com/halogenica/beautifulhugo.git diff --git a/Makefile b/Makefile index 9c985406..d2af1bbc 100644 --- a/Makefile +++ b/Makefile @@ -1,75 +1,8 @@ -PY?=python3 -PELICAN?=pelican -PELICANOPTS= - -BASEDIR=$(CURDIR) -INPUTDIR=$(BASEDIR)/content -OUTPUTDIR=$(BASEDIR)/output -CONFFILE=$(BASEDIR)/pelicanconf.py -PUBLISHCONF=$(BASEDIR)/publishconf.py - - -DEBUG ?= 0 -ifeq ($(DEBUG), 1) - PELICANOPTS += -D -endif - -RELATIVE ?= 0 -ifeq ($(RELATIVE), 1) - PELICANOPTS += --relative-urls -endif - -help: - @echo 'Makefile for a pelican Web site ' - @echo ' ' - @echo 'Usage: ' - @echo ' make html (re)generate the web site ' - @echo ' make clean remove the generated files ' - @echo ' make regenerate regenerate files upon modification ' - @echo ' make publish generate using production settings ' - @echo ' make serve [PORT=8000] serve site at http://localhost:8000' - @echo ' make serve-global [SERVER=0.0.0.0] serve (as root) to $(SERVER):80 ' - @echo ' make devserver [PORT=8000] serve and regenerate together ' - @echo ' make ssh_upload upload the web site via SSH ' - @echo ' make rsync_upload upload the web site via rsync+ssh ' - @echo ' ' - @echo 'Set the DEBUG variable to 1 to enable debugging, e.g. make DEBUG=1 html ' - @echo 'Set the RELATIVE variable to 1 to enable relative urls ' - @echo ' ' - -html: - $(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) - -clean: - [ ! -d $(OUTPUTDIR) ] || rm -rf $(OUTPUTDIR) - -regenerate: - $(PELICAN) -r $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) +default: + hugo serve: -ifdef PORT - $(PELICAN) -l $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) -p $(PORT) -else - $(PELICAN) -l $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) -endif + hugo -D server -serve-global: -ifdef SERVER - $(PELICAN) -l $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) -p $(PORT) -b $(SERVER) -else - $(PELICAN) -l $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) -p $(PORT) -b 0.0.0.0 -endif - - -devserver: -ifdef PORT - $(PELICAN) -lr $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) -p $(PORT) -else - $(PELICAN) -lr $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) -endif - -publish: - $(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(PUBLISHCONF) $(PELICANOPTS) - - -.PHONY: html help clean regenerate serve serve-global devserver publish \ No newline at end of file +clean: + rm -rf public diff --git a/archetypes/default.md b/archetypes/default.md new file mode 100644 index 00000000..00e77bd7 --- /dev/null +++ b/archetypes/default.md @@ -0,0 +1,6 @@ +--- +title: "{{ replace .Name "-" " " | title }}" +date: {{ .Date }} +draft: true +--- + diff --git a/config.toml b/config.toml new file mode 100644 index 00000000..2a8906d0 --- /dev/null +++ b/config.toml @@ -0,0 +1,6 @@ +baseURL = "localhost:8080" +languageCode = "en-us" +DateForm = "12-30-2006" +title = "exdatabaseLCPQ" +DefaultContentLanguage = "en" +theme = "beautifulhugo" \ No newline at end of file diff --git a/content/pages/index.html b/content/_index.html similarity index 85% rename from content/pages/index.html rename to content/_index.html index 4bcdbf7e..66b502b0 100644 --- a/content/pages/index.html +++ b/content/_index.html @@ -1,14 +1,11 @@ - - - - Welcome - - - - - - - +--- +title: "Welcome" +date: 2019-08-29 09:00 +draft: false +--- + + + - - +--- +title: "view" +date: 2019-08-29 09:00 +draft: false +--- + + +