initial commit
56
.github/workflows/arise-deploy.yml
vendored
Normal file
|
|
@ -0,0 +1,56 @@
|
||||||
|
# .github/workflows/arise-deploy.yml
|
||||||
|
name: Deploy Arise to html branch
|
||||||
|
|
||||||
|
on:
|
||||||
|
# Runs on pushes targeting the default branch
|
||||||
|
# Only runs when the push contains changes to the site source itself. No need to rebuild the site if it's just program files that have changed.
|
||||||
|
push:
|
||||||
|
branches: ["main"]
|
||||||
|
paths: ['arise-source/**']
|
||||||
|
|
||||||
|
# Allows you to run this workflow manually from the Actions tab
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
# Default to bash
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: Deploy Arise
|
||||||
|
steps:
|
||||||
|
- name: Check if we should deploy to prod or staging
|
||||||
|
run: |
|
||||||
|
echo "SMART DEPLOY"
|
||||||
|
echo "============"
|
||||||
|
echo "We only want to deploy to prod if the branch that triggered this workflow is 'main'. Otherwise, we want the site to be deployed to staging..."
|
||||||
|
echo ""
|
||||||
|
if [[ $GITHUB_REF == 'refs/heads/main' ]]; then
|
||||||
|
# Feel free to change the value of OUTPUT_BRANCH. This is where Arise artefacts will be deployed for production.
|
||||||
|
echo "OUTPUT_BRANCH=html" >> "$GITHUB_ENV"
|
||||||
|
echo "Workflow running from main branch. Pushing results to production deployment branch (html)."
|
||||||
|
else
|
||||||
|
# Feel free to change the value of OUTPUT_BRANCH. This is where Arise artefacts will be deployed for staging.
|
||||||
|
echo "OUTPUT_BRANCH=html-staging" >> "$GITHUB_ENV"
|
||||||
|
echo "Workflow running from a development branch. Pushing results to staging deployment branch (html-staging)."
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: git-checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install pandoc
|
||||||
|
run: sudo apt-get install -y pandoc
|
||||||
|
|
||||||
|
- name: Build Arise
|
||||||
|
run: bash arise build
|
||||||
|
|
||||||
|
- name: Push to live branch
|
||||||
|
uses: s0/git-publish-subdir-action@develop
|
||||||
|
env:
|
||||||
|
REPO: self
|
||||||
|
BRANCH: ${{ env.OUTPUT_BRANCH }} # If you want to change this, change it in the step above. This allows us to intelligently deploy to production from main or staging if we're on a dev branch.
|
||||||
|
FOLDER: arise-out # The Arise build output location. Don't change this.
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Handled automatically -- Don't change this unless you're pushing to a different repo
|
||||||
|
MESSAGE: "Commit: ({sha}) {msg}" # Copies commit msg from main to the deploy version branch
|
||||||
39
.github/workflows/ci-xml-reserved-characters.yml
vendored
Normal file
|
|
@ -0,0 +1,39 @@
|
||||||
|
# .github/workflows/ci-xml-reserved-characters.yml
|
||||||
|
name: CI Test - XML Reserved Character Metadata Sanitisation
|
||||||
|
|
||||||
|
on:
|
||||||
|
# Runs on everything except the main branch since this is only a concern for dev.
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- '**'
|
||||||
|
- '!main'
|
||||||
|
|
||||||
|
# Allows you to run this workflow manually from the Actions tab
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
# Allow one concurrent deployment
|
||||||
|
concurrency:
|
||||||
|
group: "xml-reserved-characters"
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
# Default to bash
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: Check XML Sanitisation
|
||||||
|
steps:
|
||||||
|
- name: git-checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install pandoc
|
||||||
|
run: sudo apt-get install -y pandoc
|
||||||
|
|
||||||
|
- name: Build Arise
|
||||||
|
run: bash arise build
|
||||||
|
|
||||||
|
- name: Run test suite
|
||||||
|
run: bash ci/xml-reserved-characters.sh
|
||||||
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
arise-out/
|
||||||
1233
LICENSE/README.md
Normal file
103
README.md
Normal file
|
|
@ -0,0 +1,103 @@
|
||||||
|

