]> gitweb.fluxo.info Git - bookup.git/commitdiff
Feat: add anchors in the HTML preamble
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 20 Nov 2025 13:47:04 +0000 (10:47 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 20 Nov 2025 13:47:04 +0000 (10:47 -0300)
ChangeLog.md
DISCLAIMER
structure/book/en/00-preamble.md
structure/book/pt-br/00-preamble.md

index a921438d2e6083352acd76067e1c1d2a04593a01..9f792f248d340e2891819da8c5c834847051f382 100644 (file)
@@ -1,5 +1,9 @@
 # ChangeLog
 
+## v0.4.1 - 2025-11-20
+
+* [x] Add anchors in the HTML preamble.
+
 ## v0.3.3 - 2025-11-18
 
 * [x] Minor fix int the frontmatter citation mechanism.
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..4d2c2325b150a9d66a5b77e1c109f21b8be7b16f 100644 (file)
@@ -0,0 +1 @@
+This is both a book template and a documentation in how to use it!
index 66e33381ff6f85427c11965b6f428895612576b0..9a21272e4af2930e8909f56c215e60a7ad964189 100644 (file)
@@ -9,8 +9,9 @@ if (knitr::is_html_output()) {
   cat("\n")
   cat('<img src="images/cover.png">')
   cat("\n")
+  cat("\n")
 
-  cat("<h2>About</h2>")
+  cat("## About {#about .unlisted .unnumbered}")
   cat("\n")
   cat('<em>')
   cat(readLines('DISCLAIMER'), sep='\n')
@@ -39,8 +40,9 @@ if (knitr::is_html_output()) {
   cat('<br/><br/>')
   cat(readLines('snippets/keywords.txt'), sep='\n')
   cat("\n")
+  cat("\n")
 
-  cat("<h2>How to cite</h2>")
+  cat("## How to cite {#citing .unlisted .unnumbered}")
   cat("\n")
   library(stringr)
   author      = str_split_1(rmarkdown::metadata$author, ' ')
@@ -58,15 +60,17 @@ if (knitr::is_html_output()) {
   cat("\n")
   cat("\n")
 
-  cat("<h2>Credits</h2>")
+  cat("## Credits {#credits .unlisted .unnumbered}")
   cat("\n")
   cat(paste(rmarkdown::metadata$title, "<br/>", "Copyleft &copy;", readLines('.metadata/year.txt'), rmarkdown::metadata$author, readLines('snippets/contact.txt'), sep=' '))
   cat('<br/><br/>')
   cat(readLines('LICENSE'), sep='\n')
   cat('<br/><br/>')
   cat(readLines('snippets/cover.txt'), sep='\n')
+  cat("\n")
+  cat("\n")
 
-  cat("<h2>PDF version</h2>")
+  cat("## PDF version {#pdf .unlisted .unnumbered}")
   cat("\n")
   cat('Download the PDF <a href="book.pdf">here</a>, or browse it below:')
   cat("\n")
index 33bf3ec11872146ab6bf10249d5bb42db5ba5f7f..ed9e341248a887c565b6653cfffb9002246737ae 100644 (file)
@@ -9,8 +9,9 @@ if (knitr::is_html_output()) {
   cat("\n")
   cat('<img src="images/cover.png">')
   cat("\n")
+  cat("\n")
 
-  cat("<h2>Sobre</h2>")
+  cat("## Sobre {#about .unlisted .unnumbered}")
   cat("\n")
   cat('<em>')
   cat(readLines('DISCLAIMER'), sep='\n')
@@ -39,8 +40,9 @@ if (knitr::is_html_output()) {
   cat('<br/><br/>')
   cat(readLines('snippets/keywords.txt'), sep='\n')
   cat("\n")
+  cat("\n")
 
-  cat("<h2>Como citar</h2>")
+  cat("## Como citar {#citing .unlisted .unnumbered}")
   cat("\n")
 
   library(stringr)
@@ -57,16 +59,19 @@ if (knitr::is_html_output()) {
   cat('Adapte o exemplo a seguir para o seu padrão de <a href="https://pt.wikipedia.org/wiki/Cita%C3%A7%C3%A3o" target="_blank">citação</a> (ABNT, APA etc) e também para a versão que você quer citar:<br/><br/>', sep='\n')
   cat(paste('<blockquote><i>', author_cite, '. <b>', rmarkdown::metadata$title, '.</b> ', readLines('snippets/publisher.txt'), ', ', readLines('.metadata/year.txt'), ' - versão ', version, ' - ', readLines('snippets/url.txt'), '/', archive, '</i></blockquote>', sep=''))
   cat("\n")
+  cat("\n")
 
-  cat("<h2>Créditos</h2>")
+  cat("## Créditos {#credits .unlisted .unnumbered}")
   cat("\n")
   cat(paste(rmarkdown::metadata$title, "<br/>", "Copyleft &copy;", readLines('.metadata/year.txt'), rmarkdown::metadata$author, readLines('snippets/contact.txt'), sep=' '))
   cat('<br/><br/>')
   cat(readLines('LICENSE'), sep='\n')
   cat('<br/><br/>')
   cat(readLines('snippets/cover.txt'), sep='\n')
+  cat("\n")
+  cat("\n")
 
-  cat("<h2>Versão PDF</h2>")
+  cat("## Versão PDF {#pdf .unlisted .unnumbered}")
   cat("\n")
   cat('Baixe a versão PDF <a href="book.pdf">aqui</a>, ou navegue abaixo:')
   cat("\n")