Closed SeniorMars closed 5 months ago
I'll squash in a bit lol.
this is awful, sorry. Please when you are about to github's ""Squash and Merge"". BUt this is good work.
Thanks for all the new features, I really like them. Just some minor changes and then we can merge it :)
Okay, so:
to enable something like this we need
repo_url = "https://github.com/SeniorMars/seniormars.com/blob/main/content/"
in config.toml and then
in your article:
[extra]
repo_view = true
read_time = true
this comes from https://github.com/SeniorMars/redux/blob/0b6dcb48f74a24b4eaac9052db96d4ef6a984774/templates/macros/macros.html#L124
and https://github.com/SeniorMars/redux/blob/0b6dcb48f74a24b4eaac9052db96d4ef6a984774/templates/macros/macros.html#L110
. I made sure to error handle.
then I renamed clipboard
to fancy_code
as I realized that the code label also needed some js to move the label when the code is too long.
Furthermore, I added h_anchor_link = true
which generates anchor tags for h1, h2, etc. I made sure to disable everything by default.
Finally, I fixed some CSS and some unexpected behavior.
Looks good! Thanks :)
Apologies since there are supposed to be separate PRs but I working on this at the same time.
Solves: #53