diff options
author | Thomas Letan <lthms@soap.coffee> | 2020-02-20 22:58:42 +0100 |
---|---|---|
committer | Thomas Letan <lthms@soap.coffee> | 2020-02-20 22:58:42 +0100 |
commit | b3a30963af918d1d4edf03ac67ba44089c1a5417 (patch) | |
tree | 4321e74abe8f1df724848162df9d264b36e15415 /site/posts | |
parent | Make an heavy use of Makefile variables (diff) |
Adopt a literate programming for `main.sass'
Diffstat (limited to 'site/posts')
-rw-r--r-- | site/posts/meta/Bootstrap.org | 23 | ||||
-rw-r--r-- | site/posts/meta/Contents.org | 35 | ||||
-rw-r--r-- | site/posts/meta/Soupault.org | 2 |
3 files changed, 44 insertions, 16 deletions
diff --git a/site/posts/meta/Bootstrap.org b/site/posts/meta/Bootstrap.org index 9765d56..5da62a0 100644 --- a/site/posts/meta/Bootstrap.org +++ b/site/posts/meta/Bootstrap.org @@ -9,27 +9,28 @@ #+END_SRC #+BEGIN_SRC makefile :tangle (concat (getenv "ROOT") "/bootstrap.mk") -SASS := $(shell find site/ -name "*.sass") - +GENSASS := +CONTENTS := GENFILES += scripts/export-org.el org.mk coq.mk \ - $(SASS:.sass=.css) soupault.conf + sass.mk soupault.conf EMACS := ROOT="${ROOT}" emacs -include org.mk coq.mk +include org.mk coq.mk sass.mk TANGLEARGS := --batch \ - --load="${ROOT}/scripts/tangle-org.el" + --load="${ROOT}/scripts/tangle-org.el" \ + 2>/dev/null -build : ${GENFILES} +build : ${CONTENTS} ${GENFILES} @echo " run soupault" @soupault @echo " update .gitignore" - @scripts/update-gitignore.sh ${GENFILES} + @scripts/update-gitignore.sh ${CONTENTS} ${GENFILES} ${GENSASS} clean : @echo " remove generated files" - @rm -rf ${GENFILES} build/ + @rm -rf ${CONTENTS} ${GENFILES} build/ force : clean build @@ -41,9 +42,9 @@ org.mk coq.mk scripts/export-org.el &: ${CLEODIR}/Contents.org @echo " tangle $<" @${EMACS} $< ${TANGLEARGS} -%.css : %.sass - @echo " compile $*.sass" - @sassc --style=compressed --sass $< $@ +sass.mk ${SASS} &: ${CLEODIR}/Theme.org + @echo " tangle $<" + @${EMACS} $< ${TANGLEARGS} #+END_SRC # Local Variables: diff --git a/site/posts/meta/Contents.org b/site/posts/meta/Contents.org index ffb3a8e..1690801 100644 --- a/site/posts/meta/Contents.org +++ b/site/posts/meta/Contents.org @@ -6,7 +6,7 @@ ** Author Guidelines -** Generation Process +** Under the Hood #+BEGIN_SRC emacs-lisp :tangle (concat (getenv "ROOT") "/scripts/export-org.el") (setq org-html-htmlize-output-type nil) @@ -16,7 +16,8 @@ #+BEGIN_SRC makefile :tangle (concat (getenv "ROOT") "/org.mk") ORG_POSTS := $(shell find site/ -name "*.org") -GENFILES += $(ORG_POSTS:.org=.html) +CONTENTS += $(ORG_POSTS:.org=.html) +GENSASS += site/style/org.sass EXPORTARGS := --batch \ --load="${ROOT}/scripts/export-org.el" @@ -26,15 +27,25 @@ EXPORTARGS := --batch \ @${EMACS} $< ${EXPORTARGS} #+END_SRC +#+BEGIN_SRC sass :tangle (concat (getenv "ROOT") "/site/style/org.sass") +.footpara + display: inline + margin-left: .2em + +.section-number-2:after, .section-number-3:after, .section-number-4:after + content: ". " +#+END_SRC + * Using Coq files ** Author Guidelines -** Generation Process +** Under the Hood #+BEGIN_SRC makefile :tangle (concat (getenv "ROOT") "/coq.mk") COQ_POSTS := $(shell find site/ -name "*.v") -GENFILES += $(COQ_POSTS:.v=.html) +CONTENTS += $(COQ_POSTS:.v=.html) +GENSASS += site/style/coq.sass COQLIB := "https://coq.inria.fr/distrib/current/stdlib/" COQCARG := -async-proofs-cache force \ @@ -50,6 +61,22 @@ COQDOCARG := --no-index --charset utf8 --short \ @rm -f $(shell dirname $<)/coqdoc.css #+END_SRC +#+BEGIN_SRC sass :tangle (concat (getenv "ROOT") "/site/style/coq.sass") +div.code + white-space: nowrap + overflow-x: visible + +.code a[href] + text-decoration: none + + .fa-external-link + display: none + +.paragraph + margin-top: 1em + margin-bottom: 1em +#+END_SRC + # Local Variables: # org-src-preserve-indentation: t # End: diff --git a/site/posts/meta/Soupault.org b/site/posts/meta/Soupault.org index a935c85..913c8ae 100644 --- a/site/posts/meta/Soupault.org +++ b/site/posts/meta/Soupault.org @@ -4,7 +4,7 @@ <div id="history">site/posts/meta/Soupault.org</div> #+END_EXPORT -#+BEGIN_SRC toml :tangle ../../../soupault.conf +#+BEGIN_SRC toml :tangle (concat (getenv "ROOT") "/soupault.conf") [settings] strict = true verbose = false |