Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4069bafd52 | |||
| 9dbd41392e | |||
| 35eac48dcd |
@@ -122,19 +122,16 @@ jobs:
|
|||||||
CHECKSUM=$(sha256sum kewt-binary | awk '{print $1}')
|
CHECKSUM=$(sha256sum kewt-binary | awk '{print $1}')
|
||||||
rm -f kewt-binary
|
rm -f kewt-binary
|
||||||
|
|
||||||
|
git clone https://x-access-token:${{ secrets.GH_RELEASE_TOKEN }}@github.com/n0va-bot/homebrew-tap.git brew-work || true
|
||||||
mkdir -p brew-work/Formula
|
mkdir -p brew-work/Formula
|
||||||
sed -e "s/VERSION_PLACEHOLDER/${VERSION}/g" \
|
sed -e "s/VERSION_PLACEHOLDER/${VERSION}/g" \
|
||||||
-e "s/SHA256SUM_PLACEHOLDER/${CHECKSUM}/g" \
|
-e "s/SHA256SUM_PLACEHOLDER/${CHECKSUM}/g" \
|
||||||
packaging/homebrew/kewt.rb.template > brew-work/Formula/kewt.rb
|
packaging/homebrew/kewt.rb.template > brew-work/Formula/kewt.rb
|
||||||
|
|
||||||
cd brew-work
|
cd brew-work
|
||||||
git init
|
[ -d .git ] || { git init && git checkout --orphan main && git remote add origin https://x-access-token:${{ secrets.GH_RELEASE_TOKEN }}@github.com/n0va-bot/homebrew-tap.git; }
|
||||||
git remote add origin https://x-access-token:${{ secrets.GH_RELEASE_TOKEN }}@github.com/n0va-bot/homebrew-tap.git
|
|
||||||
git fetch origin main || true
|
|
||||||
git checkout main 2>/dev/null || git checkout --orphan main
|
|
||||||
|
|
||||||
git add Formula/kewt.rb
|
git add Formula/kewt.rb
|
||||||
git config user.name "${{ github.actor }}"
|
git config user.name "${{ github.actor }}"
|
||||||
git config user.email "${{ github.actor }}@users.noreply.github.com"
|
git config user.email "${{ github.actor }}@users.noreply.github.com"
|
||||||
git commit -m "Update kewt to ${TAG}" || echo "No changes to commit"
|
git commit -m "Update kewt to ${TAG}" || echo "No changes to commit"
|
||||||
git push origin main
|
git push -u origin main
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
_kewt_ is a minimalist ssg inspired by _[werc](http://werc.cat-v.org/)_ and _[kew](https://github.com/uint23/kew)_
|
_kewt_ is a minimalist ssg inspired by _[werc](http://werc.cat-v.org/)_ and _[kew](https://github.com/uint23/kew)_
|
||||||
|
|
||||||
|
|
||||||
## [Installation](https://kewt.krzak.org/#Installation)
|
## [Installation](https://kewt.krzak.org/#installation)
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ BEGIN {
|
|||||||
in_pre = 0
|
in_pre = 0
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
if ($0 ~ /^<pre><code>/) {
|
if ($0 ~ /^<pre><code/) {
|
||||||
in_pre = 1
|
in_pre = 1
|
||||||
if (has_prev && prev != "") { print_header(prev); has_prev = 0 }
|
if (has_prev && prev != "") { print_header(prev); has_prev = 0 }
|
||||||
print
|
print
|
||||||
|
|||||||
10
kewt.sh
10
kewt.sh
@@ -693,7 +693,7 @@ render_markdown() {
|
|||||||
if [ "$rel_dir_of_file" = "$posts_dir" ]; then
|
if [ "$rel_dir_of_file" = "$posts_dir" ]; then
|
||||||
temp_post_with_backlink="$KEWT_TMPDIR/post_with_backlink.md"
|
temp_post_with_backlink="$KEWT_TMPDIR/post_with_backlink.md"
|
||||||
printf "[< Back](index.html)\n\n" > "$temp_post_with_backlink"
|
printf "[< Back](index.html)\n\n" > "$temp_post_with_backlink"
|
||||||
cat "$file" >> "$temp_post_with_backlink"
|
awk -f "$awk_dir/frontmatter.awk" "$file" >> "$temp_post_with_backlink"
|
||||||
content_file="$temp_post_with_backlink"
|
content_file="$temp_post_with_backlink"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@@ -743,7 +743,13 @@ render_markdown() {
|
|||||||
fi
|
fi
|
||||||
head_extra=""
|
head_extra=""
|
||||||
if [ -n "$favicon_src" ]; then
|
if [ -n "$favicon_src" ]; then
|
||||||
head_extra="<link rel=\"icon\" href=\"$favicon_src\" />"
|
if echo "$favicon_src" | grep -q "^http"; then
|
||||||
|
head_extra="<link rel=\"icon\" href=\"$favicon_src\" />"
|
||||||
|
elif echo "$favicon_src" | grep -q "^/"; then
|
||||||
|
head_extra="<link rel=\"icon\" href=\"$favicon_src\" />"
|
||||||
|
else
|
||||||
|
head_extra="<link rel=\"icon\" href=\"/$favicon_src\" />"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
parse_frontmatter "$file"
|
parse_frontmatter "$file"
|
||||||
|
|||||||
Reference in New Issue
Block a user