Skip to content

Commit

Permalink
🎶 [gh-md-toc] github-markdown-toc.goに乗り換え
Browse files Browse the repository at this point in the history
  • Loading branch information
noranuko13 committed May 9, 2023
1 parent 2ad62bf commit 7c5c264
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
@@ -1,7 +1,7 @@
# Image
FROM ubuntu
RUN apt-get update -qq && apt-get install -y wget curl
FROM golang:1.20.4
RUN apt-get update -qq && apt-get install -y wget

# gh-md-toc
RUN wget https://raw.githubusercontent.com/ekalinin/github-markdown-toc/661b5c5111f47174e2d9092c8d76867e5a1f249d/gh-md-toc
RUN chmod a+x gh-md-toc
RUN wget https://github.com/ekalinin/github-markdown-toc.go/releases/download/v1.2.1/gh-md-toc_1.2.1_linux_amd64.tar.gz
RUN tar xzvf gh-md-toc_1.2.1_linux_amd64.tar.gz
2 changes: 1 addition & 1 deletion docker-compose.yml
@@ -1,4 +1,4 @@
# docker compose run cv ./curriculum-vitae/toc.sh
# docker compose run cv /bin/bash /curriculum-vitae/toc.sh

version: '3'
services:
Expand Down
2 changes: 1 addition & 1 deletion toc.sh
Expand Up @@ -46,7 +46,7 @@ patterns+=("s/\*\s/- /")

# コンソール出力
tmp=$(mktemp)
/gh-md-toc --indent 2 /curriculum-vitae/README.md > "$tmp"
./gh-md-toc --indent=2 /curriculum-vitae/README.md > "$tmp"
(for f in "${patterns[@]}" ; do sed -ie "$f" "$tmp"; done)
cat "$tmp"
rm "$tmp"

0 comments on commit 7c5c264

Please sign in to comment.