Create changelog as .pdf file #868
Replies: 4 comments 6 replies
-
Hey!
Very happy to hear that :)
Ah, interesting question! I haven't tried something like that yet.
Can you share how that works? I can look into it and either come up with a better alternative or help you improve the workflow. |
Beta Was this translation helpful? Give feedback.
-
Hey :-) Sure. We use git-cliff in several projects. One project uses CMake as build system and this is the project where we share our changelog as .pdf file with our co-workers. The flow at the moment is to run a CMake target: find_package(Git QUIET)
if(GIT_FOUND AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git")
add_custom_target(
__CREATE_CHANGELOG__
COMMAND
git cliff --tag ${VERSION_TAG_SEMVER} -w ${CMAKE_CURRENT_SOURCE_DIR}
-c ${CMAKE_CURRENT_SOURCE_DIR}/release-util/cliff.toml -o ${CMAKE_CURRENT_SOURCE_DIR}/CHANGELOG.md
COMMAND
pandoc --pdf-engine=xelatex --template
${CMAKE_CURRENT_SOURCE_DIR}/release-util/eisvogel --from=gfm --to=pdf -o
${CMAKE_CURRENT_SOURCE_DIR}/CHANGELOG.pdf ${CMAKE_CURRENT_SOURCE_DIR}/CHANGELOG.md
)
endif() Which is more or less the CMake style of e.g. a Greetings |
Beta Was this translation helpful? Give feedback.
-
I think this is the right approach. And Pandoc is a pretty good option for this, possibly for this use case paired with one of the more light weight PDF engines rather than the default LaTeX one which is a beast. It would be completely out of scope for |
Beta Was this translation helpful? Give feedback.
-
Hi again! I am still on my pursuit to convert a git-cliff markdown (standard config including lots of emoji power) to a pdf file. This is surprisingly hard because of the missing font support for unicode and idk maybe my lack of pandoc power. However, I was remembering a 🦀 alternative to latex typst. Pandoc does support converting markdown to a typst file (this conversion seems to be relatively straight forward). The resulting Long story, short: I can now use pandoc and typst to convert a git-cliff changelog with all the emojis without worries. docker run --rm --volume $"($env.PWD):/data" pandoc/typst ./CHANGELOG.md -o CHANGELOG.pdf --pdf-engine=typst --from-markdown --no-highlight
typst compile CHANGELOG.typ
start CHANGELOG.pdf Interestingly, there seems to be a direct pdf engine keyword for this, but this again does not render the emojis If you would be open for a PR which would output a https://github.com/SabrinaJewson/cmarker.typ/blob/main/src/lib.rs#L25 Greetings, Christian |
Beta Was this translation helpful? Give feedback.
-
Hi!
First of all, thanks for the great crate! Thanks to
git-cliff
we actually keep a changelog via our commits. Otherwise, for sure we would not have a consistent changelog in our project.I have a general question. Has anyone suggestions about converting the markdown to a pdf. Currently, we use a separate postprocessing step using pandoc. Do you have an alternative approach for me by chance?
Greetings, Christian
Beta Was this translation helpful? Give feedback.
All reactions