diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2024-06-09 12:18:06 +0100 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2024-06-09 12:18:06 +0100 |
commit | a45b39d7995e4c0b57272d4fc286eb54e02b9c70 (patch) | |
tree | 46f3a8bafc32df8b02d5c1906137c2881e9d8ce1 | |
parent | ab90f9241d0867206858c306c8d7fb08ee7f0275 (diff) | |
download | bookup-a45b39d7995e4c0b57272d4fc286eb54e02b9c70.tar.gz bookup-a45b39d7995e4c0b57272d4fc286eb54e02b9c70.tar.bz2 |
Unified configuration for book and notes
-rw-r--r-- | ChangeLog.md | 1 | ||||
-rw-r--r-- | _book.yml | 4 | ||||
-rw-r--r-- | _common.yml (renamed from _bookup.yml) | 7 | ||||
-rw-r--r-- | _notes.yml | 3 | ||||
-rw-r--r-- | _output.yml | 6 | ||||
-rwxr-xr-x | bin/compile-book | 10 | ||||
-rwxr-xr-x | bin/compile-notes | 16 | ||||
-rw-r--r-- | content/notes/00-intro/notes.md | 29 | ||||
-rw-r--r-- | content/sections/15-installation/installation.md | 3 | ||||
-rw-r--r-- | structure/book/00-header.tex (renamed from structure/00-header.tex) | 0 | ||||
-rw-r--r-- | structure/book/00-header.yml (renamed from structure/00-header.yml) | 0 | ||||
-rw-r--r-- | structure/book/00-preamble.md (renamed from structure/00-preamble.md) | 0 | ||||
-rw-r--r-- | structure/book/00-preamble.tex (renamed from structure/00-preamble.tex) | 0 | ||||
-rw-r--r-- | structure/book/99-biblio.md (renamed from structure/99-biblio.md) | 0 | ||||
-rw-r--r-- | structure/book/99-end.tex (renamed from structure/99-end.tex) | 0 | ||||
-rw-r--r-- | structure/notes/00-header.yml | 20 |
16 files changed, 56 insertions, 43 deletions
diff --git a/ChangeLog.md b/ChangeLog.md index 0fac6dd..d58eb28 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -5,6 +5,7 @@ ### Features * [x] Improved compilation procedures. +* [x] Unified configuration for book and notes. ## v0.0.4 - 2024-06-08 diff --git a/_book.yml b/_book.yml new file mode 100644 index 0000000..db1cf27 --- /dev/null +++ b/_book.yml @@ -0,0 +1,4 @@ +--- +# Title and subtitle +title : "Bookup" +subtittle : "Bookdown-based publishing template" diff --git a/_bookup.yml b/_common.yml index 1a2dd00..515d412 100644 --- a/_bookup.yml +++ b/_common.yml @@ -1,14 +1,9 @@ ---- -# Title and subtitle -title : "Bookup" -subtittle : "Bookdown-based publishing template" - # Authorship information author: "Silvio Rhatto" date : "`r Sys.Date()`" # Publisher -publisher: "Fluxo" +publisher: "Bookup" # Language lang: "pt-br" diff --git a/_notes.yml b/_notes.yml new file mode 100644 index 0000000..ff9589d --- /dev/null +++ b/_notes.yml @@ -0,0 +1,3 @@ +--- +# Title and subtitle +title: "Bookup Notebook" diff --git a/_output.yml b/_output.yml index ca39efa..62874f8 100644 --- a/_output.yml +++ b/_output.yml @@ -76,9 +76,9 @@ bookdown::tufte_book2: template: vendor/bookup/templates/tufte-handout.tex includes: - in_header: vendor/bookup/structure/00-header.tex - before_body: vendor/bookup/structure/00-preamble.tex - after_body: vendor/bookup/structure/99-end.tex + in_header: vendor/bookup/structure/book/00-header.tex + before_body: vendor/bookup/structure/book/00-preamble.tex + after_body: vendor/bookup/structure/book/99-end.tex toc: true toc_depth: 3 #toc_appendix: true diff --git a/bin/compile-book b/bin/compile-book index 75c417b..f452d4b 100755 --- a/bin/compile-book +++ b/bin/compile-book @@ -7,6 +7,7 @@ BASENAME="`basename $0 | sed -e 's/\(.\)/\U\1/'`" DIRNAME="`dirname $0`" BASEDIR="$DIRNAME/.." +STRUCTURE="structure/book" OUTPUT="${1:-book}" REVISION="$2" DATE="$3" @@ -15,7 +16,8 @@ DATE="$3" rm -f $OUTPUT.md $OUTPUT.Rmd # Bookup config -cat _bookup.yml >> $OUTPUT.md ; echo "" >> $OUTPUT.md +cat _book.yml >> $OUTPUT.md ; echo "" >> $OUTPUT.md +cat _common.yml >> $OUTPUT.md ; echo "" >> $OUTPUT.md # Bibliography find -name _biblio.yml | while read file; do @@ -23,13 +25,13 @@ find -name _biblio.yml | while read file; do done # YAML headers -for file in $BASEDIR/structure/00*.yml; do +for file in $BASEDIR/$STRUCTURE/00*.yml; do cat $file >> $OUTPUT.md echo "---" >> $OUTPUT.md done # Markdown headers -for file in $BASEDIR/structure/00*.md; do +for file in $BASEDIR/$STRUCTURE/00*.md; do cat $file >> $OUTPUT.md echo "" >> $OUTPUT.md done @@ -43,7 +45,7 @@ find content/sections -type f | grep '\.md$' | sort | while read file; do done # Footers -for file in $BASEDIR/structure/99*.md; do +for file in $BASEDIR/$STRUCTURE/99*.md; do cat $file >> $OUTPUT.md echo "" >> $OUTPUT.md done diff --git a/bin/compile-notes b/bin/compile-notes index 1e55dcc..efeca68 100755 --- a/bin/compile-notes +++ b/bin/compile-notes @@ -7,6 +7,7 @@ BASENAME="`basename $0 | sed -e 's/\(.\)/\U\1/'`" DIRNAME="`dirname $0`" BASEDIR="$DIRNAME/.." +STRUCTURE="structure/notes" OUTPUT="${1:-notes}" REVISION="$2" DATE="$3" @@ -14,6 +15,21 @@ DATE="$3" # Remove any dangling output files rm -f $OUTPUT.md +# Notes config +cat _notes.yml >> $OUTPUT.md ; echo "" >> $OUTPUT.md +cat _common.yml >> $OUTPUT.md ; echo "" >> $OUTPUT.md + +# Bibliography +find -name _biblio.yml | while read file; do + cat $file >> $OUTPUT.md ; echo "" >> $OUTPUT.md +done + +# YAML headers +for file in $BASEDIR/$STRUCTURE/00*.yml; do + cat $file >> $OUTPUT.md + echo "---" >> $OUTPUT.md +done + # Content find content/notes -type f | grep '\.md$' | sort | while read file; do cat $file >> $OUTPUT.md diff --git a/content/notes/00-intro/notes.md b/content/notes/00-intro/notes.md index af00773..79d3f49 100644 --- a/content/notes/00-intro/notes.md +++ b/content/notes/00-intro/notes.md @@ -1,32 +1,3 @@ ---- -title : "Bookup Notebook" -author : "Silvio Rhatto" -date : "`r Sys.Date()`" -lang : "pt-br" -site : "bookdown::bookdown_site" -publisher: "Bookup" -output: - bookdown::gitbook: - config: - toc: - collapse: section - toolbar: - # Default search indexing is very slow: there's lots of notes to be indexed at each page load - # Because of that, it may be better to disable search by default - #search: no - # Fuse search engine is faster - search: - engine: fuse - sharing: no - fontsettings: - theme: night - family: sans - size: 2 - #split_by: chapter+number - #split_by: section - ---- - # Caderno de anotações {#index} Exemplo de caderno de anotações. diff --git a/content/sections/15-installation/installation.md b/content/sections/15-installation/installation.md index 9024b41..3da6a66 100644 --- a/content/sections/15-installation/installation.md +++ b/content/sections/15-installation/installation.md @@ -15,7 +15,8 @@ Procedimento de instalação do Bookup. * `.gitignore`. * `images/cover.png`. -* `_bookup.yml`. +* `_book.yml`. +* `_notes.yml`. * `_biblio.yml`. * `LICENSE`. * `DISCLAIMER`. diff --git a/structure/00-header.tex b/structure/book/00-header.tex index ded10bd..ded10bd 100644 --- a/structure/00-header.tex +++ b/structure/book/00-header.tex diff --git a/structure/00-header.yml b/structure/book/00-header.yml index 2ad19fe..2ad19fe 100644 --- a/structure/00-header.yml +++ b/structure/book/00-header.yml diff --git a/structure/00-preamble.md b/structure/book/00-preamble.md index fea2bc0..fea2bc0 100644 --- a/structure/00-preamble.md +++ b/structure/book/00-preamble.md diff --git a/structure/00-preamble.tex b/structure/book/00-preamble.tex index d558cc1..d558cc1 100644 --- a/structure/00-preamble.tex +++ b/structure/book/00-preamble.tex diff --git a/structure/99-biblio.md b/structure/book/99-biblio.md index c5385cb..c5385cb 100644 --- a/structure/99-biblio.md +++ b/structure/book/99-biblio.md diff --git a/structure/99-end.tex b/structure/book/99-end.tex index 1959646..1959646 100644 --- a/structure/99-end.tex +++ b/structure/book/99-end.tex diff --git a/structure/notes/00-header.yml b/structure/notes/00-header.yml new file mode 100644 index 0000000..1404cad --- /dev/null +++ b/structure/notes/00-header.yml @@ -0,0 +1,20 @@ +site : "bookdown::bookdown_site" +output: + bookdown::gitbook: + config: + toc: + collapse: section + toolbar: + # Default search indexing is very slow: there's lots of notes to be indexed at each page load + # Because of that, it may be better to disable search by default + #search: no + # Fuse search engine is faster + search: + engine: fuse + sharing: no + fontsettings: + theme: night + family: sans + size: 2 + #split_by: chapter+number + #split_by: section |