-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit b24c17b
Showing
52 changed files
with
2,020 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
if: github.ref != 'refs/heads/main' | ||
steps: | ||
- name: 'Checkout' | ||
uses: actions/checkout@main | ||
with: | ||
submodules: "recursive" | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
- run: | | ||
sudo apt-get update && sudo apt-get install -y wget git | ||
- run: | | ||
wget -q -O - \ | ||
"https://github.com/getzola/zola/releases/download/v0.19.1/zola-v0.19.1-x86_64-unknown-linux-gnu.tar.gz" \ | ||
| sudo tar xzf - -C /usr/local/bin | ||
- run: npm install | ||
- run: npm run abridge | ||
- name: 'Build only' | ||
uses: shalzz/[email protected] | ||
env: | ||
BUILD_DIR: . | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
BUILD_ONLY: true | ||
|
||
build_and_deploy: | ||
runs-on: ubuntu-latest | ||
if: github.ref == 'refs/heads/main' | ||
steps: | ||
- name: 'Checkout' | ||
uses: actions/checkout@main | ||
with: | ||
submodules: "recursive" | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
- run: | | ||
sudo apt-get update && sudo apt-get install -y wget git | ||
- run: | | ||
wget -q -O - \ | ||
"https://github.com/getzola/zola/releases/download/v0.19.1/zola-v0.19.1-x86_64-unknown-linux-gnu.tar.gz" \ | ||
| sudo tar xzf - -C /usr/local/bin | ||
- run: npm install | ||
- run: npm run abridge | ||
- name: 'Build and deploy' | ||
uses: shalzz/[email protected] | ||
env: | ||
PAGES_BRANCH: gh-pages | ||
BUILD_DIR: . | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
.env | ||
public | ||
build | ||
storage | ||
node_modules | ||
package-lock.json | ||
static/demo.html | ||
static/tinysearch_engine.js | ||
static/tinysearch_engine.d.ts | ||
static/tinysearch_engine_bg.wasm.d.ts | ||
static/package.json | ||
static/js/pagefind.*.pf_meta | ||
static/js/index | ||
static/js/fragment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "themes/abridge"] | ||
path = themes/abridge | ||
url = https://github.com/jieiku/abridge.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
blog.haskell.org |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# Haskell Blog | ||
|
||
## Local installation | ||
|
||
The blog is made with [Zola], based on the [Abridge theme]. | ||
|
||
You will need: | ||
* The `zola` binary v0.19.1 or higher | ||
* `npm` | ||
|
||
Once you have cloned this repository, run `npm install` and `npm run abridge` to initialise the front-end features like full-text search. | ||
|
||
## Contribute content | ||
|
||
### Blog post structure | ||
|
||
#### Name | ||
|
||
Blog posts are located in the `content` directory, as markdown files. The files themselves contain | ||
their title in a "slug" format (alphanumeric characters, words separated by a hyphen, all lowercase): | ||
|
||
``` | ||
documentation-best-practices.md | ||
``` | ||
|
||
#### Front-matter | ||
|
||
The file itself must contain a front-matter in TOML format that has the following properties: | ||
|
||
``` | ||
+++ | ||
title = "Title of the post" | ||
date = YYYY-MM-DD | ||
[taxonomies] | ||
authors = ["Author's Name"] # The author's name. Will be indexed. | ||
categories = ["Haddock"] # A minima should be the name of the team ("Haddock", "HLS", "Cabal"). Will be indexed. | ||
tags = ["Practices"] # Something more precise like "Release", "Practice", "JavaScript", can be aded. Will be indexed. | ||
+++ | ||
``` | ||
|
||
#### Summary | ||
|
||
The eye-catcher that you wish to show on the front-page of the blog is the first paragraph. | ||
You can manually delimit where it ends by inserting `<!-- more -->` on a newline between this paragraph and the rest of the content. | ||
|
||
Otherwise, in the absence of this comment, the first 150 characters will be used by Zola | ||
|
||
#### Images and other files | ||
|
||
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` | ||
file within it. Put your associated files in the same directory. | ||
|
||
For instance: | ||
|
||
``` | ||
documentation-best-practices | ||
├── flow-of-documentation.png | ||
└── index.md | ||
``` | ||
|
||
### Local preview | ||
|
||
Run `zola serve --drafts` in order to serve the website and automatically render it when files change. | ||
|
||
[Zola]: https://www.getzola.org/ | ||
[Abridge theme]: https://abridge.pages.dev/overview-abridge/ |
Oops, something went wrong.