From: Silvio Rhatto Date: Thu, 20 Nov 2025 13:47:04 +0000 (-0300) Subject: Feat: add anchors in the HTML preamble X-Git-Tag: 0.4.0~1 X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=36f907efb42a993165d930b811f6cdf8fad234cf;p=bookup.git Feat: add anchors in the HTML preamble --- diff --git a/ChangeLog.md b/ChangeLog.md index a921438..9f792f2 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -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. diff --git a/DISCLAIMER b/DISCLAIMER index e69de29..4d2c232 100644 --- a/DISCLAIMER +++ b/DISCLAIMER @@ -0,0 +1 @@ +This is both a book template and a documentation in how to use it! diff --git a/structure/book/en/00-preamble.md b/structure/book/en/00-preamble.md index 66e3338..9a21272 100644 --- a/structure/book/en/00-preamble.md +++ b/structure/book/en/00-preamble.md @@ -9,8 +9,9 @@ if (knitr::is_html_output()) { cat("\n") cat('') cat("\n") + cat("\n") - cat("

About

") + cat("## About {#about .unlisted .unnumbered}") cat("\n") cat('') cat(readLines('DISCLAIMER'), sep='\n') @@ -39,8 +40,9 @@ if (knitr::is_html_output()) { cat('

') cat(readLines('snippets/keywords.txt'), sep='\n') cat("\n") + cat("\n") - cat("

How to cite

") + 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("

Credits

") + cat("## Credits {#credits .unlisted .unnumbered}") cat("\n") cat(paste(rmarkdown::metadata$title, "
", "Copyleft ©", readLines('.metadata/year.txt'), rmarkdown::metadata$author, readLines('snippets/contact.txt'), sep=' ')) cat('

') cat(readLines('LICENSE'), sep='\n') cat('

') cat(readLines('snippets/cover.txt'), sep='\n') + cat("\n") + cat("\n") - cat("

PDF version

") + cat("## PDF version {#pdf .unlisted .unnumbered}") cat("\n") cat('Download the PDF here, or browse it below:') cat("\n") diff --git a/structure/book/pt-br/00-preamble.md b/structure/book/pt-br/00-preamble.md index 33bf3ec..ed9e341 100644 --- a/structure/book/pt-br/00-preamble.md +++ b/structure/book/pt-br/00-preamble.md @@ -9,8 +9,9 @@ if (knitr::is_html_output()) { cat("\n") cat('') cat("\n") + cat("\n") - cat("

Sobre

") + cat("## Sobre {#about .unlisted .unnumbered}") cat("\n") cat('') cat(readLines('DISCLAIMER'), sep='\n') @@ -39,8 +40,9 @@ if (knitr::is_html_output()) { cat('

') cat(readLines('snippets/keywords.txt'), sep='\n') cat("\n") + cat("\n") - cat("

Como citar

") + 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 citação (ABNT, APA etc) e também para a versão que você quer citar:

', sep='\n') cat(paste('
', author_cite, '. ', rmarkdown::metadata$title, '. ', readLines('snippets/publisher.txt'), ', ', readLines('.metadata/year.txt'), ' - versão ', version, ' - ', readLines('snippets/url.txt'), '/', archive, '
', sep='')) cat("\n") + cat("\n") - cat("

Créditos

") + cat("## Créditos {#credits .unlisted .unnumbered}") cat("\n") cat(paste(rmarkdown::metadata$title, "
", "Copyleft ©", readLines('.metadata/year.txt'), rmarkdown::metadata$author, readLines('snippets/contact.txt'), sep=' ')) cat('

') cat(readLines('LICENSE'), sep='\n') cat('

') cat(readLines('snippets/cover.txt'), sep='\n') + cat("\n") + cat("\n") - cat("

Versão PDF

") + cat("## Versão PDF {#pdf .unlisted .unnumbered}") cat("\n") cat('Baixe a versão PDF aqui, ou navegue abaixo:') cat("\n")