Création d'un changelog intégré dans le guide

This commit is contained in:
Bastien Dumont 2022-01-08 18:27:24 +01:00
parent 2fdfd827a8
commit 8fa7668a54
4 changed files with 28 additions and 2 deletions

2
CHANGELOG.md Normal file
View File

@ -0,0 +1,2 @@
# Changements

View File

@ -896,6 +896,9 @@ Cette liste contient tous les éléments qui, de fait, ne sont pas pris en compt
* Variables numériques : * Variables numériques :
* `submitted` * `submitted`
::: {.changelog}
:::
<!-- <!--
GNU Free Documentation License GNU Free Documentation License
Version 1.3, 3 November 2008 Version 1.3, 3 November 2008

View File

@ -1,4 +1,5 @@
INPUT_DATA_DIR = ../Tests-Data INPUT_DATA_DIR = ../Tests-Data
CHANGELOG = ../CHANGELOG.md
BIBLIO_FILE = $(INPUT_DATA_DIR)/BIBLIO_CSL-Tests.json BIBLIO_FILE = $(INPUT_DATA_DIR)/BIBLIO_CSL-Tests.json
INPUT_FILE = $(INPUT_DATA_DIR)/CSL-Tests.md INPUT_FILE = $(INPUT_DATA_DIR)/CSL-Tests.md
STYLESHEETS_DIR = .. STYLESHEETS_DIR = ..
@ -80,10 +81,10 @@ clean:
doc: docA4 docDiapo doc: docA4 docDiapo
docA4: $(DOC_FILE).md TEMPLATE_Guide-CSL-Clio.latex docA4: $(DOC_FILE).md TEMPLATE_Guide-CSL-Clio.latex $(CHANGELOG)
pandoc $(COMMON_DOC_OPTIONS) -o $(DOC_FILE)_A4.pdf --pdf-engine=lualatex --template=TEMPLATE_Guide-CSL-Clio.latex pandoc $(COMMON_DOC_OPTIONS) -o $(DOC_FILE)_A4.pdf --pdf-engine=lualatex --template=TEMPLATE_Guide-CSL-Clio.latex
docDiapo: $(DOC_FILE).md TEMPLATE_Guide-CSL-Clio.context docDiapo: $(DOC_FILE).md TEMPLATE_Guide-CSL-Clio.context $(CHANGELOG)
pandoc $(COMMON_DOC_OPTIONS) -o $(DOC_FILE)_Diapo.tex -t context --template=TEMPLATE_Guide-CSL-Clio.context && \ pandoc $(COMMON_DOC_OPTIONS) -o $(DOC_FILE)_Diapo.tex -t context --template=TEMPLATE_Guide-CSL-Clio.context && \
./microfixes-docDiapo.sh $(DOC_FILE)_Diapo.tex && \ ./microfixes-docDiapo.sh $(DOC_FILE)_Diapo.tex && \
cd $(DOC_DIR) && \ cd $(DOC_DIR) && \

View File

@ -0,0 +1,20 @@
local CHANGELOG_PATH = '../CHANGELOG.md'
local ANNEXES_HEADER_LEVEL = 1
local shift_headings = {
Header = function(header)
header.level = header.level + ANNEXES_HEADER_LEVEL
return header
end
}
function Div (div)
if div.classes:includes('changelog', 1) then
local changelog = io.open(CHANGELOG_PATH):read('a')
local changelog_doc = pandoc.read(changelog)
local to_include = pandoc.walk_block(pandoc.Div(changelog_doc.blocks), shift_headings).content
return to_include
end
end