diff options
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/hugo_timeline_partial.html | 22 | ||||
| -rw-r--r-- | examples/syncblog.sh | 22 |
2 files changed, 44 insertions, 0 deletions
diff --git a/examples/hugo_timeline_partial.html b/examples/hugo_timeline_partial.html new file mode 100644 index 0000000..251ccce --- /dev/null +++ b/examples/hugo_timeline_partial.html @@ -0,0 +1,22 @@ +<style type="text/css"> +table.tidy, table.tidy * { + border: none; + padding-top:0; + padding-bottom:0.2em; + text-align: left; + vertical-align: top; +} +</style> + +<h1>Timeline</h1> +<table class="tidy" align=left> + <tbody> + {{ $tl := site.Data.tl }} + {{ range $tl }} + <tr> + <td> @{{.account}}<a href={{.url}}>🔗</a><br> </td> + <td> [{{.created_at}}] {{ .content }}<br></td> + </tr> + {{ end }} + </tbody> +</table> diff --git a/examples/syncblog.sh b/examples/syncblog.sh new file mode 100644 index 0000000..5661923 --- /dev/null +++ b/examples/syncblog.sh @@ -0,0 +1,22 @@ +#!/usr/bin/bash + +# THIS IS AN EXAMPLE +# DON'T RUN ME WITHOUT MODIFYING! + +# FOOLPROOF +echo "do you know what you are doing?" +exit() + +cd <PATH_TO_TIMELINE_BOT> +echo "Fetching Timeline from fedi..." +./timelinebot.py +cp tl.json <PATH_TO_SITE_ROOT_DATA> + +cd <PATH_TO_SITE_ROOT> +echo "Rendering blog..." +hugo + +echo "Sync blog to remote server..." +rsync -avh -og --chown=http:http --info=progress2 --info=name0 --update --delete-after \ + <PATH_TO_SITE_ROOT_PUBLIC> \ + user@remote_server:<PATH_TO_WEB_DOC_ROOT> |
