Skip to content

Commit

Permalink
Merge branch 'use-highlightlib-without-cgo' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
RaphaelPour committed Mar 26, 2022
2 parents 78b8a14 + 5a6eac9 commit 7e14489
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 5 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: release

on:
push:
tags:
- '*'

jobs:
build:
name: Relase blogctl
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, darwin]
goarch: [amd64]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
- name: install task
run: curl -Ls https://git.io/ttask.sh | sh
- run: ./bin/task bin
- run: mv ci-build/blogctl ci-build/blogctl_${{ matrix.os-name }}
- uses: actions/upload-artifact@master
with:
name: build-artifacts
path: ci-build
release:
name: Relase blogctl
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/download-artifact@master
with:
name: build-artifacts
path: ci-build
- run: ls ci-build
2 changes: 1 addition & 1 deletion .github/workflows/go.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: hcloud-ruby ci
name: test
on: [push]
jobs:
test:
Expand Down
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# For next release
# Minor Release v0.3.0 (2022-03-23)
* **Raphael Pour**
* render: add navigation with previous+next post and home
* **Tch1b0**
* render: add syntax-highlighting for code-blocks
*Not released yet*
*Released by Raphael Pour <info@raphaelpour.de>*

# Minor Release v0.2.0 (2022-01-13)
* **Raphael Pour**
Expand Down
2 changes: 1 addition & 1 deletion Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ tasks:
ignore_error: yes
- git add CHANGELOG.md
- git commit -m "Bump version to $(changelogger release last --version-only)" -m "$(changelogger release last)"
- git tag -a "$(changelogger release last --version-only)" -m "Version: $(changelogger release last)"
- 'git tag -a "$(changelogger release last --version-only)" -m "Version: $(changelogger release last)"'
- git push
- git push --tags
env:
Expand Down
1 change: 0 additions & 1 deletion cmd/render.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,6 @@ const (
h1 { margin:0px;}
.date { margin-top:10px;font-size: small; color: gray; }
.post { margin-top:10px;}
/* CODE STYLES */
/* Background */ .bg { background-color: #ffffff }
/* PreWrapper */ .chroma { background-color: #ffffff; }
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ go 1.14
require (
github.com/alecthomas/chroma v0.10.0
github.com/fatih/color v1.13.0
github.com/gijsbers/go-pcre v0.0.0-20161214203829-a84f3096ab3c // indirect
github.com/gomarkdown/markdown v0.0.0-20211212230626-5af6ad2f47df
github.com/gorilla/feeds v1.1.1
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
Expand Down
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490/go.mod h1:eXthEFrGJvWH
github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/d4l3k/go-highlight v0.0.0-20170131091508-34974ebcad41 h1:ftH2zX4hxCODAd5TgiDeAQi8OgJkWw+dTmYkyMZero4=
github.com/d4l3k/go-highlight v0.0.0-20170131091508-34974ebcad41/go.mod h1:KC2fmY1miEAipbeOZ5dY4PZha/jHkqn6IosSy/lXxCc=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand All @@ -113,6 +115,8 @@ github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w=
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/gijsbers/go-pcre v0.0.0-20161214203829-a84f3096ab3c h1:o5z/Stj4aWUiDiCVFdEOgXcwNF+Z7mQSlvDTaWBK98Q=
github.com/gijsbers/go-pcre v0.0.0-20161214203829-a84f3096ab3c/go.mod h1:Bd83Kcti1U5OMXYYTjilhd6os+l6AmlTMVbDtaBvycQ=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
Expand Down
1 change: 1 addition & 0 deletions pkg/highlighter/highlighter.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ func renderHook(w io.Writer, node ast.Node, entering bool) (ast.WalkStatus, bool

// get the language of the code from the top of the code-block
codeLanguage := string(node.(*ast.CodeBlock).Info)

lexer := lexers.Get(codeLanguage)
if lexer == nil {
lexer = lexers.Fallback
Expand Down

0 comments on commit 7e14489

Please sign in to comment.