Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.2.0 docs changes #581

Merged
merged 8 commits into from
Dec 10, 2019
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions START.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Thar, the Operating System

Welcome to the Thar private preview! Thar is a free and open-source Linux-based operating system meant for hosting containers.

Documentation available on this microsite:

- [README.md](README.md) — Read this first!
- [INSTALL.md](INSTALL.md#using-a-thar-ami) — Set up a Thar cluster
- [dogswatch README.md](extras/dogswatch/README.md) — Set up and use the Kubernetes operator for Thar updates
- [CHANGELOG.md](CHANGELOG.md) — Changes between published versions
16 changes: 15 additions & 1 deletion tools/gen-docs.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
#!/bin/bash
DOCS=(START.md README.md INSTALL.md CHANGELOG.md extras/dogswatch/README.md)
EXTRAS=(extras/dogswatch/{dogswatch,dev/deployment}.yaml)

if ! hash grip; then
>&2 echo "grip is not installed, run 'pip3 install --user grip'"
exit 1
fi

top=$(git rev-parse --show-toplevel)
mkdir -p "${top}/html"
for doc in README.md INSTALL.md CHANGELOG.md; do
for doc in "${DOCS[@]}"; do
out="${top}/html/${doc%.md}.html"
mkdir -p "$(dirname "$out")"
grip --title="${doc}" --export \
<(
cat <<'EOF'
Expand All @@ -16,6 +20,8 @@ for doc in README.md INSTALL.md CHANGELOG.md; do
is via [[email protected]](mailto:[email protected])
or #thar-preview on the [awsdevelopers Slack workspace](https://awsdevelopers.slack.com) (email us for an invite).
We'd love to talk with you and hear your feedback on Thar!
<br><br>
[&larr; Documentation index](/START.md)

---

Expand All @@ -27,5 +33,13 @@ EOF
-e '/<link rel="stylesheet".*octicons\.css/d' \
-e '/<link rel="icon"/d' \
-e 's/<p>@@THAR-SENTINEL-START@@/<p style="background-color: #a8dfee; border: 1px solid #008296; padding: 1em;">/' \
-e 's/<a href="\([^ ">]*\).md/<a href="\1.html/g' \
-e 's^<a href="\.\./\.\./pull/[^ >]*">\(#[0-9]\+\)</a>^\1^g' \
iliana marked this conversation as resolved.
Show resolved Hide resolved
"${out}"
done

for extra in "${EXTRAS[@]}"; do
out="${top}/html/${extra}"
echo "Copying ${extra} to ${out}"
install -D "${extra}" "${out}"
done