Skip to content

Commit

Permalink
doc: opengraph postprocessor
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube committed Dec 15, 2024
1 parent 4153ccc commit e26fe09
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ jobs:
mdbook build docs
sh .github/badge.sh > docs/book/badge.svg
sh .github/macros-badge.sh > docs/book/macros-badge.svg
sh .docs/postprocessor/opengraph.sh
- name: "push gh-pages"
if: github.ref == 'refs/heads/master'
Expand Down
2 changes: 1 addition & 1 deletion docs/book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ language = "en"
multilingual = false
src = "src"
title = "carapace-bin"
description = "A multi-shell multi-command completion binary. Supports Bash, Elvish, Fish, Nushell, Oil, Powershell, Xonsh and Zsh."
description = "A multi-shell completion binary."

[output.html]
default-theme = "Latte"
Expand Down
10 changes: 10 additions & 0 deletions docs/postprocessor/opengraph.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
set -e pipefail

cd "$(dirname "$(readlink -f "$0")")/../book/html/release_notes/"
ls *.html \
| sed 's/.html$//' \
| xargs -I'{}' \
sed --in-place \
'/<head>/a <meta property="og:image" content="https://carapace-sh.github.io/carapace-bin/release_notes/{}/banner.png" />' \
'{}.html'
2 changes: 1 addition & 1 deletion docs/src/release_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
Release notes contain _noteworthy_ changes between **minor** (`1.x`) releases.

> These aren't strictly pinned to **tags**.
> So a feature announced as `1.n` might already be present in a previous or added in a later **patch** (`1.x.x`) release.
> So a feature announced as `1.n` might already be present in a previous (`1.{n-1}.x`) or added in a later (`1.n.x`) **patch** release.
>
> See [releases](https://github.com/carapace-sh/carapace-bin/releases) for an exact changelog.

0 comments on commit e26fe09

Please sign in to comment.