Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/veandco/sdl2.veand.co
An unofficial website for SDL2
https://github.com/veandco/sdl2.veand.co
Last synced: 11 days ago
JSON representation
An unofficial website for SDL2
- Host: GitHub
- URL: https://github.com/veandco/sdl2.veand.co
- Owner: veandco
- Created: 2019-11-17T04:26:47.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-03-02T13:53:21.000Z (over 4 years ago)
- Last Synced: 2024-10-29T21:05:49.180Z (22 days ago)
- Language: HTML
- Size: 96.7 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# sdl2.veand.co
This is the source code repository for the unofficial [SDL2 website](https://sdl2.veand.co). It is a static website that is generated by [Zola](https://getzola.org). Changes applied to the `master` branch is almost immediately live on the website thanks to [Netlify](https://netlify.com)! It currently has only Go-related tutorials but the plan is to eventually have other languages as well.
## Development
To develop this website, one would want to download the `zola` executable so the result can be previewed locally. It can be installed using the instructions [here](https://www.getzola.org/documentation/getting-started/installation/). Personally, I download the executable directly from the [Github releases page] and put it where discoverable by my `$PATH` (for me, I put it under `$HOME/.local/bin`).
Once `zola` has been installed, the project can be cloned by running `git clone https://github.com/veandco/sdl2.veand.co`. Once it has been cloned, go into the `sdl2.veand.co` directory and run `zola serve`. It can then be reached locally via http://localhost:1111!
However, it is certainly possible to make small changes such as fixing small typos without touching the command-line. One could simply use Github's file editing feature to make the changes straight on the browser!
### Structure
#### Creating single-page tutorial
To create a single-page tutorial, first go to `content/tutorials/go` and create a directory with slugified title such as `hello-world`. Then create a `_index.md` file and put the following content:
```
+++
title = "Hello World!"
template = "section-tutorials-lang-snippet.html"
sort_by = "weight"
weight = 50
+++The content of the page goes here!
```#### Creating multi-page tutorial
To create multi-page tutorial, first go to `content/tutorials/go` and create a directory with slugified title such as `snake`. Then create a `_index.md` file and put the following content:
```
+++
title = "Snake"
template = "section-tutorials-lang-project.html"
page_template = "page-tutorials-lang-project.html"
sort_by = "weight"
weight = 200
+++
```After that, you can create the first page by creating another file e.g. `setup.md` with the following content:
```
+++
title = "First page"
weight = 0[taxonomies]
categories = ["go"]
tags = ["snake"]
+++Content of the first page here!
```You can create the following pages with the similar set up but increment the `weight`. So the next page would contain something like this:
```
title = "Second Page"
weight = 1[taxonomies]
categories = ["go"]
tags = ["snake"]
+++Content of the second page here!
```The links for the previous and next page will be generated on the HTML page based on the `weight` value.