For an explanation of the internals, read README_dev.md
You can read some doc on the following topics, it is not required, but will help you:
- Git (not required but will help in case of problems): https://git-scm.com/
- Go Hugo (not required but will help in case of problems): https://gohugo.io/
- Markdown:
- The original spec: https://daringfireball.net/projects/markdown/syntax
- Github's Markdown documentation: https://guides.github.com/features/mastering-markdown/
- Stackedit (in-browser Markdown editor with live preview): https://stackedit.io/editor
# make sure you have the basic dependencies
apt-get update
apt-get install git vim ca-certificates wget
# From this page, find the appropriate version https://github.com/gohugoio/hugo/releases
# Note: ubuntu's and debian's repository have an outdated version (0.18), please use at least 0.30.
wget https://github.com/gohugoio/hugo/releases/download/v0.31.1/hugo_0.31.1_Linux-64bit.deb
dpkg -i hugo_0.31.1_Linux-64bit.deb
# clone the wiki
git clone https://github.com/ECE3SAT/ece3satwiki
Note: the branch used to write the content is dev
and the published branch (HTML) is master
.
The steps are basically:
- Work: most probably you will write a markdown file in content/Blog/
- Check your work:
- Run
hugo server -D
. Note that once hugo is running, it will auto-reload when you edit a file. - Open
http://localhost:1313/
- Run
- If it's all good, deploy your changes:
- Commit your changes
- Run the build:
./build_wiki.sh
- Push the sources and the generated wiki:
git push origin master && git push origin dev
Where to write what kind of articles:
- The
Home
page should shortly present the project - The category
The Project
should contain project-wide articles - The category
CubeSat Modules
should contain Wikipedia-style articles (timeless articles) - The category
Blog
should contain updates and announcements (timed articles)
An article should be formatted like this:
{
"title": "This is the article title",
"date": "2017-11-14T18:58:44+01:00"
}
Lorem Ipsum, Markdown formatted. You can also add *shortcode* that add additional features, such as include a youtube video: {{< youtube "video_id" >}}
You can also include raw HTML code, but this is <span style="color:red;">strongly</span> discouraged (really, HTML is the worst).
---
The first part is a JSON header. Most fields are optionals:
* title
* date: optional. If the date is in the future, Hugo won't publish the article, unless you pass `--buildFuture` when running hugo.
* summary: shows in the page listing, instead of an auto-generated one that just takes the beginning text
* image: the URL of an image that will be shown on the listing page
* alias: optional. This is usefull if you published an article and shared it, but the auto-generated URL changed (because you changed the date or the title)
Custom shortcodes:
A shortcode is a mini template. Custom shortcode are in layouts/shortcodes/
.