Skip to content

Commit

Permalink
Move to Zola for generation (#4)
Browse files Browse the repository at this point in the history
* fix(branch): Rebase onto main

* fix(ignore): Remove public dir

* fix(templates): Use colours from original scheme

* style(code): Change highlight scheme

* feat(engine): End port to Zola

* fix(posts): Remove leftover files
  • Loading branch information
devsjc committed May 5, 2024
1 parent 92e3657 commit 9b8f6fe
Show file tree
Hide file tree
Showing 29 changed files with 343 additions and 324 deletions.
24 changes: 6 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,34 +12,23 @@ concurrency:
jobs:

# Define a job to generate the site content
# * Uses pandoc to convert markdown to HTML
# * Uses Zola CLI to generate public dir
# * Bundles site into zipped artifact
generate-site:
runs-on: ubuntu-latest
container:
image: pandoc/core:latest-ubuntu
options: --entrypoint=sh

steps:
- name: Checkout
uses: actions/checkout@v3
# Convert any markdown files in the content folder to HTML
# * Deletes the markdown afterwards
- name: Convert markdown to HTML
run: |
find posts -type f -name "*.md" -exec sh -c \
'pandoc --template assets/templates/post.html \
--toc --toc-depth=1 \
-o "${0%.md}.html" "$0"; \
rm "$0";' \
{} \;
- name: Install zola
uses: taiki-e/install-action@zola
- name: Generate site content
run: zola build
- name: Setup Pages
uses: actions/configure-pages@v3
# Upload the entire repository as the site
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: '.'
path: 'public'

# Define a job to deploy the static files
deploy:
Expand All @@ -51,7 +40,6 @@ jobs:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Deploy to GitHub Pages
id: deployment
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
*DS_Store
public
Empty file modified README.md
100644 → 100755
Empty file.
Binary file removed assets/fonts/Inter-Regular.woff2
Binary file not shown.
Binary file removed assets/fonts/JetBrainsMono-Regular.woff2
Binary file not shown.
135 changes: 0 additions & 135 deletions assets/templates/post.html

This file was deleted.

31 changes: 31 additions & 0 deletions config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
title = "devsjc blogs //"
description = "You've found it. The blog of devsjc. But will you find anything of any use?"
base_url = "https://devsjc.github.io/blog"

# Whether to automatically compile all Sass files in the sass directory
compile_sass = true

# Whether to build a search index to be used later on by a JavaScript library
build_search_index = false

# When set to "true", emoji aliases translated to their corresponding
# Unicode emoji equivalent in the rendered Markdown files. (e.g.: :smile: => 😄)
render_emoji = true

# Whether to generate RSS feed
generate_feed = true

[markdown]
highlight_code = true
highlight_theme = "nord"

[extra]
footer_links = [
{url = "$BASE_URL/", name = "Home"},
{url = "$BASE_URL/atom.xml", name = "RSS"},
]
social_links = [
{url = "https://medium.com/@devsjc", name = "Medium", emoji = ""},
{url = "https://github.com/devsjc/blog", name = "GiHub", emoji = "👏"},
{url = "$BASE_URL/atom.xml", name = "RSS", emoji = "📡"},
]
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Loading

0 comments on commit 9b8f6fe

Please sign in to comment.