Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
rsk0315 committed Dec 9, 2023
1 parent 4fe8a41 commit aa4c625
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hatenablog/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
all:
@zsh make.zsh
9 changes: 9 additions & 0 deletions hatenablog/make.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
for js in js/*.js; do
sha=$(cat $js | sha384sum | tr a-f A-F | awk '$0=$1' | basenc -d --base16 | base64)
print -r "<script defer src=\"https://rsk0315.github.io/hatenablog/$js\" integrity=\"sha384=${sha}\" crossorigin=\"anonymous\"></script>"
done

for css in css/*.css; do
sha=$(cat $css | sha384sum | tr a-f A-F | awk '$0=$1' | basenc -d --base16 | base64)
print -r "<link rel=\"stylesheet\" href=\"https://rsk0315.github.io/hatenablog/$css\" integrity=\"sha384-${sha}\" crossorigin=\"anonymous\">"
done

0 comments on commit aa4c625

Please sign in to comment.