diff --git a/.sandstorm/launcher.sh b/.sandstorm/launcher.sh index 06ef28c..407ea66 100755 --- a/.sandstorm/launcher.sh +++ b/.sandstorm/launcher.sh @@ -3,7 +3,7 @@ set -euo pipefail if [ ! -e /var/git ]; then cd /var - hugo new site git + cp -R /opt/app/template git cd git git init git add * diff --git a/.sandstorm/sandstorm-files.list b/.sandstorm/sandstorm-files.list index 48a3ec4..107e5cf 100644 --- a/.sandstorm/sandstorm-files.list +++ b/.sandstorm/sandstorm-files.list @@ -68,6 +68,7 @@ opt/app/.git/refs opt/app/.git/refs/heads/master opt/app/.sandstorm/launcher.sh opt/app/Caddyfile +opt/app/README.md opt/app/app.js opt/app/commit-on-save opt/app/node_modules/accepts/index.js @@ -370,6 +371,20 @@ opt/app/package.json opt/app/post-receive opt/app/public/stylesheets/style.css opt/app/routes.js +opt/app/template +opt/app/template/archetypes +opt/app/template/config.toml +opt/app/template/content +opt/app/template/content/_index.md +opt/app/template/data +opt/app/template/layouts +opt/app/template/layouts/_default +opt/app/template/layouts/_default/single.html +opt/app/template/layouts/index.html +opt/app/template/layouts/partials +opt/app/template/layouts/partials/footer.html +opt/app/template/layouts/partials/header.html +opt/app/template/static opt/app/views/error.jade opt/app/views/index.jade opt/app/views/layout.jade diff --git a/template/config.toml b/template/config.toml new file mode 100644 index 0000000..8aa38a5 --- /dev/null +++ b/template/config.toml @@ -0,0 +1,3 @@ +baseurl = "http://replace-this-with-your-hugo-site.com/" +languageCode = "en-us" +title = "My New Hugo Site" diff --git a/template/content/_index.md b/template/content/_index.md new file mode 100644 index 0000000..5efd4e7 --- /dev/null +++ b/template/content/_index.md @@ -0,0 +1,17 @@ ++++ +date = "2017-03-15T10:44:56-05:00" +title = "Home" + ++++ + +Welcome to your new Sandstorm-hosted Hugo site! Here are a few pointers to help you get started: + + * Check out the Git repository associated with this site. Find instructions for doing so on the grain's launch screen. + * Choose a theme to make your site look nice. [Hugo's theme showcase](https://themes.gohugo.io) is a good place to start. + * Add the theme to your Git repository as a [subtree](https://medium.com/@v/git-subtrees-a-tutorial-6ff568381844#.5xxwesuj8) at `themes/themename`. + * Add `theme = "themename"` to *Config.toml*. + * Push the repository, and your new site will be immediately published. + * Use the administrative interface, linked from the grain's launch screen, to make simple changes without accessing the repository. Note that changes go live as soon as they are made. + * Read more about Hugo in its extensive [documentation](https://gohugo.io/overview/introduction/). + +Enjoy! diff --git a/template/layouts/_default/single.html b/template/layouts/_default/single.html new file mode 100644 index 0000000..41bad4e --- /dev/null +++ b/template/layouts/_default/single.html @@ -0,0 +1,3 @@ +{{partial "header.html" . }} +{{ .Content }} +{{ partial "footer.html" . }} diff --git a/template/layouts/index.html b/template/layouts/index.html new file mode 100644 index 0000000..41bad4e --- /dev/null +++ b/template/layouts/index.html @@ -0,0 +1,3 @@ +{{partial "header.html" . }} +{{ .Content }} +{{ partial "footer.html" . }} diff --git a/template/layouts/partials/footer.html b/template/layouts/partials/footer.html new file mode 100644 index 0000000..fd8d415 --- /dev/null +++ b/template/layouts/partials/footer.html @@ -0,0 +1,3 @@ + + + diff --git a/template/layouts/partials/header.html b/template/layouts/partials/header.html new file mode 100644 index 0000000..f8a4dbd --- /dev/null +++ b/template/layouts/partials/header.html @@ -0,0 +1,9 @@ + + + + {{ .Title }} - {{ .Site.Title }} + + +
+

{{ .Title }}

+