-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from rukai/build_script
Move build script out of netlify
- Loading branch information
Showing
2 changed files
with
40 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,13 @@ | ||
# Shotover Blog | ||
# Shotover Website contents | ||
|
||
Contents for https://shotover.io | ||
|
||
For changes to https://shotover.io work on `docs/index.html`. | ||
|
||
For changes to docs, please see https://github.com/shotover/shotover-proxy | ||
|
||
## Building | ||
|
||
TODO: Fully document how to build this locally. | ||
|
||
For now you should start with running the build.sh script |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
set -u | ||
|
||
rm docs/docs/*.md | ||
rm -rf docs/docs/examples | ||
rm -rf docs/docs/user-guide | ||
git clone https://github.com/shotover/shotover-proxy.git | ||
mv shotover-proxy/docs/src/* docs/docs/ | ||
rm -rf shotover-proxy | ||
cd docs/docs/ | ||
find . -type f -name "*.md" -exec sed -i 's/```YAML/```yaml/g' {} + | ||
find . -type f -name "*.md" -exec sed -i 's/```console/```make/g' {} + | ||
rm logo.png logo.svg index.md SUMMARY.md | ||
cd ../../ | ||
npm install --frozen-lockfile | ||
echo "<Footer />" | tee -a docs/blog/*.md | ||
echo "<Footer />" | tee -a docs/docs/*.md | ||
echo "<SocialButtons /><RelatedPosts /><Footer />" | tee -a docs/blog/**/*.md | ||
echo "<Footer />" | tee -a docs/docs/**/*.md | ||
npm run docs:build | ||
cd docs/.vitepress/ | ||
mkdir shotover-blog | ||
mv dist/* shotover-blog | ||
mv shotover-blog dist/ | ||
mv dist/shotover-blog/index.html dist/ |