Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
WHLukasz committed Nov 9, 2023
1 parent 8e3ae17 commit e46856e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,11 @@ jobs:
gatsby build --prefix-paths
rm -rf public/blog
mkdir -p public/blog
./remove_gatsby_script.sh
find public/ -maxdepth 1 -mindepth 1 -not -name blog -exec mv '{}' public/blog/ \;
# find public/blog -name index.html -exec sed -i 's\window.pagePath="\window.pagePath="/blog\g' {} \;
- name: Remove gatsby script custom bash
run: bash ./remove_gatsby_script.sh
- name: Cloudflare
run: |
npm install -g @cloudflare/wrangler
Expand Down
6 changes: 6 additions & 0 deletions remove_gatsby_script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
directory="./public"

find "$directory" -type f -name "*.html" -print0 | while IFS= read -r -d $'\0' file; do

sed -i 's\<script id="gatsby-script-loader">.*</script><script id="gatsby-chunk-mapping">\<script id="gatsby-chunk-mapping">\g' "$file"
done

0 comments on commit e46856e

Please sign in to comment.