Skip to content

Commit 375aa80

Browse files
committed
Prepare the blog
0 parents  commit 375aa80

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+2040
-0
lines changed

Diff for: .github/workflows/deploy.yml

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
pull_request:
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
if: github.ref != 'refs/heads/main'
10+
steps:
11+
- name: 'Checkout'
12+
uses: actions/checkout@main
13+
with:
14+
submodules: "recursive"
15+
- uses: actions/setup-node@v4
16+
with:
17+
node-version: 20
18+
- run: |
19+
sudo apt-get update && sudo apt-get install -y wget git
20+
- run: |
21+
wget -q -O - \
22+
"https://github.com/getzola/zola/releases/download/v0.19.1/zola-v0.19.1-x86_64-unknown-linux-gnu.tar.gz" \
23+
| sudo tar xzf - -C /usr/local/bin
24+
25+
- run: npm install
26+
- run: npm run abridge
27+
- name: 'Build only'
28+
uses: shalzz/[email protected]
29+
env:
30+
BUILD_DIR: .
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
BUILD_ONLY: true
33+
34+
build_and_deploy:
35+
runs-on: ubuntu-latest
36+
if: github.ref == 'refs/heads/main'
37+
steps:
38+
- name: 'Checkout'
39+
uses: actions/checkout@main
40+
with:
41+
submodules: "recursive"
42+
- uses: actions/setup-node@v4
43+
with:
44+
node-version: 20
45+
- run: |
46+
sudo apt-get update && sudo apt-get install -y wget git
47+
- run: |
48+
wget -q -O - \
49+
"https://github.com/getzola/zola/releases/download/v0.19.1/zola-v0.19.1-x86_64-unknown-linux-gnu.tar.gz" \
50+
| sudo tar xzf - -C /usr/local/bin
51+
- run: npm install
52+
- run: npm run abridge
53+
- name: 'Build and deploy'
54+
uses: shalzz/[email protected]
55+
env:
56+
PAGES_BRANCH: gh-pages
57+
BUILD_DIR: .
58+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Diff for: .gitignore

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
.env
2+
public
3+
build
4+
storage
5+
node_modules
6+
package-lock.json
7+
static/demo.html
8+
static/tinysearch_engine.js
9+
static/tinysearch_engine.d.ts
10+
static/tinysearch_engine_bg.wasm.d.ts
11+
static/package.json
12+
static/js/pagefind.*.pf_meta
13+
static/js/index
14+
static/js/fragment

Diff for: .gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "themes/abridge"]
2+
path = themes/abridge
3+
url = https://github.com/jieiku/abridge.git

Diff for: CNAME

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blog.haskell.org

Diff for: README.md

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Haskell Blog
2+
3+
## Local installation
4+
5+
The blog is made with [Zola], based on the [Abridge theme].
6+
7+
You will need:
8+
* The `zola` binary v0.19.1 or higher
9+
* `npm`
10+
11+
Once you have cloned this repository, run `npm install` and `npm run abridge` to initialise the front-end features like full-text search.
12+
13+
## Contribute content
14+
15+
### Blog post structure
16+
17+
#### Name
18+
19+
Blog posts are located in the `content` directory, as markdown files. The files themselves contain
20+
their title in a "slug" format (alphanumeric characters, words separated by a hyphen, all lowercase):
21+
22+
```
23+
documentation-best-practices.md
24+
```
25+
26+
#### Front-matter
27+
28+
The file itself must contain a front-matter in TOML format that has the following properties:
29+
30+
```
31+
+++
32+
title = "Title of the post"
33+
date = YYYY-MM-DD
34+
[taxonomies]
35+
authors = ["Author's Name"] # The author's name. Will be indexed.
36+
categories = ["Haddock"] # A minima should be the name of the team ("Haddock", "HLS", "Cabal"). Will be indexed.
37+
tags = ["Practices"] # Something more precise like "Release", "Practice", "JavaScript", can be aded. Will be indexed.
38+
+++
39+
```
40+
41+
#### Summary
42+
43+
The eye-catcher that you wish to show on the front-page of the blog is the first paragraph.
44+
You can manually delimit where it ends by inserting `<!-- more -->` on a newline between this paragraph and the rest of the content.
45+
46+
Otherwise, in the absence of this comment, the first 150 characters will be used by Zola
47+
48+
#### Images and other files
49+
50+
If you want to add images to your blog post, create a folder named after the blog post, and write the content of the post to an `index.md`
51+
file within it. Put your associated files in the same directory.
52+
53+
For instance:
54+
55+
```
56+
documentation-best-practices
57+
├── flow-of-documentation.png
58+
└── index.md
59+
```
60+
61+
### Local preview
62+
63+
Run `zola serve --drafts` in order to serve the website and automatically render it when files change.
64+
65+
[Zola]: https://www.getzola.org/
66+
[Abridge theme]: https://abridge.pages.dev/overview-abridge/

0 commit comments

Comments
 (0)