-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1c77cf3
commit 56a5f11
Showing
3 changed files
with
50 additions
and
0 deletions.
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 |
---|---|---|
|
@@ -4,3 +4,8 @@ | |
.Ruserdata | ||
.DS_Store | ||
.Renviron | ||
|
||
/.quarto/ | ||
/_site/ | ||
_quarto.yml | ||
styles.css |
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 |
---|---|---|
|
@@ -4,4 +4,7 @@ | |
.Renviron | ||
.rhino | ||
.rscignore | ||
build_local_docs.sh | ||
docs | ||
img | ||
tests |
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,42 @@ | ||
#!/bin/bash | ||
|
||
# This script is used to build the local documentation for the project. | ||
|
||
remove_files() { | ||
if [ -f _quarto.yml ]; then | ||
echo "Removing _quarto.yml..." | ||
rm _quarto.yml | ||
fi | ||
|
||
if [ -f styles.css ]; then | ||
echo "Removing styles.css..." | ||
rm styles.css | ||
fi | ||
} | ||
|
||
cleanup() { | ||
echo "Cleaning up..." | ||
remove_files | ||
exit 1 | ||
} | ||
|
||
trap cleanup SIGINT | ||
|
||
if [ "$1" = "preview" ]; then | ||
echo "Copying _quarto.yml..." | ||
cp docs/_quarto.yml _quarto.yml | ||
echo "Copying styles.css..." | ||
cp docs/styles.css styles.css | ||
|
||
echo "Building local documentation preview..." | ||
quarto preview | ||
elif [ "$1" = "render" ]; then | ||
echo "Copying _quarto.yml..." | ||
cp docs/_quarto.yml _quarto.yml | ||
echo "Copying styles.css..." | ||
cp docs/styles.css styles.css | ||
|
||
echo "Rendering local documentation..." | ||
quarto render | ||
remove_files | ||
fi |