Skip to content

Commit

Permalink
Better directory listing
Browse files Browse the repository at this point in the history
  • Loading branch information
Xerbo committed Jul 21, 2022
1 parent 9d9c7db commit ebb958c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,15 @@ jobs:
path: satfreq.json

- name: Generate json/ directory listing
run: cd json && (echo '<!DOCTYPE html><html><body><ul>'; for i in *; do echo "<li><a href=\"$i\">$i</a></li>"; done; echo '</ul></body></html>') > index.html
run: |
cd json &&
(echo '<!DOCTYPE html><html><body><ul><li><a href="..">..</a></li>'
for i in *; do
if [ "$i" != "index.html" ]; then
echo "<li><a href=\"$i\">$i</a></li>"
fi
done
echo '</ul></body></html>') > index.html
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
satfreq.json
json/index.html
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ <h2>Downlinks:</h2>
<footer>
<a href="https://github.com/sgcderek/satfreq">GitHub repository</a><br/>
<a href="json/">Raw JSON files</a><br/>
<a href="data/satfreq.json">Raw JSON catalogue</a><br/>
<a href="satfreq.json">Raw JSON catalogue</a><br/>
</footer>
</nav>
<main>
Expand Down

0 comments on commit ebb958c

Please sign in to comment.