aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMantas <mistermantas@users.noreply.github.com>2017-11-25 13:43:01 +0200
committerMantas <mistermantas@users.noreply.github.com>2017-11-25 13:43:01 +0200
commitee7b9b233e41c1cb580d396f8604daaa754d2c54 (patch)
treedf2b5393eb2834f0abbb03b76f6671ccfd3493b0
parent74226ff6399eab42cddaeb0e3ab3e4a742c7b3bc (diff)
Better docs, Netlify CMS changes, stopgap for bug in when component issues arise
-rw-r--r--README.md28
-rw-r--r--layouts/index.html5
-rw-r--r--static/admin/config.yml4
3 files changed, 31 insertions, 6 deletions
diff --git a/README.md b/README.md
index e4111fd..6ceec5c 100644
--- a/README.md
+++ b/README.md
@@ -27,7 +27,13 @@
## Install
-We encourage you to use [Netlify](https://www.netlify.com) for cState. The build command is `hugo` and your site is compiled to `public`.
+We encourage you to use [Netlify](https://www.netlify.com) for cState. These are the following options you need to change in deploy settings:
+
++ Build command: **hugo**
++ Publish directory: **public**
++ Add one build enviroment variable
+ + Key: **HUGO_VERSION**
+ + Value: **0.31**
For this tutorial, it is assumed that you have Hugo and Git installed (check with `hugo version` & `git --version`).
@@ -38,7 +44,9 @@ For this tutorial, it is assumed that you have Hugo and Git installed (check wit
# !: If you already have one, skip this step
git init;
+# !: THIS ONLY WORKS ON BASH, USE THE 2ND COMMAND FOR POWERSHELL
# 2. Then this creates all the necessary directories
+mkdir -p content/issues themes static;
mkdir -p content/issues, themes, static;
# 3. We get the config file
@@ -55,7 +63,7 @@ And that is it; you have set up cState locally.
Now is a good time to make cState look the way you want it to, so upload a favicon (and logo) to `/static/`. Edit `config.yml` to fit your needs. And so on, and so forth.
-**Do not change any files in the `themes` directory or its subdirectories. Everything is handled automatically by Git.**
+**Do not change any files in the `themes` directory or its subdirectories. Everything is handled automatically by Git. If the content or static directories are empty, create at least one file in them (such as `gitkeep.txt`) to make sure Git picks them up.**
To make the status page public, you will need to connect to a remote GitHub repository much like this:
@@ -75,6 +83,22 @@ git push -u origin master
For an example of a working status page, see [rabbitnode/status](https://github.com/rabbitnode/status).
+## Updating
+
+From your root directory, enter these 2 commands:
+
+```bash
+# 1. Fetch submodules
+git submodule update --init --recursive;
+
+# 2. Now pull the changes
+git submodule foreach git pull origin master
+```
+
+You may also need to update the build enviroment variable **HUGO_VERSION** if you are using Netlify to [the latest equivelant](https://github.com/gohugoio/hugo/releases).
+
+You can [read more on git-scm.com](https://git-scm.com/book/en/v2/Git-Tools-Submodules) about submodules.
+
## FAQ
### Where do issues go? What is the frontmatter, how do I define metadata for issues?
diff --git a/layouts/index.html b/layouts/index.html
index 486eeab..a09d429 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -53,9 +53,9 @@
<div class="padding"></div>
{{ else }}{{ end }}
- <div class="padding"></div>
-
<!-- Individual info -->
+ {{ if not $active }}
+ <div class="padding"></div>
<div class="components">
{{ $systems := .Site.Params.systems }}
{{ range $index, $systems }}
@@ -65,6 +65,7 @@
</div>
{{ end }}
</div>
+ {{ end }}
<!-- End main -->
</div><div class="padding"></div><hr>
diff --git a/static/admin/config.yml b/static/admin/config.yml
index 487d969..893f620 100644
--- a/static/admin/config.yml
+++ b/static/admin/config.yml
@@ -12,8 +12,8 @@
backend:
name: git-gateway
branch: master
- media_folder: "static/admin/img"
- public_folder: "/admin/img"
+ media_folder: "/static/img"
+ public_folder: "/img"
# Do not change this!
collections:
# Used in routes, e.g., /admin/collections/blog