|
||||||
|
|
||||||
|
# Arise // Bash Static Site Generator
|
||||||
|
*Cyberpunk websites for the modern web.*
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
There was a time before React, before Wordpress, and before even javascript and php. And the webmasters who ran the 'net back then made do with what they had. They wrangled their webservers to the fullest and they hacked together sites that could do what they need.
|
||||||
|
|
||||||
|
The web has grown up a lot since then, but the mentality of "move fast and break things" has created a landscape of flaky tools never meant to last more than a few years without constant laborious maintenance. You should be able to run a functional and pleasant website without needing to be a fully staffed corporate webdev team.
|
||||||
|
|
||||||
|
The goal of Arise is to take the lessons of yesteryear and make something novel. Arise is a cloud-native static site generator written in Bash, designed to be a fusion of ultra-stable 90s technology and modern DevOps paradigms. Arise is designed around use cases like individual blogs and personal websites.
|
||||||
|
|
||||||
|
## Why Use Arise
|
||||||
|
|
||||||
|
Arise is written in Bash with very few dependencies outside of the standard GNU toolchain. Arise is designed with long term simplicity and maintainability in mind. Beyond just being a static site generator that doesn't suck, the core development philosphy behind Arise is to minimise the risk of breaking in the near future due to language or dependency updates.
|
||||||
|
|
||||||
|
Arise supports modern SEO features that are built into your pages out of the box without any extra effort necessary:
|
||||||
|
- [OpenGraph](https://ogp.me/) and [TwitterCard](https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards) support for rich embed details
|
||||||
|
- Dynamically generated RSS feed
|
||||||
|
- Dynamically generated search engine sitemap
|
||||||
|
|
||||||
|
Arise is built to be practical and let you build a multi-page website that actually has real content on it. Arise uses a modular page architecture with support for dynamically generated metadata-rich index pages to keep your site hierarchy traversable by end users.
|
||||||
|
|
||||||
|
## Live Example
|
||||||
|
|
||||||
|
A live demo of Arise can be found at https://ari.se.net
|
||||||
|
|
||||||
|
The example site is actually deployed straight from this repository, so the contents you see there are exactly what you get if you were to fork this exact repo and host it yourself.
|
||||||
|
|
||||||
|
## Getting Started / Documentation
|
||||||
|
|
||||||
|
All of the documentation for getting started with Arise can be found within this repository.
|
||||||
|
|
||||||
|
- [Getting Started with Arise](docs/guides/getting-started/README.md)
|
||||||
|
- [Cloudflare Pages](docs/guides/getting-started/cloudflare/README.md)
|
||||||
|
- [DigitalOcean](docs/guides/getting-started/digitalocean/README.md)
|
||||||
|
- [GitHub Pages](docs/guides/getting-started/github-pages/README.md)
|
||||||
|
- [Creating Arise Pages](docs/guides/creating-arise-pages/README.md)
|
||||||
|
- [Running Arise Locally](docs/guides/running-arise-locally/README.md)
|
||||||
|
|
||||||
|
## Dependencies
|
||||||
|
- Bash 5.1
|
||||||
|
- **Used for:** 😐
|
||||||
|
- **Why:** Do you see what language this program is written in?
|
||||||
|
- [pandoc](https://pandoc.org/)
|
||||||
|
- **Used for:** `build_page` - Function that builds pages from a `.md` source file
|
||||||
|
- **Why:** Arise uses Pandoc for conversion of Markdown to HTML. If your source pages are already in HTML and you don't need Markdown conversion, you can disable Markdown conversion on individual pages with the use of an Arise page option (see above).
|
||||||
|
- GNU `date`
|
||||||
|
- **Used for:** `build_rss` - RSS feed generator function
|
||||||
|
- **Why:** You see, RSS is kind of ridiculous because it asks for dates in RFC-822 (stupid) rather than the usual ISO 8601 format used by developers who weren't dropped on their head as a child. GNU's implementation of the date command has a flag to accomodate this, but it's not available on BSD/macOS.
|
||||||
|
- GNU `find`
|
||||||
|
- **Used for:** `build_toc` - Function that builds TOC/index pages
|
||||||
|
- **Why:** Only the GNU version supports `-maxdepth`. This flag is used for the TOC indexer function to ensure that only folders in the current directory (and not subfolders of those) get put into your indices.
|
||||||
|
- GNU `awk`
|
||||||
|
- **Used for:** `evaluate_inline` - Function that performs inline bash snippet evaluations. This is disabled by default because this functionality is still WIP.
|
||||||
|
- **Why:** Using `awk` in any capacity is the equivalent of staring into a horrific eldrich abyss not meant for mere mortals. Making those commands portable is another story entirely.
|
||||||
|
- `sed`
|
||||||
|
- **Used for:**
|
||||||
|
- `get_page_metadata` - Used to pull out the metadata header in Arise markdown files for further processing. Also used for cleaning up relative URLs generated from folder hierarchy.
|
||||||
|
- `build_page` - Used to pull out the metadata header in Arise markdown files for further processing.
|
||||||
|
- `build_sitemap` - Used to clean up URLs into the tags RSS wants them in.
|
||||||
|
- `evaluate_inline` - Yeah, I don't even want to think about the horrors I wrote in this function. It's not currently in use, and I'm pretty sure it will get a full rewrite before it becomes active, IF it becomes active...
|
||||||
|
- **Why:** `sed` is useful for parsing data out of blocks of text quickly and easily. However, much dogfooding has revealed that `sed` tends to be pretty unsuited for this application. As such, it is largely on the chopping block for replacement with native Bash pattern matching where possible.
|
||||||
|
|
||||||
|
## CI Testing
|
||||||
|
|
||||||
|
For development purposes, we use CI testing to ensure that new code changes don't break Arise while in development. CI-related scripts are bundled in `/ci` and CI-related workflows are named with the convention of `/.github/workflows/ci-*`. **As a non-maintainer who is not making modifications to the Arise source code, you can simply delete (or just ignore) the CI tests if you don't need them.**
|
||||||
|
|
||||||
|
In order to maximise the amount of [dogfooding](https://en.wikipedia.org/wiki/Eating_your_own_dog_food) we do in testing, CI tests are run against actual pages bundled as part of the default website (https://ari.se.net). This means that once you replace the default site with your own custom website, the CI tests will break because the dummy pages they rely on no longer exist.
|
||||||
|
|
||||||
|
## Wishlist / To-Do / Feature Ideas
|
||||||
|
- Refactor inline bash evaluation function and enable its usage. Right now it only works on very tiny/simple snippets. The main reason I wrote the logic was because I thought it would be funny to implement (it was). Some refactoring is absolutely necessary to make this feature practical/useful and not just a good meme.
|
||||||
|
- Allow inline bash evaluations in the site headers and footers
|
||||||
|
- Add support for metadata tag usage in the site footer.
|
||||||
|
- Move the hardcoded TOC formatting in `build_toc` into a configurable template within `.config`
|
||||||
|
- Bundle and implement [Markdown.pl](https://daringfireball.net/projects/markdown/) as a fallback rendering engine for systems that do not have pandoc installed.
|
||||||
|
- Add support for inline include statements for html snippets saved in the `/config` folder so that it's possible to write reusable little bits for pages.
|
||||||
|
- Implement better error handling. Right now it's wishy washy and in many ways basically nonexistent-- most stuff will silently error or otherwise not gracefully cause an abort.
|
||||||
|
- As far as dependency checks, right now it only checks if your bash version is good. Maybe could consider implementing checks for the other dependencies. It's really hard to determine if something is GNU or not, though.
|
||||||
|
|
||||||
|
## License, Disclaimers, and Acknowledgements
|
||||||
|
All the legal bulldrek relevant to this repository can be found [here](LICENSE/README.md).
|
||||||
|
|
||||||
|
A summary\* of the license terms (which is not a substitute for the above-linked licensing information itself) is:
|
||||||
|
- The example site is MIT License
|
||||||
|
- **TL;DR:** You can edit and do whatever with it. Go crazy, choom. You can license your own website built off my example however you damn please.
|
||||||
|
- The logo is Creative Commons CC-BY-SA 4.0
|
||||||
|
- **TL;DR:** You can do what you want with it as long as you let anyone else do the same with any derivatives you redistribute.
|
||||||
|
- All the Arise code itself is AGPL 3.0
|
||||||
|
- **TL;DR:** You have to give people a copy of your version of the source code if you modify and/or redistribute it in any way when you use it to create and deploy your website.
|
||||||
|
- If you don't modify the Arise software code itself and don't redistribute it, you don't need to host the source code for other people. But, to be clear, removing the link to this repository from the help function constitutes as modification as far as AGPL is concerned.
|
||||||
|
- AGPL scares a lot of people. I'm not a lawyer and this is not legal advice, but check out [this cool article about AGPL](https://writing.kemitchell.com/2021/01/24/Reading-AGPL.html) and maybe it will make it a little less scary for you :)
|
||||||
|
|
||||||
|
\*This summary highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material. Also, I am not a lawyer and none of this is legal advice.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
*Made with 💙 by [Spectra Secure](https://twitter.com/spectrasecure)*
|
||||||
|
|
||||||
|
*Inspired by the geniuses over at [motherfuckingwebsite.com](https://motherfuckingwebsite.com/)*
|
||||||
159
arise
Normal file
|
|
@ -0,0 +1,159 @@
|
||||||
|
#!/bin/bash
|
||||||
|
######################################
|
||||||
|
# ARISE
|
||||||
|
# https://github.com/spectrasecure/arise
|
||||||
|
arise_version="1.1.0"
|
||||||
|
######################################
|
||||||
|
|
||||||
|
##############################################################
|
||||||
|
# Begin main script function
|
||||||
|
# Don't edit below this line unless you know what you're doing
|
||||||
|
##############################################################
|
||||||
|
|
||||||
|
cd "$(dirname $0)"
|
||||||
|
|
||||||
|
# Set the site config directories. Don't touch this-- changing the config location is not supported at this time
|
||||||
|
config="arise-out/config"
|
||||||
|
source arise-source/config/arise.conf
|
||||||
|
|
||||||
|
# Check if we're running a current version of bash before potentially causing code that won't run properly on ancient bash versions
|
||||||
|
[ "$BASH_VERSINFO" -lt 5 ] && echo -e 'ERROR: Arise requires Bash version 5 or greater to run. Please install a newer version of Bash or ensure that you are using the newest version installed on your computer.\n\nYour current version of Bash is: '"$BASH_VERSINFO"'\n\nYou can verify the current running version of Bash by running the following command: echo "$BASH_VERSINFO"' && exit 1
|
||||||
|
|
||||||
|
# Makes sure that our paths have or don't have a '/' as expected regardless of user input.
|
||||||
|
## Favicon should have a '/' at the start of the path.
|
||||||
|
[[ $favicon != '' ]] && [[ ${favicon:0:1} != '/' ]] && favicon='/'"$favicon"
|
||||||
|
## Base URL should not have a '/' at the end.
|
||||||
|
[[ ${base_url: -1} == '/' ]] && base_url=${base_url::-1}
|
||||||
|
|
||||||
|
# Source functions
|
||||||
|
for FILE in lib/functions/inline/* ; do [[ $FILE == *.sh ]] && source $FILE ; done
|
||||||
|
for FILE in lib/functions/subshell/* ; do [[ $FILE == *.sh ]] && source $FILE ; done
|
||||||
|
|
||||||
|
# Display our pretty logo no matter what when the program is run :)
|
||||||
|
arise_logo
|
||||||
|
|
||||||
|
# Set default build settings
|
||||||
|
force_overwrite=false
|
||||||
|
keep_source=false
|
||||||
|
|
||||||
|
# Read our arguments and set the build mode for processing. Display help if an invalid option is made.
|
||||||
|
if [[ $@ == "build" ]]; then
|
||||||
|
arise_build="full"
|
||||||
|
echo "Starting site deploy. Building full site."
|
||||||
|
elif [[ $@ == "build -k" ]]; then
|
||||||
|
arise_build="full"
|
||||||
|
keep_source=true
|
||||||
|
echo "Starting site deploy. Building full site. Source .md files will be retained in the final output."
|
||||||
|
elif [[ $@ == "build -f" ]]; then
|
||||||
|
arise_build="full"
|
||||||
|
echo "Starting site deploy. Building full site."
|
||||||
|
echo;
|
||||||
|
read -p 'WARNING: Specifying "-f" will DELETE the current contents of '"$(realpath arise-out)"'. Proceed? [y/N]: ' -n 1 -r;
|
||||||
|
echo;
|
||||||
|
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||||
|
force_overwrite=true;
|
||||||
|
else
|
||||||
|
echo 'Aborting.';
|
||||||
|
exit 1;
|
||||||
|
fi;
|
||||||
|
elif [[ $@ == "build -kf" ]] || [[ $@ == "build -fk" ]]; then
|
||||||
|
arise_build="full"
|
||||||
|
keep_source=true
|
||||||
|
echo "Starting site deploy. Building full site. Source .md files will be retained in the final output."
|
||||||
|
echo;
|
||||||
|
read -p 'WARNING: Specifying "-f" will DELETE the current contents of '"$(realpath arise-out)"'. Proceed? [y/N]: ' -n 1 -r;
|
||||||
|
echo;
|
||||||
|
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||||
|
force_overwrite=true;
|
||||||
|
else
|
||||||
|
echo 'Aborting.';
|
||||||
|
exit 1;
|
||||||
|
fi;
|
||||||
|
else
|
||||||
|
while getopts ":psrkf" options; do
|
||||||
|
case "${options}" in
|
||||||
|
p)
|
||||||
|
[[ -n "$arise_build" ]] && { arise_help; echo -e '\n\nERROR: Multiple exclusive build options detected. Aborting.'; exit 1; }
|
||||||
|
arise_build="pages_only";
|
||||||
|
echo "Starting site deploy. Building pages only.";
|
||||||
|
;;
|
||||||
|
s)
|
||||||
|
[[ -n "$arise_build" ]] && { arise_help; echo -e '\n\nERROR: Multiple exclusive build options detected. Aborting.'; exit 1; }
|
||||||
|
arise_build="sitemap_only";
|
||||||
|
echo "Starting site deploy. Building sitemap only.";
|
||||||
|
;;
|
||||||
|
r)
|
||||||
|
[[ -n "$arise_build" ]] && { arise_help; echo -e '\n\nERROR: Multiple exclusive build options detected. Aborting.'; exit 1; }
|
||||||
|
arise_build="rss_only";
|
||||||
|
echo "Starting site deploy. Building RSS feed only.";
|
||||||
|
;;
|
||||||
|
k)
|
||||||
|
keep_source=true;
|
||||||
|
echo "Source .md files will be retained in the final output."l
|
||||||
|
;;
|
||||||
|
f)
|
||||||
|
echo;
|
||||||
|
read -p 'WARNING: Specifying "-f" will DELETE the current contents of '"$(realpath arise-out)"'. Proceed? [y/N]: ' -n 1 -r;
|
||||||
|
echo;
|
||||||
|
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||||
|
force_overwrite=true;
|
||||||
|
else
|
||||||
|
echo 'Aborting.';
|
||||||
|
exit 1;
|
||||||
|
fi;
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
[[ -z "$arise_build" ]] && { arise_help; exit 1; }
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Make sure "arise_out" is empty and copy the source files over there to work from during the build process.
|
||||||
|
[[ -d arise-out ]] && [[ "$force_overwrite" == true ]] && rm -rf arise-out
|
||||||
|
mkdir -p arise-out
|
||||||
|
[[ -n "$(ls -A arise-out)" ]] && echo -e 'ERROR: The build output directory "/arise-out" is not empty. Program aborted to prevent overwrite of existing data.\n\nPlease empty the output directory before running Arise again or run your command with the "-f" flag to overwrite the existing output (dangerous).' && exit 1
|
||||||
|
cp -r "arise-source/". "arise-out"
|
||||||
|
## Set an absolute path for $config
|
||||||
|
config=$(realpath $config)
|
||||||
|
|
||||||
|
# Define a temporary file for a list of all source files for post-build cleanup
|
||||||
|
removelist="arise-out/arise-remove-$RANDOM.tmp"
|
||||||
|
touch $removelist
|
||||||
|
removelist=$(realpath $removelist)
|
||||||
|
|
||||||
|
# Run the build process depending on whatever options have been set
|
||||||
|
if [[ "$arise_build" == "full" ]] || [[ "$arise_build" == "pages_only" ]]; then
|
||||||
|
echo -n "Building pages..."
|
||||||
|
build_page_tree arise-out || { echo "ERROR: An error was encountered while building pages. Aborting build cycle."; exit 1; }
|
||||||
|
echo " DONE."
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$arise_build" == "full" ]] || [[ "$arise_build" == "rss_only" ]]; then
|
||||||
|
echo -n "Building RSS feed..."
|
||||||
|
build_rss arise-out/rss.xml || { echo "ERROR: An error was encountered while building the RSS feed. Aborting build cycle."; exit 1; }
|
||||||
|
echo " DONE."
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$arise_build" == "full" ]] || [[ "$arise_build" == "sitemap_only" ]]; then
|
||||||
|
echo -n "Building sitemap..."
|
||||||
|
build_sitemap arise-out/sitemap.xml || { echo "ERROR: An error was encountered while building the sitemap. Aborting build cycle."; exit 1; }
|
||||||
|
echo " DONE."
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$keep_source" == false ]]; then
|
||||||
|
echo -n "Cleaning up build source files from output..."
|
||||||
|
# Remove every page that we built from as part of the build cycle
|
||||||
|
while read fname; do
|
||||||
|
[[ -f "$fname" ]] && rm "$fname"
|
||||||
|
done <$removelist
|
||||||
|
# Remove site config templates
|
||||||
|
rm "$config/header.html"
|
||||||
|
rm "$config/content_header.html"
|
||||||
|
rm "$config/footer.html"
|
||||||
|
rm "$config/arise.conf"
|
||||||
|
echo " DONE."
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm $removelist
|
||||||
|
echo -e '\nBuild completed! Built artefacts have been generated at:\n'"$(realpath arise-out)"
|
||||||
BIN
arise-source/arise-icon.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
15
arise-source/config/arise.conf
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
##############################################################
|
||||||
|
# ARISE SITE CONFIG - Edit these variables to fit your website
|
||||||
|
##############################################################
|
||||||
|
|
||||||
|
# Set your base website URL here.
|
||||||
|
export base_url='https://log.thergic.ar'
|
||||||
|
|
||||||
|
# Set the path to your favicon. This should be an absolute path with reference to your siteroot.
|
||||||
|
# This variable is only used for your RSS feed, hence why it only allows up to a singular image to be set. Your primary site favicons should be configured by editing the /config/header.html file.
|
||||||
|
export favicon="/config/favicon/favicon.ico"
|
||||||
|
|
||||||
|
# Set the global human-readable site name for your website. This string is usable in your site header as {{global_name}}. This is also used as the title for your RSS feed.
|
||||||
|
export global_name="Thergic Log"
|
||||||
1
arise-source/config/content_header.html
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
<p class="date">// {{published_date}} // <i>by {{author}}</i></p>
|
||||||
BIN
arise-source/config/favicon/android-chrome-192x192.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
arise-source/config/favicon/android-chrome-256x256.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
arise-source/config/favicon/apple-touch-icon.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
9
arise-source/config/favicon/browserconfig.xml
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<browserconfig>
|
||||||
|
<msapplication>
|
||||||
|
<tile>
|
||||||
|
<square150x150logo src="/config/favicon/mstile-150x150.png"/>
|
||||||
|
<TileColor>#00aba9</TileColor>
|
||||||
|
</tile>
|
||||||
|
</msapplication>
|
||||||
|
</browserconfig>
|
||||||
BIN
arise-source/config/favicon/favicon-16x16.png
Normal file
|
After Width: | Height: | Size: 8.3 KiB |
BIN
arise-source/config/favicon/favicon-32x32.png
Normal file
|
After Width: | Height: | Size: 8.9 KiB |
BIN
arise-source/config/favicon/favicon.ico
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
arise-source/config/favicon/mstile-150x150.png
Normal file
|
After Width: | Height: | Size: 6.5 KiB |
30
arise-source/config/favicon/safari-pinned-tab.svg
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
<?xml version="1.0" standalone="no"?>
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
|
||||||
|
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
||||||
|
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
|
||||||
|
width="300.000000pt" height="300.000000pt" viewBox="0 0 300.000000 300.000000"
|
||||||
|
preserveAspectRatio="xMidYMid meet">
|
||||||
|
<metadata>
|
||||||
|
Created by potrace 1.14, written by Peter Selinger 2001-2017
|
||||||
|
</metadata>
|
||||||
|
<g transform="translate(0.000000,300.000000) scale(0.100000,-0.100000)"
|
||||||
|
fill="#000000" stroke="none">
|
||||||
|
<path d="M610 2985 c-304 -65 -532 -294 -594 -597 -24 -116 -24 -1660 0 -1776
|
||||||
|
62 -305 291 -534 596 -596 116 -24 1660 -24 1776 0 305 62 534 291 596 596 24
|
||||||
|
116 24 1660 0 1776 -62 305 -291 534 -596 596 -67 14 -186 16 -895 15 -657 0
|
||||||
|
-831 -3 -883 -14z m340 -645 l0 -120 180 0 c99 0 180 -1 180 -2 0 -2 -18 -50
|
||||||
|
-39 -108 l-39 -105 -141 -3 -141 -3 0 -183 0 -183 63 -6 c131 -11 237 -77 285
|
||||||
|
-179 45 -98 47 -331 2 -450 -44 -118 -141 -187 -276 -196 l-74 -5 0 -128 0
|
||||||
|
-129 -105 0 -105 0 0 130 0 130 -185 0 c-135 0 -185 3 -185 12 0 6 16 56 36
|
||||||
|
109 l36 98 147 3 146 3 3 191 2 191 -73 5 c-138 9 -256 87 -298 198 -16 39
|
||||||
|
-23 86 -27 163 -13 286 87 431 308 446 l85 6 3 118 3 117 104 0 105 0 0 -120z
|
||||||
|
m1649 -127 c0 -5 -21 -55 -47 -113 l-48 -105 -427 -3 -427 -2 0 115 0 115 475
|
||||||
|
0 c261 0 475 -3 474 -7z m-111 -690 l3 -113 -421 0 -420 0 0 115 0 115 418 -2
|
||||||
|
417 -3 3 -112z m82 -608 l0 -115 -460 0 -460 0 0 115 0 115 460 0 460 0 0
|
||||||
|
-115z"/>
|
||||||
|
<path d="M610 1962 c-44 -44 -64 -104 -58 -172 10 -96 58 -150 146 -165 l42
|
||||||
|
-7 0 191 0 191 -46 0 c-40 0 -51 -5 -84 -38z"/>
|
||||||
|
<path d="M950 1217 l0 -205 38 10 c89 25 131 88 132 199 0 108 -46 171 -142
|
||||||
|
194 l-28 7 0 -205z"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.6 KiB |
19
arise-source/config/favicon/site.webmanifest
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
{
|
||||||
|
"name": "",
|
||||||
|
"short_name": "",
|
||||||
|
"icons": [
|
||||||
|
{
|
||||||
|
"src": "/config/favicon/android-chrome-192x192.png",
|
||||||
|
"sizes": "192x192",
|
||||||
|
"type": "image/png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "/config/favicon/android-chrome-256x256.png",
|
||||||
|
"sizes": "256x256",
|
||||||
|
"type": "image/png"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"theme_color": "#ffffff",
|
||||||
|
"background_color": "#ffffff",
|
||||||
|
"display": "standalone"
|
||||||
|
}
|
||||||
10
arise-source/config/footer.html
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
|
||||||
|
<!-- Page Footer -->
|
||||||
|
<div class="footer">
|
||||||
|
<p>Copyleft © 2023 <a href="https://spectrasecu.re">Spectra Secure</a> • All wrongs reserved</p>
|
||||||
|
<p>Built with 💚 using <a href="https://github.com/spectrasecure/arise">Arise</a>, a cloud-native static site generator written in Bash.</p>
|
||||||
|
</div>
|
||||||
|
<!-- End Page Footer -->
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
65
arise-source/config/header.html
Normal file
|
|
@ -0,0 +1,65 @@
|
||||||
|
<!doctype html>
|
||||||
|
|
||||||
|
<html lang="{{language}}">
|
||||||
|
<head>
|
||||||
|
<!-- Basic Metadata -->
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta name="HandheldFriendly" content="True" />
|
||||||
|
<meta name="generator" content="Arise" />
|
||||||
|
|
||||||
|
<title>{{title}} · {{global_name}}</title>
|
||||||
|
<meta name="description" content="{{description}}">
|
||||||
|
<meta name="author" content="{{author}}">
|
||||||
|
<!-- End Basic Metadata -->
|
||||||
|
|
||||||
|
<!-- OpenGraph Metadata -->
|
||||||
|
<meta property="og:site_name" content="{{global_name}}" />
|
||||||
|
<meta property="og:type" content="article" />
|
||||||
|
<meta property="og:title" content="{{title}} · {{global_name}}" />
|
||||||
|
<meta property="og:description" content="{{description}}" />
|
||||||
|
<meta property="og:url" content="{{canonical_url}}" />
|
||||||
|
<meta property="og:image" content="{{canonical_url}}{{thumbnail}}" />
|
||||||
|
<meta property="article:published_time" content="{{published_date}}" />
|
||||||
|
<meta property="article:modified_time" content="{{modified_date}}" />
|
||||||
|
<!-- End OpenGraph Metadata -->
|
||||||
|
|
||||||
|
<!-- Twitter Metadata -->
|
||||||
|
<meta name="twitter:card" content="summary_large_image" />
|
||||||
|
<meta name="twitter:title" content="{{title}} · {{global_name}}" />
|
||||||
|
<meta name="twitter:description" content="{{description}}" />
|
||||||
|
<meta name="twitter:url" content="{{canonical_url}}" />
|
||||||
|
<meta name="twitter:image" content="{{canonical_url}}{{thumbnail}}" />
|
||||||
|
<!-- End Twitter Metadata -->
|
||||||
|
|
||||||
|
<!-- Favicon -->
|
||||||
|
<link rel="apple-touch-icon" sizes="180x180" href="/config/favicon/apple-touch-icon.png">
|
||||||
|
<link rel="icon" type="image/png" sizes="32x32" href="/config/favicon/favicon-32x32.png">
|
||||||
|
<link rel="icon" type="image/png" sizes="16x16" href="/config/favicon/favicon-16x16.png">
|
||||||
|
<link rel="manifest" href="/config/favicon/site.webmanifest">
|
||||||
|
<link rel="mask-icon" href="/config/favicon/safari-pinned-tab.svg" color="#5bbad5">
|
||||||
|
<link rel="shortcut icon" href="/config/favicon/favicon.ico">
|
||||||
|
<meta name="msapplication-TileColor" content="#00aba9">
|
||||||
|
<meta name="msapplication-config" content="/config/favicon/browserconfig.xml">
|
||||||
|
<meta name="theme-color" content="#ffffff">
|
||||||
|
<!-- End Favicon -->
|
||||||
|
|
||||||
|
<!-- Styesheet+Logo -->
|
||||||
|
<style>
|
||||||
|
html * {font-family:monospace,sans-serif;}
|
||||||
|
body {background-color:#121619;margin:40px auto;max-width:650px;padding:0 10px;color:#65f85a;}
|
||||||
|
a {color:#b8f1b4;}
|
||||||
|
hr {color:#65f85a;}
|
||||||
|
.topbar a {color:#65f85a;}
|
||||||
|
</style>
|
||||||
|
<link rel="stylesheet" href="/config/main.css">
|
||||||
|
<div class="logo"><a href="/"><img src="/config/logo.png" /></a></div>
|
||||||
|
<!-- End Styles+Logo -->
|
||||||
|
|
||||||
|
<!-- Navigation -->
|
||||||
|
<nav class="topbar">
|
||||||
|
<a href="/">Home</a> ⟛ <a href="/posts">Posts</a> ⟛ <a href="https://github.com/spectrasecure/arise">GitHub</a>
|
||||||
|
</nav>
|
||||||
|
<!-- End Navigation -->
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
BIN
arise-source/config/logo.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
166
arise-source/config/main.css
Normal file
|
|
@ -0,0 +1,166 @@
|
||||||
|
|
||||||
|
/*** Core page styles to set the primary colours and styles to be inherited by everything else ***/
|
||||||
|
|
||||||
|
/* Core Styling */
|
||||||
|
html * {
|
||||||
|
font-family:sans-serif;
|
||||||
|
}
|
||||||
|
body{
|
||||||
|
margin:40px auto;
|
||||||
|
max-width:650px;
|
||||||
|
line-height:1.6;
|
||||||
|
font-size:18px;
|
||||||
|
color:#65f85a;
|
||||||
|
background-color:#121619;
|
||||||
|
padding:0 10px;
|
||||||
|
}
|
||||||
|
/********************************/
|
||||||
|
/********************************/
|
||||||
|
|
||||||
|
/*** Post styling. This section is for defining markup classes to make it easier to write prettier posts. ***/
|
||||||
|
|
||||||
|
img {
|
||||||
|
max-width: 100%;
|
||||||
|
max-height: 100%;
|
||||||
|
margin-top:20px;
|
||||||
|
margin-bottom:20px;
|
||||||
|
border-radius:16px;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
code {
|
||||||
|
background-color:#293137;
|
||||||
|
border-radius:16px;
|
||||||
|
padding-left:30px;
|
||||||
|
padding-right:30px;
|
||||||
|
line-height:2em;
|
||||||
|
|
||||||
|
padding-top:1px;
|
||||||
|
padding-bottom:1px;
|
||||||
|
color:#65f85a;
|
||||||
|
font-family:monospace;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre {
|
||||||
|
overflow-x: auto;
|
||||||
|
white-space: pre-wrap;
|
||||||
|
white-space: -moz-pre-wrap;
|
||||||
|
white-space: -pre-wrap;
|
||||||
|
white-space: -o-pre-wrap;
|
||||||
|
word-wrap: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
|
blockquote {
|
||||||
|
border-left:1px solid #65f85a;
|
||||||
|
display:block;
|
||||||
|
margin-top: 1em;
|
||||||
|
margin-bottom: 1em;
|
||||||
|
margin-left: 30px;
|
||||||
|
padding-left: 10px;
|
||||||
|
margin-right: 40px;
|
||||||
|
font-style: italic;
|
||||||
|
color:#46ab3e;
|
||||||
|
}
|
||||||
|
|
||||||
|
hr {
|
||||||
|
color:#65f85a;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
max-width: 300px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endline { /* Special kind of <hr> for spacing out footnotes from the rest of a post */
|
||||||
|
color:#65f85a;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
max-width: 300px;
|
||||||
|
margin-top: 80px;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color:#b8f1b4
|
||||||
|
}
|
||||||
|
|
||||||
|
h1{
|
||||||
|
line-height:1.2
|
||||||
|
}
|
||||||
|
|
||||||
|
h2,h3{
|
||||||
|
padding-top:24px;
|
||||||
|
line-height:1.2
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Style for inline dates. These are configured via a separate include file in /config/content_header.html. See notes on Arise page creation for more details. */
|
||||||
|
.date {
|
||||||
|
padding-bottom:0;
|
||||||
|
margin-bottom:0;
|
||||||
|
font-size:14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 900px) {
|
||||||
|
.date {
|
||||||
|
text-align:right;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media screen and (min-width: 901px) {
|
||||||
|
.date {
|
||||||
|
float:right;
|
||||||
|
margin-left:30px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/********************************/
|
||||||
|
/********************************/
|
||||||
|
|
||||||
|
|
||||||
|
/*** Modular component styles. Includes styling for the headers, navigation controls, and footer. ***/
|
||||||
|
|
||||||
|
/* Site logo. Styled to responsively move to either left or be centred, depending if the page is being viewed on desktop or mobile respectively. */
|
||||||
|
.logo {
|
||||||
|
margin-bottom:20px;
|
||||||
|
text-align:center;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Navbar styling. */
|
||||||
|
.topbar {
|
||||||
|
padding-right:10px;
|
||||||
|
border-top:1px solid #65f85a;
|
||||||
|
border-bottom:1px solid #65f85a;
|
||||||
|
margin-bottom:20px;
|
||||||
|
text-align:center;
|
||||||
|
}
|
||||||
|
.topbar a {
|
||||||
|
color:#65f85a;
|
||||||
|
text-decoration:none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Site footer styling */
|
||||||
|
.footer {
|
||||||
|
border-top:2px solid #65f85a;
|
||||||
|
font-size:12px;
|
||||||
|
margin-top:120px;
|
||||||
|
text-align:center;
|
||||||
|
}
|
||||||
|
|
||||||
|
/********************************/
|
||||||
|
/********************************/
|
||||||
|
|
||||||
|
|
||||||
|
/*** Other misc garbage ***/
|
||||||
|
|
||||||
|
/* Arise Index Style */
|
||||||
|
.arise-toc-td {
|
||||||
|
border-width: 1px;
|
||||||
|
border-color: #65f85a;
|
||||||
|
border-top-style: solid;
|
||||||
|
text-align: center;
|
||||||
|
padding-right: 10px;
|
||||||
|
padding-bottom: 5px
|
||||||
|
}
|
||||||
|
.arise-toc-th {
|
||||||
|
padding-bottom: 20px;
|
||||||
|
border-bottom: 1px;
|
||||||
|
border-bottom-style: solid;
|
||||||
|
}
|
||||||
49
arise-source/index.md
Normal file
|
|
@ -0,0 +1,49 @@
|
||||||
|
<!-- BEGIN ARISE ------------------------------
|
||||||
|
Title:: "Bash Static Site Generator"
|
||||||
|
|
||||||
|
Author:: "Spectra Secure"
|
||||||
|
Description:: "Arise is the most polished cloud-native static site generator written in Bash."
|
||||||
|
Language:: "en"
|
||||||
|
Thumbnail:: "arise-icon.png"
|
||||||
|
Published Date:: "2022-09-17"
|
||||||
|
Modified Date:: "2022-09-17"
|
||||||
|
|
||||||
|
content_header:: "false"
|
||||||
|
rss_hide:: "true"
|
||||||
|
---- END ARISE \\ DO NOT MODIFY THIS LINE ---->
|
||||||
|
|
||||||
|
# Retro doesn't have to be regressive
|
||||||
|
|
||||||
|
Arise is a static site generator written in Bash, designed to be a fusion of ultra-stable 90s technology and modern DevOps paradigms. Arise is designed around use cases like individual blogs and personal websites.
|
||||||
|
|
||||||
|
Let me tell you why Arise exists. You ever seen one of those nineties zombie websites that hasn't been updated in like thirty years but is still somehow running today? [Stuff like this](http://home.mcom.com/home/welcome.html). Can you imagine a modern website lasting that long without becoming a completely broken mess?
|
||||||
|
|
||||||
|
We live in a world where the mindset of "move fast, break things" has trained web developers to keep stacking more and more overdesigned trash onto their websites, one node framework or polyfill at a time. Over time, we've collectively lost the plot and forgotten that websites are ultimately a tool to share information with other people.
|
||||||
|
|
||||||
|
Arise was built to show that you can take simple technology like Bash that is so set in stone as to be basically indestructible and use it to create modern web tools.
|
||||||
|
|
||||||
|
## Simplify deployment
|
||||||
|
|
||||||
|
90s websites may have been robust in their simplicity, but no one likes setting up a janky webserver on a computer in their closet. Arise is a modern cloud-native application that supports easy deployment to your cloud static site host of choice.
|
||||||
|
|
||||||
|
Simply fork [Arise on Github](https://github.com/spectrasecure/arise), edit your site, and point your cloud vendor to your repository. The included CI workflow does all the hard work of building and deploying your site straight from the cloud.
|
||||||
|
|
||||||
|
## Timeless tech built for the modern web
|
||||||
|
|
||||||
|
Arise websites may be spartan on the surface, but they are designed to take advantage of modern web conventions for rich content presence and SEO.
|
||||||
|
|
||||||
|
- Rich metadata for cross-site embeds with support for [OpenGraph](https://ogp.me/) and [TwitterCard](https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards)
|
||||||
|
- Dynamic sitemap generation for SEO
|
||||||
|
- Dynamic RSS feed generation
|
||||||
|
|
||||||
|
## Practical pages for real-world use
|
||||||
|
|
||||||
|
Most projects like this are one-off tech demos. While many of them "work", they often lack critical CMS-style features that are important for actually organising stuff on your website. Real websites don't have just one page, but rather are built on top of hierarchies of linked pages.
|
||||||
|
|
||||||
|
Arise solves this problem by building websites that are designed to be modular, hierarchical, and traversable. Arise supports the creation of dynamic index pages based on individual page metadata— just tell Arise where you need an index, and it will build it for you all on its own.
|
||||||
|
|
||||||
|
For an example of what index pages created by Arise look like, check out the [Sample Posts](posts) on this website.
|
||||||
|
|
||||||
|
## Get started with Arise
|
||||||
|
|
||||||
|
Arise is free open-source software, available on [GitHub](https://github.com/spectrasecure/arise) under the [GNU AGPL License](https://www.gnu.org/licenses/agpl-3.0.en.html).
|
||||||
23
arise-source/posts/abolish-arasaka/index.md
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
<!-- BEGIN ARISE ------------------------------
|
||||||
|
Title:: "Abolish Arasaka"
|
||||||
|
|
||||||
|
Author:: "Johnny Silverhand"
|
||||||
|
Description:: "I saw Saburo Arasaka at a grocery store in Night City yesterday."
|
||||||
|
Language:: "en"
|
||||||
|
Thumbnail:: ""
|
||||||
|
Published Date:: "2077-05-12"
|
||||||
|
Modified Date:: "2077-05-12"
|
||||||
|
|
||||||
|
---- END ARISE \\ DO NOT MODIFY THIS LINE ---->
|
||||||
|
|
||||||
|
# Abolish Arasaka
|
||||||
|
|
||||||
|
I saw Saburo Arasaka at a grocery store in Night City yesterday. I told him how cool it was to meet him in person, but I didn’t want to be a douche and bother him and ask him for photos or anything.
|
||||||
|
|
||||||
|
He said, “Oh, like you’re doing now?”
|
||||||
|
|
||||||
|
I was taken aback, and all I could say was “Huh?” but he kept cutting me off and going “huh? huh? huh?” and closing his hand shut in front of my face. I walked away and continued with my shopping, and I heard him chuckle as I walked off. When I came to pay for my stuff up front I saw him trying to walk out the doors with like fifteen Yikes! Tofu bars in his hands without paying.
|
||||||
|
|
||||||
|
The girl at the counter was very nice about it and professional, and was like “Sir, you need to pay for those first.” At first he kept pretending to be tired and not hear her, but eventually turned back around and brought them to the counter.
|
||||||
|
|
||||||
|
When she took one of the bars and started scanning it multiple times, he stopped her and told her to scan them each individually “to prevent any electrical infetterence,” and then turned around and winked at me. I don’t even think that’s a word. After she scanned each bar and put them in a bag and started to say the price, he kept interrupting her by yawning really loudly.
|
||||||
17
arise-source/posts/ci-xml-reserved-characters/index.md
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
<!-- BEGIN ARISE ------------------------------
|
||||||
|
Title:: "CI Test Suite - XML Reserved Characters & < > ' ""
|
||||||
|
|
||||||
|
Author:: "Spectra Secure & < > ' ""
|
||||||
|
Description:: "This post tests if we are properly filtering XML reserved characters in page metadata & < > ' ""
|
||||||
|
Language:: "en"
|
||||||
|
Thumbnail:: "kanagawa.jpg"
|
||||||
|
Published Date:: "2023-11-08"
|
||||||
|
Modified Date:: "2023011-08"
|
||||||
|
|
||||||
|
---- END ARISE \\ DO NOT MODIFY THIS LINE ---->
|
||||||
|
|
||||||
|
# CI Test Suite - XML Reserved Characters
|
||||||
|
|
||||||
|
This page is part of a test suite to ensure that when a user tries to stick XML reserved characters into page metadata, such characters are properly converted to escape characters. This way we ensure that such characters don't break the monolithic sitemap or RSS feed.
|
||||||
|
|
||||||
|
The way we do this is by having a test page in our template site which contains a post whose title, author, and destripction all contain the XML reserved characters (&<>'"). This test suite verifies that this output page has all of the reserved characters properly sanitised to the escape code versions, so that they're safe to handle within the site's XML sitemap and RSS feed.
|
||||||
BIN
arise-source/posts/ci-xml-reserved-characters/kanagawa.jpg
Normal file
|
After Width: | Height: | Size: 590 KiB |
13
arise-source/posts/index.md
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
<!-- BEGIN ARISE ------------------------------
|
||||||
|
Title:: "Index: Posts"
|
||||||
|
|
||||||
|
Author:: ""
|
||||||
|
Description:: "A collection of sample posts build with Arise"
|
||||||
|
Language:: "en"
|
||||||
|
Thumbnail:: ""
|
||||||
|
Published Date:: ""
|
||||||
|
Modified Date:: ""
|
||||||
|
|
||||||
|
toc:: "true"
|
||||||
|
content_header:: "false"
|
||||||
|
---- END ARISE \\ DO NOT MODIFY THIS LINE ---->
|
||||||
19
arise-source/posts/my-cool-post/index.md
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
<!-- BEGIN ARISE ------------------------------
|
||||||
|
Title:: "My Cool Post"
|
||||||
|
|
||||||
|
Author:: "Spectra Secure"
|
||||||
|
Description:: "This cool post is an example of a post published in Arise"
|
||||||
|
Language:: "en"
|
||||||
|
Thumbnail:: "kanagawa.jpg"
|
||||||
|
Published Date:: "2022-09-17"
|
||||||
|
Modified Date:: "2022-09-17"
|
||||||
|
|
||||||
|
---- END ARISE \\ DO NOT MODIFY THIS LINE ---->
|
||||||
|
|
||||||
|
# Look, a cool post
|
||||||
|
|
||||||
|
You can make cool posts on your Arise website!
|
||||||
|
|
||||||
|
You can even use images, look:
|
||||||
|
|
||||||
|

|
||||||
BIN
arise-source/posts/my-cool-post/kanagawa.jpg
Normal file
|
After Width: | Height: | Size: 590 KiB |
4
arise-source/robots.txt
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
User-agent: *
|
||||||
|
Disallow: https://ari.se.net/config/*
|
||||||
|
|
||||||
|
Sitemap: https://ari.se.net/sitemap.xml
|
||||||
73
ci/xml-reserved-characters.sh
Normal file
|
|
@ -0,0 +1,73 @@
|
||||||
|
#!/bin/bash
|
||||||
|
testpage='arise-out/posts/ci-xml-reserved-characters/index.html'
|
||||||
|
|
||||||
|
echo "Arise CI - XML Reserved Character Sanitisation"
|
||||||
|
echo "=============================================="
|
||||||
|
echo "This is a test suite to ensure that when a user tries to stick XML reserved characters into page metadata, such characters are properly converted to escape characters. This ensures that such characters don't break the monolithic sitemap or RSS feed."
|
||||||
|
echo ""
|
||||||
|
echo "The way we do this is by having a test page in our template site (""$testpage"") which contains a post whose title, author, and destripction all contain the XML reserved characters (&<>'"'"'"). This test suite verifies that the output page has all of the reserved characters properly sanitised to the escape code versions, so that they're safe to handle within the site's XML sitemap and RSS feed."
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
echo "Testing to ensure the Arise site built the test suite page..."
|
||||||
|
if [ -f $testpage ]
|
||||||
|
then
|
||||||
|
echo "SUCCESS!"
|
||||||
|
else
|
||||||
|
echo "FAILED. No page was found where the test post is supposed to exist."
|
||||||
|
echo " - Check that you haven't moved the test post located in arise-source/posts somewhere else"
|
||||||
|
echo " - Check that you haven't broken Arise entirely"
|
||||||
|
echo "Good luck, choom!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
echo "Testing to ensure that the title is rendering as it should..."
|
||||||
|
titletest="<title>CI Test Suite - XML Reserved Characters & < > ' ""
|
||||||
|
if [[ $(grep "$titletest" $testpage) ]]
|
||||||
|
then
|
||||||
|
echo "SUCCESS!"
|
||||||
|
else
|
||||||
|
echo "FAILED. The page title we were looking for did not render properly."
|
||||||
|
echo ""
|
||||||
|
echo "Pattern we were trying to match:"
|
||||||
|
echo "$titletest"
|
||||||
|
echo "==========="
|
||||||
|
echo "Full line that contains a discrepancy:"
|
||||||
|
echo "$(grep '<title>' $testpage | head -1)"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
echo "Testing to ensure that the author is rendering as they should..."
|
||||||
|
authortest='<meta name="author" content="Spectra Secure & < > ' "">'
|
||||||
|
if [[ $(grep "$authortest" $testpage) ]]
|
||||||
|
then
|
||||||
|
echo "SUCCESS!"
|
||||||
|
else
|
||||||
|
echo "FAILED. The page author line we were looking for did not render properly."
|
||||||
|
echo ""
|
||||||
|
echo "Pattern we were trying to match:"
|
||||||
|
echo "$authortest"
|
||||||
|
echo "==========="
|
||||||
|
echo "Full line that contains a discrepancy:"
|
||||||
|
echo "$(grep '<meta name="author"' $testpage | head -1)"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
echo "Testing to ensure that the description is rendering as it should..."
|
||||||
|
descriptiontest='<meta name="description" content="This post tests if we are properly filtering XML reserved characters in page metadata & < > ' "">'
|
||||||
|
if [[ $(grep "$descriptiontest" $testpage) ]]
|
||||||
|
then
|
||||||
|
echo "SUCCESS!"
|
||||||
|
else
|
||||||
|
echo "FAILED. The page description line we were looking for did not render properly."
|
||||||
|
echo ""
|
||||||
|
echo "Pattern we were trying to match:"
|
||||||
|
echo "$descriptiontest"
|
||||||
|
echo "==========="
|
||||||
|
echo "Full line that contains a discrepancy:"
|
||||||
|
echo "$(grep '<meta name="description"' $testpage | head -1)"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
122
docs/guides/creating-arise-pages/README.md
Normal file
|
|
@ -0,0 +1,122 @@
|
||||||
|
# Creating Arise Pages
|
||||||
|
|
||||||
|
This documentation page will explain how Arise websites are structured, how to create new pages, and the options that are available when configuring a new page.
|
||||||
|
|
||||||
|
## Site Architecture Overview
|
||||||
|
|
||||||
|
All pages in Arise have a common modular structure. Each page is made up of a folder with an `index.md` at the root of the page. Thumbnails, images, and other page assets should be stored in the same folder as the page `index.md` file. The basic structure of every page in Arise can be visualised like this:
|
||||||
|
|
||||||
|
```
|
||||||
|
.
|
||||||
|
├── pagename/
|
||||||
|
│ ├── index.md
|
||||||
|
│ ├── thumbnail.png
|
||||||
|
│ └── [other assets]
|
||||||
|
└── ...
|
||||||
|
```
|
||||||
|
|
||||||
|
When Arise builds your site, it traverses the folder structure of the entire site and builds everything with the above structure in mind.
|
||||||
|
|
||||||
|
For large folders full of pages, Arise also supports the creation of dynamically generated index pages. You can tell Arise to create an index page at a given folder by using the `toc` setting (see: [Optional Settings](#optional-settings)) in your index folder's `index.md`.
|
||||||
|
|
||||||
|
The structure of an Arise website making use of indices should look something like this:
|
||||||
|
|
||||||
|
```
|
||||||
|
.
|
||||||
|
├── index1/
|
||||||
|
│ ├── index.md
|
||||||
|
│ ├── page1/..
|
||||||
|
│ └── page2/..
|
||||||
|
│
|
||||||
|
├── index2/
|
||||||
|
│ ├── index.md
|
||||||
|
│ ├── page1/..
|
||||||
|
│ └── page2/..
|
||||||
|
└── ...
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## Creating New Pages
|
||||||
|
|
||||||
|
To create a new page, simply create a folder and make an `index.md` file with an Arise metadata header at the very top of the file. A standard Arise metadata header looks like this:
|
||||||
|
|
||||||
|
```
|
||||||
|
<!-- BEGIN ARISE ------------------------------
|
||||||
|
Title:: "My Cool Page"
|
||||||
|
|
||||||
|
Author:: "Johnny Silverhand"
|
||||||
|
Description:: "Write a thrilling description here"
|
||||||
|
Language:: "en"
|
||||||
|
Thumbnail:: "thumbnail.png"
|
||||||
|
Published Date:: "2077-05-12"
|
||||||
|
Modified Date:: "2077-05-12"
|
||||||
|
|
||||||
|
toc:: "false"
|
||||||
|
process_markdown:: "true"
|
||||||
|
content_header:: "true"
|
||||||
|
---- END ARISE \\ DO NOT MODIFY THIS LINE ---->
|
||||||
|
```
|
||||||
|
|
||||||
|
The Arise metadata header is broken up into three sections **Critical** settings, **Standard** settings, and **Optional** settings. The setting variable names are case sensitive.
|
||||||
|
|
||||||
|
### Critical Settings
|
||||||
|
|
||||||
|
If critical settings are not included or are left blank your page will not build. There is currently only one critical setting:
|
||||||
|
|
||||||
|
- **Title**: This is the human-readable title of your web page. It cannot be left blank or your page will not build.
|
||||||
|
|
||||||
|
### Standard Settings
|
||||||
|
|
||||||
|
Standard settings must be present in your page header, but they can optionally be left blank. However, it is not recommended to leave them blank because your page will be missing SEO data if these settings are not populated.
|
||||||
|
|
||||||
|
- **Author**: Who wrote this page
|
||||||
|
- **Description**: A brief human-readable description of your page. This will be what appears in the subtext of search engine results or social media that supports rich embeds, so you are advised (but not required) to keep this field under 120 characters in length.
|
||||||
|
- **Language**: The [ISO 639-1 language code](https://www.w3schools.com/tags/ref_language_codes.asp) for the language your page is written in.
|
||||||
|
- **Thumbnail**: The filename of your thumbnail image. The thumbnail image must be in the same folder as your `index.md` for your page.
|
||||||
|
- **Published Date**: The [ISO-8601 short date](https://en.wikipedia.org/wiki/ISO_8601#Calendar_dates) (aka: YYYY-MM-DD) for when your page was originally published to your site.
|
||||||
|
- **Modified Date**: The [ISO-8601 short date](https://en.wikipedia.org/wiki/ISO_8601#Calendar_dates) (aka: YYYY-MM-DD) for when your page was last modified.
|
||||||
|
|
||||||
|
### Optional Settings
|
||||||
|
|
||||||
|
Optional settings can be omitted entirely from your header. These settings contain advanced options for special functionality within Arise. If you choose to omit one of these options, Arise will build your page with the default setting for any omitted optional setting. Optional page settings that are available include:
|
||||||
|
|
||||||
|
- **content_header**: (Default: **true**) Arise has a special build file `config/content_header.html` with content to be appended to every page immediately after the opening `<body>` tag. However, for some special pages on your website, you may want to format the body of your page in a completely unique way that omits your standard site elements within the `<body>`. If you set `content_header` to `"false"`, the content header (but not SEO header) will be omitted from your special page so that you can format the body individually for that page.
|
||||||
|
- By default, the only thing included in the content header is a tag to display the post date and author of any given post. You can always add more or change the default content header to your liking if you have other standard content you'd like included in the body of your page!
|
||||||
|
- **process_markdown**: (Default: **true**) Arise is designed to build pages written in [Markdown](https://daringfireball.net/projects/markdown/). However, let's say you have a page that is already written in HTML. When you set `process_markdown` to `"false"`, Arise will skip the step of converting Markdown into HTML and just pass the raw contents of your `index.md` as the body of your page.
|
||||||
|
- This setting is particularly useful if you are porting content from another website that already has the body of your content in HTML format and you don't want any additional processing beyond the addition of a header+footer to be done to it.
|
||||||
|
- **toc**: (Default: **false**) This is a special setting that instructs Arise that the folder containing this `index.md` isn't actually a normal page, but rather a folder containing other pages that you'd like a traversable index/TOC built for. If you set `toc` to `"true"`, Arise will look through all the folders contained in the current folder, grab their metadata if they are Arise-formatted pages, and generate a pretty index for you.
|
||||||
|
- If this setting is enabled, Arise will ignore all content present after the Arise metadata header and create an index/TOC page instead.
|
||||||
|
- **rss_hide**: (Default: **false**) When set to "true", this setting hides your page from the RSS feed. This is useful for meta pages (privacy policy, contact, etc) that you don't want to send to the feeds for your RSS readers.
|
||||||
|
- Note that dynamically generated TOC pages are automatically hidden from your RSS feed, so you do not need to manually add this setting for those pages.
|
||||||
|
|
||||||
|
## Page Themes
|
||||||
|
|
||||||
|
All pages in Arise are built by concatenating the following files in the following order:
|
||||||
|
- [/config/header.html](/arise-source/config/header.html)
|
||||||
|
- [/config/content_header.html](/arise-source/config/content_header.html)
|
||||||
|
- The `index.md` for the page being built
|
||||||
|
- [/config/footer.html](/arise-source/config/footer.html)
|
||||||
|
|
||||||
|
If you want to change the style or overall layout of your website, you need to edit the `/config/header.html` file for your website.
|
||||||
|
|
||||||
|
By default, the stylesheet used by `/config/header.html` is [/config/main.css](/arise-source/config/main.css).
|
||||||
|
|
||||||
|
The Arise header supports the following dynamic metadata tags, which will be populated with info from the page being built at build time:
|
||||||
|
- `{{base_url}}` - The base url for your website, in the format of `https://example.com`
|
||||||
|
- `{{global_name}}` - The human-readable global name of your website
|
||||||
|
- `{{title}}` - The title of the page being built
|
||||||
|
- `{{author}}` - The author of the page being built
|
||||||
|
- `{{description}}` - The human-readable description of the page being built
|
||||||
|
- `{{language}}` - The [ISO 639-1 language code](https://www.w3schools.com/tags/ref_language_codes.asp) for the language your page is written in.
|
||||||
|
- `{{thumbnail}}` - The filename of your thumbnail image.
|
||||||
|
- `{{published_date}}` - The [ISO-8601 short date](https://en.wikipedia.org/wiki/ISO_8601#Calendar_dates) (aka: YYYY-MM-DD) for when your page was originally published to your site.
|
||||||
|
- `{{modified_date}}` - The [ISO-8601 short date](https://en.wikipedia.org/wiki/ISO_8601#Calendar_dates) (aka: YYYY-MM-DD) for when your page was last modified.
|
||||||
|
|
||||||
|
Note that Arise automatically checks metadata strings for XML-unsafe characters and replaces them with [XML escape codes](https://docs.oracle.com/cd/A97335_02/apps.102/bc4j/developing_bc_projects/obcCustomXml.htm) at runtime. This ensures that you don't accidentally break your sitemap or RSS feed by having quotes or whatever in your page metadata.
|
||||||
|
|
||||||
|
## Caveats & Gotchas
|
||||||
|
|
||||||
|
There are some caveats to how this data is processed that you should be mindful of.
|
||||||
|
|
||||||
|
- Arise specifically looks for files titled `index.md` for its build process. Do yourself a favour and don't name files `index.md` if you don't want Arise to include them.
|
||||||
|
- `/config` is a specially directory reserved for site templates and live sitewide assets. Arise will not build pages in this folder or its subfolders.
|
||||||
26
docs/guides/getting-started/README.md
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
# Getting Started with Arise
|
||||||
|
|
||||||
|
Welcome to Arise! Arise is designed to be a cloud-native application. This guide will walk you through the basics of how to build and deploy your website to the cloud using Arise.
|
||||||
|
|
||||||
|
It's actually very simple to get a website up and running using Arise.
|
||||||
|
|
||||||
|
## Cloud Deployments
|
||||||
|
|
||||||
|
1. Fork this repo
|
||||||
|
2. Edit the global Arise site configuration file at `/arise-source/config/arise.conf`
|
||||||
|
3. Edit the example site in `/arise-source/` to your liking
|
||||||
|
- Check out the page on [creating pages](../creating-arise-pages/README.md) for more information on the specifics of how Arise pages work
|
||||||
|
4. Configure your `/arise-source/robots.txt` with your site domain and any additional crawler settings you'd like to set.
|
||||||
|
5. Upon any new commit to the site source files, the GitHub Actions workflow present in `/.github/workflows/` will automatically build your website based on the contents of `/arise-source/` and output the built files to your `html` branch.
|
||||||
|
6. Configure your cloud web host of choice to automatically deploy a static site from the `html` branch of your repo. Specific instructions for several notable providers can be found below:
|
||||||
|
- [Cloudflare Pages](cloudflare/README.md)
|
||||||
|
- [DigitalOcean](digitalocean/README.md)
|
||||||
|
- [GitHub Pages](github-pages/README.md)
|
||||||
|
|
||||||
|
Congrats! Your site is now up and running! If you want to make changes to your website, you can simply make a commit to the `main` branch of your repo source files and it will automatically be deployed to your live website! Pretty wiz, yeah?
|
||||||
|
|
||||||
|
## Running Arise Locally (Not Recommended)
|
||||||
|
|
||||||
|
You can also clone this repo and run Arise locally. However, this not recommended because you are honestly wasting your time by manually running the build process and managing the build artefacts instead of just sitting back and letting CI/CD do the work for you.
|
||||||
|
|
||||||
|
If you REALLY want to run Arise locally, please refer to [this guide](../running-arise-locally/README.md).
|
||||||
21
docs/guides/getting-started/cloudflare/README.md
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
# Deploying to Cloudflare Pages
|
||||||
|
|
||||||
|
This guide assumes that you have completed steps 1-3 from [Getting Started](../README.md) and have a successfully build website in your `html` branch.
|
||||||
|
|
||||||
|
1. Navigate to your [Cloudflare Dashboard](https://dash.cloudflare.com) and click **Pages** in the sidebar.
|
||||||
|
2. Click **Create a project** > **Connect to Git**.
|
||||||
|
3. Add your account and select your repository. Click **Begin setup** to proceed.
|
||||||
|
4. Name your project whatever you'd like and select `html` as your **Production branch**. Leave all the optional **Build settings** blank-- we don't need any of these.
|
||||||
|
<p align="center"><img src="cloudflare-1.png" alt="Screenshot: Cloudflare Pages Deploy Settings" width=50% height=50% /></p>
|
||||||
|
|
||||||
|
5. Click **Save and Deploy**
|
||||||
|
6. **IMPORTANT**: Click **Pages** in the sidebar and click on your site.
|
||||||
|
7. Click **Settings**.
|
||||||
|
8. Click **Builds & deployments**.
|
||||||
|
9. Click **Configure Preview deployments**.
|
||||||
|
10. Click **None** and **Save**.
|
||||||
|
<p align="center"><img src="cloudflare-2.png" alt="Screenshot: Disable Cloudflare Preview deployments" width=50% height=50% /></p>
|
||||||
|
|
||||||
|
As of this writing, if you don't IMMEDIATELY disable preview deployments, Cloudflare will automatically generate live externally-accessible "preview" URLs for every single branch in your website repo (even if your repo is private). Based on how Arise works, this will not only result in previews that are broken and do not work, but it will disclose literally everything in your repo including potentially WIP pages if your repo is private. To put a cherry on top, after preview deployments have been build for a branch, you cannot delete them without deleting and re-adding your entire damn website. What a stupid-ass system.
|
||||||
|
|
||||||
|
Anyway, rants aside, your site should now be up and running on Cloudflare Pages! Congrats! If you'd like to use a custom domain, please review Cloudflare's [custom domains guide](https://developers.cloudflare.com/pages/platform/custom-domains/) as that is outside of the scope of this documentation.
|
||||||
BIN
docs/guides/getting-started/cloudflare/cloudflare-1.png
Executable file
|
After Width: | Height: | Size: 521 KiB |
BIN
docs/guides/getting-started/cloudflare/cloudflare-2.png
Executable file
|
After Width: | Height: | Size: 284 KiB |
13
docs/guides/getting-started/digitalocean/README.md
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
# Deploying to DigitalOcean
|
||||||
|
|
||||||
|
This guide assumes that you have completed steps 1-3 from [Getting Started](../README.md) and have a successfully build website in your `html` branch.
|
||||||
|
|
||||||
|
1. Navigate to the [Apps](https://cloud.digitalocean.com/apps) pane in your DigitalOcean account.
|
||||||
|
2. Click **Create App**.
|
||||||
|
2. Select **GitHub** as your source, select your repository, and define `html` as your target branch. Leave `/` as your source directory. Leave the box checked next to **Autodeploy** so that your site will automatically pull new updates whenever you push a commit to `main` in your Arise site repo on GitHub. Hit **Next** to proceed.
|
||||||
|
<p align="center"><img src="digitalocean-1.png" alt="Screenshot: DigitalOcean Deploy Settings" width=50% height=50% /></p>
|
||||||
|
|
||||||
|
3. Click **Skip to Review** to skip past all the other optional settings-- we don't need any of them.
|
||||||
|
4. Click **Create Resources**.
|
||||||
|
|
||||||
|
Congrats! Your Arise website is now live on DigitalOcean. If you'd like to use a custom domain, please review DigitalOcean's [custom domains guide](https://docs.digitalocean.com/products/app-platform/how-to/manage-domains/) as that is outside of the scope of this documentation.
|
||||||
BIN
docs/guides/getting-started/digitalocean/digitalocean-1.png
Executable file
|
After Width: | Height: | Size: 294 KiB |
15
docs/guides/getting-started/github-pages/README.md
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
# Deploying to GitHub Pages
|
||||||
|
|
||||||
|
This guide assumes that you have completed steps 1-3 from [Getting Started](../README.md) and have a successfully build website in your `html` branch.
|
||||||
|
|
||||||
|
This guide will also assume that you don't already have a GitHub Pages site and are using Arise to host your User Site. For Project Sites, please review [GitHub's documentation](https://docs.github.com/en/pages/getting-started-with-github-pages/about-github-pages#types-of-github-pages-sites).
|
||||||
|
|
||||||
|
Frankly, the configuration annoyance of GitHub Pages with multiple hosted sites is a pretty good reason to use a provider like [Cloudflare Pages](../cloudflare/README.md) or [DigitalOcean](../digitalocean/README.md) instead.
|
||||||
|
|
||||||
|
1. Name your repo to **yourusername.github.io**.
|
||||||
|
2. Navigate to your repo and click **Settings** in the navbar.
|
||||||
|
3. Click **Pages** in the sidebar.
|
||||||
|
4. Under the dropdown for **Source**, click **Deploy from a branch**.
|
||||||
|
5. Select the `html` branch. Leave `/ (root)` as the folder and click **Save**.
|
||||||
|
|
||||||
|
Congrats! Your Arise website is now live on GitHub Pages. If you'd like to use a custom domain, please review GitHub's [custom domains guide](https://docs.github.com/articles/using-a-custom-domain-with-github-pages/) as that is outside of the scope of this documentation.
|
||||||
39
docs/guides/running-arise-locally/README.md
Normal file
|
|
@ -0,0 +1,39 @@
|
||||||
|
# Running Arise Locally
|
||||||
|
|
||||||
|
The following instructions will walk you through how to build an Arise website by running Arise on your local machine. This is primarily intended for development and not regular use. If you just want to throw up an Arise website as easily as possible, please use the cloud native instructions in the [Getting Started](../getting-started/README.md) guide.
|
||||||
|
|
||||||
|
1. Ensure you have the [proper dependencies](/README.md#dependencies) installed.
|
||||||
|
2. Clone this repo and cd into it: `git clone https://github.com/spectrasecure/arise && cd arise`
|
||||||
|
3. Edit the global Arise site configuration file at `/arise-source/config/arise.conf`
|
||||||
|
4. Edit the example site in `/arise-source/` to your liking
|
||||||
|
- Check out the page on [creating pages](../creating-arise-pages/README.md) for more information on the specifics of how Arise pages work
|
||||||
|
5. Configure your `robots.txt` in the root of the repository with your site domain and any additional crawler settings you'd like to set.
|
||||||
|
6. Build Arise by running `bash arise build`
|
||||||
|
7. Your built site will be output to `arise-out/`. It is up to you to upload these wherever to host your site.
|
||||||
|
|
||||||
|
### Command Line Arguments for Arise
|
||||||
|
|
||||||
|
The Arise shell script allows for several partial build modes, largely for testing purposes. These options are also displayed to you in the Help prompt which is displayed if you attempt to run Arise without any options or with invalid options.
|
||||||
|
|
||||||
|
```
|
||||||
|
Usage:
|
||||||
|
------
|
||||||
|
bash arise build -[k][f]
|
||||||
|
# Builds the entire site
|
||||||
|
available in all build modes:
|
||||||
|
-k: Keeps source files in output
|
||||||
|
-f: Force overwrite pre-existing output
|
||||||
|
bash arise -[p|s|r][k][f]
|
||||||
|
# Builds only specific parts of the site
|
||||||
|
# Useful for testing purposes
|
||||||
|
mutually exclusive options:
|
||||||
|
-p: Build pages only mode
|
||||||
|
-s: Build sitemap only mode
|
||||||
|
-r: Build rss only mode
|
||||||
|
```
|
||||||
|
|
||||||
|
- `bash arise -p` - Running Arise in this manner will only build (p)ages. It will not build the sitemap or the RSS feed.
|
||||||
|
- `bash arise -s` - Running Arise in this manner will only build the (s)itemap. It won't build anything else.
|
||||||
|
- `bash arise -r` - Running Arise in this manner will only build the (r)ss feed. It won't build anything else.
|
||||||
|
- `-k` - Adding this flag to any build mode will (k)eep the source files in the output directory rather than deleting them from the output.
|
||||||
|
- `-f` - By default, Arise will throw an error if the output folder `arise-out` already has contents in it in order to prevent you from accidentally overwriting your current built output. If you would like to override this safeguard and (f)orce Arise to delete the current contents of `arise-out`, this is the flag to do so.
|
||||||
BIN
docs/logo/arise-icon.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
docs/logo/arise-icon.xcf
Normal file
269
docs/logo/arise-logo.svg
Normal file
|
|
@ -0,0 +1,269 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
width="14.042mm"
|
||||||
|
height="5.3959999mm"
|
||||||
|
viewBox="0 0 14.041999 5.3959999"
|
||||||
|
version="1.1"
|
||||||
|
id="svg5"
|
||||||
|
inkscape:version="1.2.1 (9c6d41e410, 2022-07-14)"
|
||||||
|
sodipodi:docname="arise-logo.svg"
|
||||||
|
inkscape:export-filename="arise-logo-transparent.png"
|
||||||
|
inkscape:export-xdpi="542.65778"
|
||||||
|
inkscape:export-ydpi="542.65778"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg">
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="namedview7"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#000000"
|
||||||
|
borderopacity="0.25"
|
||||||
|
inkscape:showpageshadow="2"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pagecheckerboard="0"
|
||||||
|
inkscape:deskcolor="#d1d1d1"
|
||||||
|
inkscape:document-units="mm"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:zoom="13.516172"
|
||||||
|
inkscape:cx="39.471234"
|
||||||
|
inkscape:cy="6.1407918"
|
||||||
|
inkscape:window-width="3440"
|
||||||
|
inkscape:window-height="1369"
|
||||||
|
inkscape:window-x="-8"
|
||||||
|
inkscape:window-y="-8"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="g1560" />
|
||||||
|
<defs
|
||||||
|
id="defs2">
|
||||||
|
<rect
|
||||||
|
x="29.511229"
|
||||||
|
y="241.55487"
|
||||||
|
width="703.89746"
|
||||||
|
height="247.01991"
|
||||||
|
id="rect176" />
|
||||||
|
<rect
|
||||||
|
x="29.511229"
|
||||||
|
y="241.55487"
|
||||||
|
width="703.89746"
|
||||||
|
height="247.01991"
|
||||||
|
id="rect440" />
|
||||||
|
<rect
|
||||||
|
x="29.511229"
|
||||||
|
y="241.55487"
|
||||||
|
width="703.89746"
|
||||||
|
height="247.01991"
|
||||||
|
id="rect475" />
|
||||||
|
<rect
|
||||||
|
x="29.511229"
|
||||||
|
y="241.55487"
|
||||||
|
width="703.89746"
|
||||||
|
height="247.01991"
|
||||||
|
id="rect542" />
|
||||||
|
<rect
|
||||||
|
x="29.511229"
|
||||||
|
y="241.55487"
|
||||||
|
width="703.89746"
|
||||||
|
height="247.01991"
|
||||||
|
id="rect544" />
|
||||||
|
<rect
|
||||||
|
x="29.511229"
|
||||||
|
y="241.55487"
|
||||||
|
width="703.89746"
|
||||||
|
height="247.01991"
|
||||||
|
id="rect546" />
|
||||||
|
<rect
|
||||||
|
x="29.511229"
|
||||||
|
y="241.55487"
|
||||||
|
width="703.89746"
|
||||||
|
height="247.01991"
|
||||||
|
id="rect552" />
|
||||||
|
<rect
|
||||||
|
x="29.511229"
|
||||||
|
y="241.55487"
|
||||||
|
width="703.89746"
|
||||||
|
height="247.01991"
|
||||||
|
id="rect558" />
|
||||||
|
<rect
|
||||||
|
x="29.511229"
|
||||||
|
y="241.55487"
|
||||||
|
width="703.89746"
|
||||||
|
height="247.01991"
|
||||||
|
id="rect688" />
|
||||||
|
<rect
|
||||||
|
x="29.511229"
|
||||||
|
y="241.55487"
|
||||||
|
width="703.89746"
|
||||||
|
height="247.01991"
|
||||||
|
id="rect690" />
|
||||||
|
<rect
|
||||||
|
x="29.511229"
|
||||||
|
y="241.55487"
|
||||||
|
width="703.89746"
|
||||||
|
height="247.01991"
|
||||||
|
id="rect692" />
|
||||||
|
<rect
|
||||||
|
x="29.511229"
|
||||||
|
y="241.55487"
|
||||||
|
width="703.89746"
|
||||||
|
height="247.01991"
|
||||||
|
id="rect797" />
|
||||||
|
<rect
|
||||||
|
x="29.511229"
|
||||||
|
y="241.55487"
|
||||||
|
width="703.89746"
|
||||||
|
height="247.01991"
|
||||||
|
id="rect799" />
|
||||||
|
<rect
|
||||||
|
x="29.511229"
|
||||||
|
y="241.55487"
|
||||||
|
width="703.89746"
|
||||||
|
height="247.01991"
|
||||||
|
id="rect801" />
|
||||||
|
<rect
|
||||||
|
x="29.511229"
|
||||||
|
y="241.55487"
|
||||||
|
width="703.89746"
|
||||||
|
height="247.01991"
|
||||||
|
id="rect936" />
|
||||||
|
<rect
|
||||||
|
x="29.511229"
|
||||||
|
y="241.55487"
|
||||||
|
width="703.89746"
|
||||||
|
height="247.01991"
|
||||||
|
id="rect938" />
|
||||||
|
<rect
|
||||||
|
x="29.511229"
|
||||||
|
y="241.55487"
|
||||||
|
width="703.89746"
|
||||||
|
height="247.01991"
|
||||||
|
id="rect940" />
|
||||||
|
<rect
|
||||||
|
x="29.511229"
|
||||||
|
y="241.55487"
|
||||||
|
width="703.89746"
|
||||||
|
height="247.01991"
|
||||||
|
id="rect1088" />
|
||||||
|
<rect
|
||||||
|
x="29.511229"
|
||||||
|
y="241.55487"
|
||||||
|
width="703.89746"
|
||||||
|
height="247.01991"
|
||||||
|
id="rect1090" />
|
||||||
|
<rect
|
||||||
|
x="29.511229"
|
||||||
|
y="241.55487"
|
||||||
|
width="703.89746"
|
||||||
|
height="247.01991"
|
||||||
|
id="rect1092" />
|
||||||
|
<rect
|
||||||
|
x="29.511229"
|
||||||
|
y="241.55487"
|
||||||
|
width="703.89746"
|
||||||
|
height="247.01991"
|
||||||
|
id="rect1562" />
|
||||||
|
<rect
|
||||||
|
x="29.511229"
|
||||||
|
y="241.55487"
|
||||||
|
width="703.89746"
|
||||||
|
height="247.01991"
|
||||||
|
id="rect1564" />
|
||||||
|
<rect
|
||||||
|
x="29.511229"
|
||||||
|
y="241.55487"
|
||||||
|
width="703.89746"
|
||||||
|
height="247.01991"
|
||||||
|
id="rect1566" />
|
||||||
|
</defs>
|
||||||
|
<g
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer2"
|
||||||
|
inkscape:label="BG"
|
||||||
|
style="display:none"
|
||||||
|
transform="translate(-9.2390895,-64.757885)">
|
||||||
|
<rect
|
||||||
|
style="display:inline;fill:#000000;fill-opacity:1;stroke-width:0.0412021"
|
||||||
|
id="rect1828"
|
||||||
|
width="17.772917"
|
||||||
|
height="8.028266"
|
||||||
|
x="7.9025664"
|
||||||
|
y="63.659115"
|
||||||
|
inkscape:label="Background" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
inkscape:label="ARISE"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="g1560"
|
||||||
|
style="display:inline;fill:#65f85a;fill-opacity:1;stroke:#112b26;stroke-width:0.2;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
transform="translate(-6.5038345,-63.220897)">
|
||||||
|
<text
|
||||||
|
xml:space="preserve"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:6.06473px;font-family:'ROBOTECH GP';-inkscape-font-specification:'ROBOTECH GP';letter-spacing:-0.284284px;display:inline;fill:#65f85a;fill-opacity:1;stroke:#112b26;stroke-width:0.2;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
x="14.917694"
|
||||||
|
y="62.806774"
|
||||||
|
id="text1550"
|
||||||
|
transform="scale(0.9306992,1.074461)"
|
||||||
|
sodipodi:insensitive="true"
|
||||||
|
inkscape:label="E"><tspan
|
||||||
|
sodipodi:role="line"
|
||||||
|
id="tspan1548"
|
||||||
|
style="fill:#65f85a;fill-opacity:1;stroke:#112b26;stroke-width:0.2;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
x="14.917694"
|
||||||
|
y="62.806774"> e</tspan></text>
|
||||||
|
<text
|
||||||
|
xml:space="preserve"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:5.76972px;font-family:'ROBOTECH GP';-inkscape-font-specification:'ROBOTECH GP';letter-spacing:-0.29811px;display:inline;fill:#65f85a;fill-opacity:1;stroke:#112b26;stroke-width:0.2;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
x="16.334536"
|
||||||
|
y="59.891228"
|
||||||
|
id="text1558"
|
||||||
|
transform="scale(0.88753215,1.1267197)"
|
||||||
|
inkscape:label="S"
|
||||||
|
sodipodi:insensitive="true"><tspan
|
||||||
|
sodipodi:role="line"
|
||||||
|
id="tspan1556"
|
||||||
|
style="font-size:5.76972px;fill:#65f85a;fill-opacity:1;stroke:#112b26;stroke-width:0.2;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
x="16.334536"
|
||||||
|
y="59.891228"
|
||||||
|
dx="0">$</tspan></text>
|
||||||
|
<text
|
||||||
|
xml:space="preserve"
|
||||||
|
transform="matrix(0.26458333,0,0,0.26458333,2.7456913,0)"
|
||||||
|
id="text1546"
|
||||||
|
style="white-space:pre;shape-inside:url(#rect1566);display:inline;fill:#65f85a;fill-opacity:1;stroke:#112b26;stroke-width:0.755906;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
sodipodi:insensitive="true"
|
||||||
|
inkscape:label="I"><tspan
|
||||||
|
x="29.511719"
|
||||||
|
y="255.05469"
|
||||||
|
id="tspan6839"><tspan
|
||||||
|
style="font-weight:bold;font-family:Woodwarrior;-inkscape-font-specification:'Woodwarrior Bold'"
|
||||||
|
id="tspan6837"> I</tspan></tspan></text>
|
||||||
|
<text
|
||||||
|
xml:space="preserve"
|
||||||
|
id="text1542"
|
||||||
|
style="white-space:pre;shape-inside:url(#rect1564);display:inline;fill:#65f85a;fill-opacity:1;stroke:#112b26;stroke-width:0.755906;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
sodipodi:insensitive="true"
|
||||||
|
inkscape:label="R"
|
||||||
|
transform="scale(0.26458333)"><tspan
|
||||||
|
x="29.511719"
|
||||||
|
y="255.05469"
|
||||||
|
id="tspan6845"><tspan
|
||||||
|
style="font-family:Woodwarrior;-inkscape-font-specification:Woodwarrior"
|
||||||
|
id="tspan6841"> </tspan><tspan
|
||||||
|
style="font-weight:bold;font-family:Woodwarrior;-inkscape-font-specification:'Woodwarrior Bold'"
|
||||||
|
id="tspan6843">R</tspan></tspan></text>
|
||||||
|
<text
|
||||||
|
xml:space="preserve"
|
||||||
|
transform="matrix(-0.26458333,0,0,0.26458333,18.107909,0)"
|
||||||
|
id="text1534"
|
||||||
|
style="white-space:pre;shape-inside:url(#rect1562);display:inline;fill:#65f85a;fill-opacity:1;stroke:#112b26;stroke-width:0.755906;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
sodipodi:insensitive="true"
|
||||||
|
inkscape:label="A"><tspan
|
||||||
|
x="29.511719"
|
||||||
|
y="255.05469"
|
||||||
|
id="tspan6849"><tspan
|
||||||
|
style="font-weight:bold;font-family:Woodwarrior;-inkscape-font-specification:'Woodwarrior Bold'"
|
||||||
|
id="tspan6847">A</tspan></tspan></text>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 8.2 KiB |
255
docs/logo/arise-logo_flattened.svg
Normal file
|
|
@ -0,0 +1,255 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
width="14.042mm"
|
||||||
|
height="5.3959999mm"
|
||||||
|
viewBox="0 0 14.041999 5.3959999"
|
||||||
|
version="1.1"
|
||||||
|
id="svg5"
|
||||||
|
inkscape:version="1.2.1 (9c6d41e410, 2022-07-14)"
|
||||||
|
sodipodi:docname="arise-logo_flattened.svg"
|
||||||
|
inkscape:export-filename="arise-logo-transparent.png"
|
||||||
|
inkscape:export-xdpi="542.65778"
|
||||||
|
inkscape:export-ydpi="542.65778"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg">
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="namedview7"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#000000"
|
||||||
|
borderopacity="0.25"
|
||||||
|
inkscape:showpageshadow="2"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pagecheckerboard="0"
|
||||||
|
inkscape:deskcolor="#d1d1d1"
|
||||||
|
inkscape:document-units="mm"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:zoom="13.516172"
|
||||||
|
inkscape:cx="39.471234"
|
||||||
|
inkscape:cy="6.1407918"
|
||||||
|
inkscape:window-width="3440"
|
||||||
|
inkscape:window-height="1369"
|
||||||
|
inkscape:window-x="-8"
|
||||||
|
inkscape:window-y="-8"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="g1560" />
|
||||||
|
<defs
|
||||||
|
id="defs2">
|
||||||
|
<rect
|
||||||
|
x="29.511229"
|
||||||
|
y="241.55487"
|
||||||
|
width="703.89746"
|
||||||
|
height="247.01991"
|
||||||
|
id="rect176" />
|
||||||
|
<rect
|
||||||
|
x="29.511229"
|
||||||
|
y="241.55487"
|
||||||
|
width="703.89746"
|
||||||
|
height="247.01991"
|
||||||
|
id="rect440" />
|
||||||
|
<rect
|
||||||
|
x="29.511229"
|
||||||
|
y="241.55487"
|
||||||
|
width="703.89746"
|
||||||
|
height="247.01991"
|
||||||
|
id="rect475" />
|
||||||
|
<rect
|
||||||
|
x="29.511229"
|
||||||
|
y="241.55487"
|
||||||
|
width="703.89746"
|
||||||
|
height="247.01991"
|
||||||
|
id="rect542" />
|
||||||
|
<rect
|
||||||
|
x="29.511229"
|
||||||
|
y="241.55487"
|
||||||
|
width="703.89746"
|
||||||
|
height="247.01991"
|
||||||
|
id="rect544" />
|
||||||
|
<rect
|
||||||
|
x="29.511229"
|
||||||
|
y="241.55487"
|
||||||
|
width="703.89746"
|
||||||
|
height="247.01991"
|
||||||
|
id="rect546" />
|
||||||
|
<rect
|
||||||
|
x="29.511229"
|
||||||
|
y="241.55487"
|
||||||
|
width="703.89746"
|
||||||
|
height="247.01991"
|
||||||
|
id="rect552" />
|
||||||
|
<rect
|
||||||
|
x="29.511229"
|
||||||
|
y="241.55487"
|
||||||
|
width="703.89746"
|
||||||
|
height="247.01991"
|
||||||
|
id="rect558" />
|
||||||
|
<rect
|
||||||
|
x="29.511229"
|
||||||
|
y="241.55487"
|
||||||
|
width="703.89746"
|
||||||
|
height="247.01991"
|
||||||
|
id="rect688" />
|
||||||
|
<rect
|
||||||
|
x="29.511229"
|
||||||
|
y="241.55487"
|
||||||
|
width="703.89746"
|
||||||
|
height="247.01991"
|
||||||
|
id="rect690" />
|
||||||
|
<rect
|
||||||
|
x="29.511229"
|
||||||
|
y="241.55487"
|
||||||
|
width="703.89746"
|
||||||
|
height="247.01991"
|
||||||
|
id="rect692" />
|
||||||
|
<rect
|
||||||
|
x="29.511229"
|
||||||
|
y="241.55487"
|
||||||
|
width="703.89746"
|
||||||
|
height="247.01991"
|
||||||
|
id="rect797" />
|
||||||
|
<rect
|
||||||
|
x="29.511229"
|
||||||
|
y="241.55487"
|
||||||
|
width="703.89746"
|
||||||
|
height="247.01991"
|
||||||
|
id="rect799" />
|
||||||
|
<rect
|
||||||
|
x="29.511229"
|
||||||
|
y="241.55487"
|
||||||
|
width="703.89746"
|
||||||
|
height="247.01991"
|
||||||
|
id="rect801" />
|
||||||
|
<rect
|
||||||
|
x="29.511229"
|
||||||
|
y="241.55487"
|
||||||
|
width="703.89746"
|
||||||
|
height="247.01991"
|
||||||
|
id="rect936" />
|
||||||
|
<rect
|
||||||
|
x="29.511229"
|
||||||
|
y="241.55487"
|
||||||
|
width="703.89746"
|
||||||
|
height="247.01991"
|
||||||
|
id="rect938" />
|
||||||
|
<rect
|
||||||
|
x="29.511229"
|
||||||
|
y="241.55487"
|
||||||
|
width="703.89746"
|
||||||
|
height="247.01991"
|
||||||
|
id="rect940" />
|
||||||
|
<rect
|
||||||
|
x="29.511229"
|
||||||
|
y="241.55487"
|
||||||
|
width="703.89746"
|
||||||
|
height="247.01991"
|
||||||
|
id="rect1088" />
|
||||||
|
<rect
|
||||||
|
x="29.511229"
|
||||||
|
y="241.55487"
|
||||||
|
width="703.89746"
|
||||||
|
height="247.01991"
|
||||||
|
id="rect1090" />
|
||||||
|
<rect
|
||||||
|
x="29.511229"
|
||||||
|
y="241.55487"
|
||||||
|
width="703.89746"
|
||||||
|
height="247.01991"
|
||||||
|
id="rect1092" />
|
||||||
|
<rect
|
||||||
|
x="29.511229"
|
||||||
|
y="241.55487"
|
||||||
|
width="703.89746"
|
||||||
|
height="247.01991"
|
||||||
|
id="rect1562" />
|
||||||
|
<rect
|
||||||
|
x="29.511229"
|
||||||
|
y="241.55487"
|
||||||
|
width="703.89746"
|
||||||
|
height="247.01991"
|
||||||
|
id="rect1564" />
|
||||||
|
<rect
|
||||||
|
x="29.511229"
|
||||||
|
y="241.55487"
|
||||||
|
width="703.89746"
|
||||||
|
height="247.01991"
|
||||||
|
id="rect1566" />
|
||||||
|
</defs>
|
||||||
|
<g
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer2"
|
||||||
|
inkscape:label="BG"
|
||||||
|
style="display:none"
|
||||||
|
transform="translate(-9.2390895,-64.757885)">
|
||||||
|
<rect
|
||||||
|
style="display:inline;fill:#000000;fill-opacity:1;stroke-width:0.0412021"
|
||||||
|
id="rect1828"
|
||||||
|
width="17.772917"
|
||||||
|
height="8.028266"
|
||||||
|
x="7.9025664"
|
||||||
|
y="63.659115"
|
||||||
|
inkscape:label="Background" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
inkscape:label="ARISE"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="g1560"
|
||||||
|
style="display:inline;fill:#65f85a;fill-opacity:1;stroke:#112b26;stroke-width:0.2;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
transform="translate(-6.5038345,-63.220897)">
|
||||||
|
<g
|
||||||
|
aria-label=" e"
|
||||||
|
transform="scale(0.9306992,1.074461)"
|
||||||
|
id="text1550"
|
||||||
|
style="font-size:6.06473px;font-family:'ROBOTECH GP';-inkscape-font-specification:'ROBOTECH GP';letter-spacing:-0.284284px;display:inline"
|
||||||
|
inkscape:label="E">
|
||||||
|
<path
|
||||||
|
d="m 20.745521,62.164173 v 0.642601 H 18.494938 V 62.164173 Z M 20.567843,60.98854 v 0.633717 H 18.494938 V 60.98854 Z m 0.325743,-1.137137 -0.325743,0.645562 h -2.072905 v -0.645562 z"
|
||||||
|
id="path6851" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
aria-label="$"
|
||||||
|
transform="scale(0.88753215,1.1267197)"
|
||||||
|
id="text1558"
|
||||||
|
style="font-size:5.76972px;font-family:'ROBOTECH GP';-inkscape-font-specification:'ROBOTECH GP';letter-spacing:-0.29811px;display:inline"
|
||||||
|
inkscape:label="S">
|
||||||
|
<path
|
||||||
|
d="m 17.968538,58.172708 h 0.152132 q 0.743753,0.123958 0.749387,0.774742 v 0.07888 q -0.0056,0.774743 -0.743753,0.864895 h -0.157766 v 0.476114 h -0.704311 v -0.476114 h -0.926874 l 0.278907,-0.608525 h 0.647967 V 58.764329 H 17.08674 Q 16.342987,58.64037 16.337353,57.992404 v -0.07888 q 0.0056,-0.743753 0.743753,-0.836722 h 0.183121 v -0.433856 h 0.704311 v 0.433856 h 0.904336 l -0.284541,0.605708 h -0.619795 z m -0.704311,-0.490201 h -0.01972 q -0.208476,0.03099 -0.205659,0.259186 0,0.202842 0.22538,0.231015 z m 0.704311,1.597378 q 0.200025,-0.04226 0.200025,-0.270455 0,-0.191573 -0.200025,-0.239466 z"
|
||||||
|
id="path6854" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
aria-label=" I"
|
||||||
|
transform="matrix(0.26458333,0,0,0.26458333,2.7456913,0)"
|
||||||
|
id="text1546"
|
||||||
|
style="white-space:pre;shape-inside:url(#rect1566);display:inline;stroke-width:0.755906"
|
||||||
|
inkscape:label="I">
|
||||||
|
<path
|
||||||
|
d="m 42.591737,255.05469 v -12 h -2.268 v 12 z"
|
||||||
|
style="font-weight:bold;font-family:Woodwarrior;-inkscape-font-specification:'Woodwarrior Bold'"
|
||||||
|
id="path6857" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
aria-label=" R"
|
||||||
|
transform="scale(0.26458333)"
|
||||||
|
id="text1542"
|
||||||
|
style="white-space:pre;shape-inside:url(#rect1564);display:inline;stroke-width:0.755906"
|
||||||
|
inkscape:label="R">
|
||||||
|
<path
|
||||||
|
d="m 44.547737,245.23869 c 1.344,0 2.424,1.092 2.424,2.46 0,0.876 -0.468,1.656 -1.152,2.088 l -2.856,-4.548 z m 2.424,6.384 c 1.296,-0.816 2.148,-2.268 2.148,-3.924 0,-2.568 -2.052,-4.644 -4.572,-4.644 h -4.236 v 1.992 l 3.204,5.112 h -3.204 v 4.896 h 2.148 v -2.712 h 2.412 l 1.716,2.712 h 2.532 z"
|
||||||
|
style="font-weight:bold;font-family:Woodwarrior;-inkscape-font-specification:'Woodwarrior Bold'"
|
||||||
|
id="path6860" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
aria-label="A"
|
||||||
|
transform="matrix(-0.26458333,0,0,0.26458333,18.107909,0)"
|
||||||
|
id="text1534"
|
||||||
|
style="white-space:pre;shape-inside:url(#rect1562);display:inline;stroke-width:0.755906"
|
||||||
|
inkscape:label="A">
|
||||||
|
<path
|
||||||
|
d="m 33.015719,249.05469 -1.344,1.98 v -3.96 z m 6.684,6 -8.136,-12 h -2.052 v 12 h 2.052 l 2.76,-4.068 2.736,4.068 z"
|
||||||
|
style="font-weight:bold;font-family:Woodwarrior;-inkscape-font-specification:'Woodwarrior Bold'"
|
||||||
|
id="path6863" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 7.8 KiB |
BIN
docs/logo/arise-logo_transparent.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
docs/logo/fonts/robotech-gp.zip
Normal file
BIN
docs/logo/fonts/woodwarrior.zip
Normal file
13
lib/functions/README.md
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
# Arise Functions
|
||||||
|
|
||||||
|
Like most larger projects build in Bash, Arise is a modular program split up into functions. The folders in this directory contain the source files for each function defined for use by Arise.
|
||||||
|
|
||||||
|
## Implementation Notes
|
||||||
|
|
||||||
|
Bash is an interesting language because its functions are "fake" in the sense that they are simply a reader-friendly way of performing command grouping operations and nothing more. They are not capable of actually returning data in the way that functions do in most other programming languages. What's more fun is that unless you're careful, modifications to environment variables within a function will carry over to subsequent actions outside of that function due to the dynamic variable scoping in Bash.
|
||||||
|
|
||||||
|
As a result of this limitation, Arise makes use of subshells to work around limitations with variable scoping and shell variables. While this may not be the most efficient workaround, it prevents the dynamic scoping of environment conditions from within subshell functions from contaminating parent functions. Not all functions need this, and thus many functions are simply run inline instead of being routed into a subshell.
|
||||||
|
|
||||||
|
There are two types of functions Arise uses are referred to as **Inline** and **Subshell**. The difference between these two function categories is that **Inline** functions are declared with `{}` and **Subshell** functions are declared with `()`. For organisational purposes, these two respective function categories have their own respective folder for source files
|
||||||
|
|
||||||
|
Upon program run, Arise pulls in all `*.sh` files in both the `inline` and `subshell` directories. As a convention, each function is broken up into its own source file. The convention used for naming source files is `function_name.sh`. Documentation for individual functions and their usage can be found in the comments at the top of each function source file.
|
||||||
37
lib/functions/inline/arise_help.sh
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
#!/bin/bash
|
||||||
|
#############
|
||||||
|
# DESCRIPTION
|
||||||
|
#############
|
||||||
|
# Prints help
|
||||||
|
#
|
||||||
|
#############
|
||||||
|
# Usage:
|
||||||
|
# arise_help
|
||||||
|
|
||||||
|
arise_help() {
|
||||||
|
cat <<EOF
|
||||||
|
Arise, v$arise_version
|
||||||
|
|
||||||
|
Welcome to Arise, a static site generator written in Bash
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
------
|
||||||
|
bash arise build -[k][f]
|
||||||
|
# Builds the entire site
|
||||||
|
available in all build modes:
|
||||||
|
-k: Keeps source files in output
|
||||||
|
-f: Force overwrite pre-existing output
|
||||||
|
bash arise -[p|s|r][k][f]
|
||||||
|
# Builds only specific parts of the site
|
||||||
|
# Useful for testing purposes
|
||||||
|
mutually exclusive options:
|
||||||
|
-p: Build pages only mode
|
||||||
|
-s: Build sitemap only mode
|
||||||
|
-r: Build rss only mode
|
||||||
|
|
||||||
|
------
|
||||||
|
Please visit GitHub for more detailed info:
|
||||||
|
https://github.com/spectrasecure/arise
|
||||||
|
|
||||||
|
EOF
|
||||||
|
}
|
||||||
37
lib/functions/inline/arise_logo.sh
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
#!/bin/bash
|
||||||
|
#############
|
||||||
|
# DESCRIPTION
|
||||||
|
#############
|
||||||
|
# Displays ASCII art of the Arise logo :)
|
||||||
|
#
|
||||||
|
#############
|
||||||
|
# Usage:
|
||||||
|
# arise_logo
|
||||||
|
|
||||||
|
arise_logo() {
|
||||||
|
cat <<EOF
|
||||||
|
=========================================================
|
||||||
|
=========================================================
|
||||||
|
|
||||||
|
@@@
|
||||||
|
@@#@ @####@@@ ##@ @@@#+@@@@@ @@@@@@@@@@
|
||||||
|
@++@ @+++++++@ ++@ @+++++++@ @++++++++@
|
||||||
|
@+++@ @++@@@*++@ ++@ @++++++++@ @+++++++@
|
||||||
|
@@+*+@ @++@ @@+@ ++@ @++@#+@@@ @@@@@@@@@
|
||||||
|
@++@+@ @++@ @++@ ++@ @++@#+@
|
||||||
|
@++@@+@ @++@ @++@ ++@ @++@#+@@@ @@@@@@@@@
|
||||||
|
@#+#@@+@ @++@ @++@ ++@ *+++++++@ @+++++++@
|
||||||
|
@+++@@+@ @++@++@ ++@ @@+++++++ @+++++++@
|
||||||
|
@++++@@+@ @@@@@++++@ ++@ @@#+@@++@ @@@@@@@@@
|
||||||
|
@#+@@++@+@ @++++++#@ ++@ #+@@++@
|
||||||
|
@++@ @+++@ @+@@@@++@ ++@ @@@#+@@++@ @@@@@@@@@@
|
||||||
|
@++@ @+++@ @+@ @++@ ++@ @++++++++ @++++++++@
|
||||||
|
@*+@@ @++@ @+@ @++@ ++@ ++++++++@ @++++++++@
|
||||||
|
@@@@ @@@ @@@ @@@@ @@@ @@@@#+@@@ @@@@@@@@@@
|
||||||
|
@@@
|
||||||
|
|
||||||
|
=========================================================
|
||||||
|
=========================================================
|
||||||
|
|
||||||
|
EOF
|
||||||
|
}
|
||||||
13
lib/functions/inline/build_footer.sh
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/bash
|
||||||
|
#############
|
||||||
|
# DESCRIPTION
|
||||||
|
#############
|
||||||
|
# Appends the footer/closing tags to a page.
|
||||||
|
#
|
||||||
|
#############
|
||||||
|
# Usage:
|
||||||
|
# build_footer destination.html
|
||||||
|
|
||||||
|
build_footer() {
|
||||||
|
cat $config/footer.html >> $1
|
||||||
|
}
|
||||||
38
lib/functions/inline/build_header.sh
Normal file
|
|
@ -0,0 +1,38 @@
|
||||||
|
#!/bin/bash
|
||||||
|
#############
|
||||||
|
# DESCRIPTION
|
||||||
|
#############
|
||||||
|
# Builds the page header
|
||||||
|
#
|
||||||
|
# This function assumes that metadata has already been fetched in the current subshell. If no metadata is present, it will do nothing.
|
||||||
|
#
|
||||||
|
#############
|
||||||
|
# Usage:
|
||||||
|
# build_header destination.html
|
||||||
|
|
||||||
|
build_header() {
|
||||||
|
# Verify that metadata variables are populated before running.
|
||||||
|
[[ $title != '' ]] && {
|
||||||
|
cat $config/header.html > $1
|
||||||
|
|
||||||
|
# If enabled (default:true), add a configurable content header after the metadata header. The purpose of this is to enable a standardised header for stuff like post dates that should be on *most* pages, but can be disabled on pages the user considers special and wants to build out completely on their own.
|
||||||
|
[[ $content_header == "true" ]] && cat $config/content_header.html >> $1
|
||||||
|
|
||||||
|
# Replace all tags in {{this format}} with their value. We do this using Bash pattern replacement.
|
||||||
|
page_contents="$(cat $1)"
|
||||||
|
|
||||||
|
page_contents="${page_contents//\{\{title\}\}/"$title"}"
|
||||||
|
page_contents="${page_contents//\{\{author\}\}/"$author"}"
|
||||||
|
page_contents="${page_contents//\{\{description\}\}/"$description"}"
|
||||||
|
page_contents="${page_contents//\{\{language\}\}/"$language"}"
|
||||||
|
page_contents="${page_contents//\{\{thumbnail\}\}/"$thumbnail"}"
|
||||||
|
page_contents="${page_contents//\{\{published_date\}\}/"$published_date"}"
|
||||||
|
page_contents="${page_contents//\{\{modified_date\}\}/"$modified_date"}"
|
||||||
|
page_contents="${page_contents//\{\{canonical_url\}\}/"$canonical_url"}"
|
||||||
|
page_contents="${page_contents//\{\{base_url\}\}/"$base_url"}"
|
||||||
|
page_contents="${page_contents//\{\{global_name\}\}/"$global_name"}"
|
||||||
|
|
||||||
|
echo "$page_contents" > $1
|
||||||
|
page_contents=""
|
||||||
|
}
|
||||||
|
}
|
||||||
25
lib/functions/inline/clean_xml_string.sh
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
#!/bin/bash
|
||||||
|
#############
|
||||||
|
# DESCRIPTION
|
||||||
|
#############
|
||||||
|
# Cleans special characters out of a string intended for use in xml format
|
||||||
|
#
|
||||||
|
#############
|
||||||
|
# Usage:
|
||||||
|
# clean_xml_string "string with special characters"
|
||||||
|
|
||||||
|
clean_xml_string() {
|
||||||
|
# unclean string -> clean string
|
||||||
|
input_string="$1"
|
||||||
|
# replace & with &
|
||||||
|
input_string=${input_string//\&/\&}
|
||||||
|
# replace < with <
|
||||||
|
input_string=${input_string//</\<}
|
||||||
|
# replace > with >
|
||||||
|
input_string=${input_string//>/\>}
|
||||||
|
# replace ' with '
|
||||||
|
input_string=${input_string//\'/\'}
|
||||||
|
# replace " with "
|
||||||
|
input_string=${input_string//\"/\"}
|
||||||
|
echo "$input_string"
|
||||||
|
}
|
||||||
22
lib/functions/inline/clear_metadata.sh
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
#!/bin/bash
|
||||||
|
#############
|
||||||
|
# DESCRIPTION
|
||||||
|
#############
|
||||||
|
# Clears the metadata variables to prevent metadata from carrying over to the wrong page. This is important because of how promiscuous bash is with its variables.
|
||||||
|
#
|
||||||
|
#############
|
||||||
|
# Usage:
|
||||||
|
# clear_metadata
|
||||||
|
|
||||||
|
clear_metadata() {
|
||||||
|
metadata=''
|
||||||
|
title=''
|
||||||
|
author=''
|
||||||
|
description=''
|
||||||
|
language=''
|
||||||
|
thumbnail=''
|
||||||
|
published_date=''
|
||||||
|
modified_date=''
|
||||||
|
relative_url=''
|
||||||
|
canonical_url=''
|
||||||
|
}
|
||||||
96
lib/functions/inline/get_page_metadata.sh
Normal file
|
|
@ -0,0 +1,96 @@
|
||||||
|
#!/bin/bash
|
||||||
|
#############
|
||||||
|
# DESCRIPTION
|
||||||
|
#############
|
||||||
|
# Pulls all the Arise-specific metadata from the header of a given page.
|
||||||
|
#
|
||||||
|
# This function is meant to be run inline before other functions so that it can populate the information other functions need to operate upon.
|
||||||
|
#
|
||||||
|
#############
|
||||||
|
# Usage:
|
||||||
|
# get_page_metadata source.md
|
||||||
|
|
||||||
|
get_page_metadata() {
|
||||||
|
if [[ -e $1 ]]; then
|
||||||
|
metadata=$(sed -e '/END ARISE/,$d' < $1)
|
||||||
|
|
||||||
|
# Main page metadata
|
||||||
|
title="$(grep "Title::" <<< $metadata)" # Grab the line with the metadata we want
|
||||||
|
title="${title%\"}" # Remove the trailing quote at the end
|
||||||
|
title="${title#Title:: }" # Remove the name of the metadata variable from the start
|
||||||
|
title="${title#\"}" # Remove the quote at the start of the parsed variable
|
||||||
|
|
||||||
|
author="$(grep "Author::" <<< $metadata)"
|
||||||
|
author="${author%\"}"
|
||||||
|
author="${author#Author:: }"
|
||||||
|
author="${author#\"}"
|
||||||
|
|
||||||
|
description="$(grep "Description::" <<< $metadata)"
|
||||||
|
description="${description%\"}"
|
||||||
|
description="${description#Description:: }"
|
||||||
|
description="${description#\"}"
|
||||||
|
|
||||||
|
language="$(grep "Language::" <<< $metadata)"
|
||||||
|
language="${language%\"}"
|
||||||
|
language="${language#Language:: }"
|
||||||
|
language="${language#\"}"
|
||||||
|
|
||||||
|
thumbnail="$(grep "Thumbnail::" <<< $metadata)"
|
||||||
|
thumbnail="${thumbnail%\"}"
|
||||||
|
thumbnail="${thumbnail#Thumbnail:: }"
|
||||||
|
thumbnail="${thumbnail#\"}"
|
||||||
|
|
||||||
|
published_date="$(grep "Published Date::" <<< $metadata)"
|
||||||
|
published_date="${published_date%\"}"
|
||||||
|
published_date="${published_date#Published Date:: }"
|
||||||
|
published_date="${published_date#\"}"
|
||||||
|
|
||||||
|
modified_date="$(grep "Modified Date::" <<< $metadata)"
|
||||||
|
modified_date="${modified_date%\"}"
|
||||||
|
modified_date="${modified_date#Modified Date:: }"
|
||||||
|
modified_date="${modified_date#\"}"
|
||||||
|
|
||||||
|
# Clean metadata of XML special characters so we don't break the sitemap or RSS feed
|
||||||
|
title="$(clean_xml_string "$title")"
|
||||||
|
author="$(clean_xml_string "$author")"
|
||||||
|
description="$(clean_xml_string "$description")"
|
||||||
|
language="$(clean_xml_string "$language")"
|
||||||
|
thumbnail="$(clean_xml_string "$thumbnail")"
|
||||||
|
published_date="$(clean_xml_string "$published_date")"
|
||||||
|
modified_date="$(clean_xml_string "$modified_date")"
|
||||||
|
|
||||||
|
# Optional page settings with default settings
|
||||||
|
|
||||||
|
# is_toc default: false
|
||||||
|
is_toc=$(grep "toc::" <<< $metadata | cut -d '"' -f2)
|
||||||
|
if [[ $is_toc != "true" ]]; then
|
||||||
|
is_toc="false"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# process_markdown default: true
|
||||||
|
process_markdown=$(grep "process_markdown::" <<< $metadata | cut -d '"' -f2)
|
||||||
|
if [[ $process_markdown != "false" ]]; then
|
||||||
|
process_markdown="true"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# content_header default: true
|
||||||
|
content_header=$(grep "content_header::" <<< $metadata | cut -d '"' -f2)
|
||||||
|
if [[ $content_header != "false" ]]; then
|
||||||
|
content_header="true"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# rss_hide default: false
|
||||||
|
rss_hide=$(grep "rss_hide::" <<< $metadata | cut -d '"' -f2)
|
||||||
|
if [[ $rss_hide != "true" ]]; then
|
||||||
|
rss_hide="false"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# URL
|
||||||
|
relative_url="$(realpath $(dirname $1) | sed 's@.*arise-out@@g')"'/'
|
||||||
|
canonical_url="$base_url""$relative_url"
|
||||||
|
else
|
||||||
|
# Clear out metadata so that anything calling this function expecting to get new data cannot get old values on accident if the requested file does not exist.
|
||||||
|
clear_metadata
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
35
lib/functions/subshell/build_page.sh
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
#!/bin/bash
|
||||||
|
#############
|
||||||
|
# DESCRIPTION
|
||||||
|
#############
|
||||||
|
# Builds a page from a source .md file and outputs the built version to 'index.html' in the same directory
|
||||||
|
#
|
||||||
|
#############
|
||||||
|
# Usage:
|
||||||
|
# build_page source.md
|
||||||
|
|
||||||
|
build_page() (
|
||||||
|
|
||||||
|
# Switch to page directory
|
||||||
|
page=$(basename $1)
|
||||||
|
cd $(dirname $1)
|
||||||
|
|
||||||
|
get_page_metadata $page
|
||||||
|
|
||||||
|
if [[ $is_toc == "true" ]]; then
|
||||||
|
build_toc $page
|
||||||
|
elif [[ $process_markdown == "false" ]]; then
|
||||||
|
build_header index.html
|
||||||
|
cat $page | sed -e '1,/END ARISE/d' | cat >> index.html
|
||||||
|
build_footer index.html
|
||||||
|
else
|
||||||
|
build_header index.html
|
||||||
|
# Grab everything after the Arise metadata block, run it through pandoc to convert to html, and append to our file in progress
|
||||||
|
cat $page | sed -e '1,/END ARISE/d' | pandoc -f markdown -t html >> index.html
|
||||||
|
build_footer index.html
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Inline Evaluations - DISABLED, WIP, ENABLE AT YOUR OWN PERIL
|
||||||
|
# evaluate_inline index.html
|
||||||
|
|
||||||
|
)
|
||||||
22
lib/functions/subshell/build_page_tree.sh
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
#!/bin/bash
|
||||||
|
#############
|
||||||
|
# DESCRIPTION
|
||||||
|
#############
|
||||||
|
# Builds all pages on the site by calling "build_page" for every markdown file it can find outside of /config.
|
||||||
|
#
|
||||||
|
# Note that this function actually takes the root site directory to recursively build from as an argument.
|
||||||
|
#
|
||||||
|
#############
|
||||||
|
# Usage:
|
||||||
|
# build_page /path/to/arise-out/
|
||||||
|
|
||||||
|
build_page_tree() (
|
||||||
|
cd $1
|
||||||
|
|
||||||
|
find . -type f -name "index.md" -not \( -path ./config -prune \) | while read fname; do
|
||||||
|
build_page $fname
|
||||||
|
|
||||||
|
# Add the source file to the list of files to remove in cleanup
|
||||||
|
echo "$(realpath $fname)" >> $removelist
|
||||||
|
done
|
||||||
|
)
|
||||||
78
lib/functions/subshell/build_rss.sh
Normal file
|
|
@ -0,0 +1,78 @@
|
||||||
|
#!/bin/bash
|
||||||
|
#############
|
||||||
|
# DESCRIPTION
|
||||||
|
#############
|
||||||
|
# Recursively crawls through the site and reads page metadata to generate an RSS feed for all content on the website.
|
||||||
|
#
|
||||||
|
# The script will output the completed RSS feed to the location specified as an argument.
|
||||||
|
#
|
||||||
|
#############
|
||||||
|
# Usage:
|
||||||
|
# build_rss rss.xml
|
||||||
|
|
||||||
|
build_rss() (
|
||||||
|
|
||||||
|
# Switch to rss file's directory
|
||||||
|
touch $1
|
||||||
|
rss=$(realpath $1)
|
||||||
|
cd $(dirname $1)
|
||||||
|
|
||||||
|
# Wipe out the existing rss feed, if there is one, and declare our new rss feed
|
||||||
|
# Note that metadata descriptors are pulled from the index.md file that lives in the same folder as the destination for the rss.xml file.
|
||||||
|
get_page_metadata index.md
|
||||||
|
cat > $rss <<EOF
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
|
||||||
|
<channel>
|
||||||
|
<title>$global_name</title>
|
||||||
|
<description>$description</description>
|
||||||
|
<link>$base_url</link>
|
||||||
|
<language>$language</language>
|
||||||
|
<generator>Arise</generator>
|
||||||
|
EOF
|
||||||
|
|
||||||
|
[[ $favicon != '' ]] && {
|
||||||
|
cat >> $rss <<EOF
|
||||||
|
<image>
|
||||||
|
<url>$base_url$favicon</url>
|
||||||
|
<title>$global_name</title>
|
||||||
|
<link>$base_url</link>
|
||||||
|
</image>
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
|
cat >> $rss <<EOF
|
||||||
|
<atom:link href="$base_url/rss.xml" rel="self" type="application/rss+xml"/>
|
||||||
|
<ttl>60</ttl>
|
||||||
|
<lastBuildDate>$(date --rfc-822)</lastBuildDate>
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# List every directory in our sitemap (except config). This makes up our sitemap since Arise is built to use directory roots as page URLs
|
||||||
|
find . -type d -not \( -path ./config -prune \) | while read fname; do
|
||||||
|
page_index=$(realpath "$fname"'/index.md')
|
||||||
|
|
||||||
|
if [ -e $page_index ]; then
|
||||||
|
get_page_metadata $page_index
|
||||||
|
|
||||||
|
if [[ $rss_hide != "true" ]] && [[ $is_toc != "true" ]]; then
|
||||||
|
# Convert html's ISO8601 date to RSS's RFC-822. Fuck you RSS.
|
||||||
|
rss_date=$(date -d "$published_date" --rfc-822)
|
||||||
|
|
||||||
|
cat >> $rss <<EOF
|
||||||
|
<item>
|
||||||
|
<title>$title</title>
|
||||||
|
<dc:creator>$author</dc:creator>
|
||||||
|
<description>$description</description>
|
||||||
|
<link>$canonical_url</link>
|
||||||
|
<pubDate>$rss_date</pubDate>
|
||||||
|
</item>
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
clear_metadata
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Close up the rss feed
|
||||||
|
echo -e '</channel>\n</rss>' >> $rss
|
||||||
|
|
||||||
|
)
|
||||||
44
lib/functions/subshell/build_sitemap.sh
Normal file
|
|
@ -0,0 +1,44 @@
|
||||||
|
#!/bin/bash
|
||||||
|
#############
|
||||||
|
# DESCRIPTION
|
||||||
|
#############
|
||||||
|
# Automatically generates a sitemap at the given file location.
|
||||||
|
#
|
||||||
|
# Note that this function will map out your site using the specified location as the root of its mapping crawl. If you define a sitemap location in a subdirectory of your website, it will only map subfolders of that location.
|
||||||
|
#
|
||||||
|
#############
|
||||||
|
# Usage:
|
||||||
|
# build_sitemap /path/to/sitemap.xml
|
||||||
|
|
||||||
|
build_sitemap() (
|
||||||
|
|
||||||
|
# Switch to sitemap directory
|
||||||
|
touch $1
|
||||||
|
sitemap=$(basename $1)
|
||||||
|
cd $(dirname $1)
|
||||||
|
|
||||||
|
# Wipe out the existing sitemap, if there is one, and declare our new sitemap
|
||||||
|
echo '<?xml version="1.0" encoding="UTF-8"?>' > $sitemap
|
||||||
|
echo '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">' >> $sitemap
|
||||||
|
|
||||||
|
# List every directory in our sitemap (except config). This makes up our sitemap since Arise is built to use directory roots as page URLs
|
||||||
|
find . -type d -not \( -path ./config -prune \) | while read fname; do
|
||||||
|
|
||||||
|
# Rewrite the local path from the find command as the live web URL as the <loc> tag for the sitemap standard
|
||||||
|
echo -e '<url>\n<loc>'"$base_url"'/'"$(echo $fname | sed -n -e 's|\.\/||p')"'</loc>' >> $sitemap
|
||||||
|
|
||||||
|
# If this page contains a Arise-style index page with a date modified, include that as a <lastmod> for the sitemap standard
|
||||||
|
modified_date=''
|
||||||
|
get_page_metadata $fname/index.md
|
||||||
|
if [ -n "$modified_date" ]; then
|
||||||
|
echo '<lastmod>'"$modified_date"'</lastmod>' >> $sitemap
|
||||||
|
fi
|
||||||
|
clear_metadata
|
||||||
|
|
||||||
|
# Close the <url> tag for the current URL being looped through
|
||||||
|
echo '</url>' >> $sitemap
|
||||||
|
done
|
||||||
|
|
||||||
|
# Close up the sitemap
|
||||||
|
echo '</urlset>' >> $sitemap
|
||||||
|
)
|
||||||
51
lib/functions/subshell/build_toc.sh
Normal file
|
|
@ -0,0 +1,51 @@
|
||||||
|
#!/bin/bash
|
||||||
|
#############
|
||||||
|
# DESCRIPTION
|
||||||
|
#############
|
||||||
|
# Creates a table of contents at the location of the specified source file.
|
||||||
|
#
|
||||||
|
#############
|
||||||
|
# Usage:
|
||||||
|
# build_toc index.md
|
||||||
|
|
||||||
|
build_toc() (
|
||||||
|
|
||||||
|
# Throw the metadata header together and add the source file to the list of files to remove in cleanup
|
||||||
|
toc_source=$(basename $1)
|
||||||
|
cd $(dirname $1)
|
||||||
|
get_page_metadata $toc_source
|
||||||
|
echo "$(realpath $toc_source)" >> $removelist
|
||||||
|
build_header index.html
|
||||||
|
|
||||||
|
# Add the title and start of the table for the TOC
|
||||||
|
cat >> index.html <<EOF
|
||||||
|
<h1>$title</h1>
|
||||||
|
<p id="arise-toc">
|
||||||
|
<table id="arise-toc-table">
|
||||||
|
<tr class="arise-toc-tr">
|
||||||
|
<th class="arise-toc-th">Date</th>
|
||||||
|
<th class="arise-toc-th">Title</th>
|
||||||
|
<th class="arise-toc-th">Description</th>
|
||||||
|
</tr>
|
||||||
|
EOF
|
||||||
|
clear_metadata
|
||||||
|
|
||||||
|
# Make each entry into an individual table row. For now we're storing these in a temp file so that we can sort if after we're done generating all the entries in the TOC.
|
||||||
|
toc_tmp="arise-toc-$RANDOM.tmp"
|
||||||
|
find . -mindepth 2 -maxdepth 2 -type f -name 'index.md' | while read fname; do
|
||||||
|
get_page_metadata $fname
|
||||||
|
echo '<tr class="arise-toc-tr"><td class="arise-toc-td">'"$published_date"'</td><td class="arise-toc-td"><a href="'"$canonical_url"'">'"$title"'</a></td><td class="arise-toc-td">'"$description"'</td></tr>' >> $toc_tmp
|
||||||
|
clear_metadata
|
||||||
|
done
|
||||||
|
|
||||||
|
# Sort all of our contents by date so that they're not in random order
|
||||||
|
sort -r $toc_tmp >> index.html
|
||||||
|
rm $toc_tmp
|
||||||
|
|
||||||
|
# Final page bits
|
||||||
|
cat >> index.html <<EOF
|
||||||
|
</table>
|
||||||
|
</p>
|
||||||
|
EOF
|
||||||
|
build_footer index.html
|
||||||
|
)
|
||||||
26
lib/functions/subshell/evaluate_inline.sh
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
#!/bin/bash
|
||||||
|
#############
|
||||||
|
# DESCRIPTION
|
||||||
|
#############
|
||||||
|
# Evaluates inline bash snippets when building pages.
|
||||||
|
#
|
||||||
|
# This functionality is currently disabled for initial release because even though it "works". When called by build_page, the parsing isn't very good and the syntax for calling an inline evaluation could use some work.
|
||||||
|
#
|
||||||
|
#############
|
||||||
|
# Function Usage:
|
||||||
|
# evaluate_inline index.html
|
||||||
|
#
|
||||||
|
# Inline Snippet Usage:
|
||||||
|
# <pre>sh# echo "Hello World!" </pre>
|
||||||
|
|
||||||
|
evaluate_inline() (
|
||||||
|
|
||||||
|
evaluation_source=$(basename $1)
|
||||||
|
cd $(dirname $1)
|
||||||
|
|
||||||
|
while grep "<pre>sh#" $evaluation_source
|
||||||
|
do
|
||||||
|
replacement=$(bash <<< $(sed -n -e s$'\001''<pre>sh#\(.*\)</pre>'$'\001''\1'$'\001''p' < $evaluation_source | head -1))
|
||||||
|
awk 'NR==1,/<pre>sh#.*<\/pre>/{sub(/<pre>sh#.*<\/pre>/, "'"$replacement"'")}{print >"'"$evaluation_source"'"}' $evaluation_source || break
|
||||||
|
done
|
||||||
|
)
|
||||||