File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55 "scripts" : {
66 "dev" : " astro dev" ,
77 "dev:docs" : " cd docs/ && retype watch" ,
8- "build" : " astro build" ,
8+ "build" : " yarn clean && astro build" ,
9+ "build:adapt" : " ./scripts/adapt-website" ,
910 "build:docs" : " cd docs/ && yarn build" ,
10- "build:all" : " yarn clean && yarn build && yarn build-docs && ./scripts/setup-docs.sh" ,
11+ "build:all" : " yarn build && yarn build-docs && ./scripts/setup-docs.sh && yarn build:adapt " ,
1112 "clean" : " rm -rf ./build"
1213 },
1314 "devDependencies" : {
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ # Website and Docs adaptation
4+
5+ echo " ${cyan} [$0 ] ${green} Starting website/docs adaptation..."
6+ echo
7+
8+ echo " ${cyan} [$0 ] ${green} Removing '.nojekyll' file"
9+ rm -rf ./build/docs/.nojekyll
10+
11+ # # Try to unzip and modify the 'sitemap.xml.gz' file.
12+ if ! type gunzip; then
13+ # # If command 'gunzip' don't exist. Just remove the file.
14+ echo " ${cyan} [$0 ] ${green} <gunzip> command not found! Removing 'sitemap.xml.gz' file"
15+ rm -rf ./build/docs/sitemap.xml.gz
16+ else
17+ echo " ${cyan} [$0 ] ${green} Unzipping 'sitemap.xml.gz' file"
18+ gunzip ./build/docs/sitemap.xml.gz
19+ echo " ${cyan} [$0 ] ${green} Replacing '.id/' with '.id/docs/'"
20+ echo " ${cyan} [$0 ] ${green} Moving 'sitemap.xml.gz' file to './build/sitemap-1.xml'"
21+ sed ' s#.id/#.id/docs/#' ./build/docs/sitemap.xml > ./build/sitemap-1.xml
22+
23+ echo " ${cyan} [$0 ] ${green} Adding 'https://hawapi.theproject.id/sitemap-1.xml' to './build/docs/robots.txt'"
24+ echo ' Sitemap: https://hawapi.theproject.id/sitemap-1.xml' >> ./build/docs/robots.txt
25+ fi
26+
27+ echo " ${cyan} [$0 ] ${green} Moving 'robots.txt' to './build/robots.txt'"
28+ sed ' s/sitemap.xml.gz/sitemap-0.xml/' ./build/docs/robots.txt > ./build/robots.txt
29+ rm -rf ./build/docs/robots.txt
30+ rm -rf ./build/sitemap-index.xml
You can’t perform that action at this time.
0 commit comments