Skip to content

Commit

Permalink
chore: init from existing content
Browse files Browse the repository at this point in the history
  • Loading branch information
mmibbetson committed Dec 1, 2024
0 parents commit ec258aa
Show file tree
Hide file tree
Showing 15 changed files with 270 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
on: push
name: Build and deploy GH Pages
jobs:
build:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- name: checkout
uses: actions/checkout@v4
- name: build_and_deploy
uses: shalzz/zola-deploy-action@master
env:
PAGES_BRANCH: gh-pages
TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
public/
16 changes: 16 additions & 0 deletions config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# The URL the site will be built for
base_url = "https://mmibbetson.github.io"

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

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

[markdown]
# Whether to do syntax highlighting
# Theme can be customised by setting the `highlight_theme` variable to a theme supported by Zola
highlight_code = true

[extra]
# Put all your custom variables here
7 changes: 7 additions & 0 deletions content/blog/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
+++
title = "List of blog posts"
description = ""
sort_by = "date"
template = "blog.html"
page_template = "blog-page.html"
+++
16 changes: 16 additions & 0 deletions content/blog/test.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
+++
title = "My Test Post"
date = 2024-11-24T23:19:00+02:00
+++

# Heading

This is a **paragraph**.

## Code Fence

```rs
pub fn main() {
println!("Hello, Blog!");
}
```
7 changes: 7 additions & 0 deletions content/software/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
+++
title = "List of projects"
description = ""
sort_by = "date"
template = "software.html"
page_template = "software-page.html"
+++
9 changes: 9 additions & 0 deletions content/software/dn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
+++
title = "dn"
date = 2024-11-24T23:38:00+02:00
+++

# dn

`dn` is a PKMS CLI tool.

9 changes: 9 additions & 0 deletions content/software/litr.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
+++
title = "litr"
date = 2024-11-24T23:36:00+02:00
+++

# litr

`litr` is a literate programming CLI tool.

110 changes: 110 additions & 0 deletions static/styles/global.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
*,
*::before,
*::after {
box-sizing: border-box;
}

:root {
--text-sm: 0.5rem;
--text-md: 1rem;
--text-lg: 2rem;
--text-xl: 4rem;
--text: #000;
--title: #000;
--bg: #fff;
--code-bg: #ebdbb2;
--link: lab(90, 40, 5);
--inlineCode-bg: lab(from #ebdbb2);
--inlineCode-text: lab(from #282828);
--primary: lab(63 59.32 -1.47);
--secondary: lab(63 59.32 -1.47);
--tertiary: lab(63 59.32 -1.47);
}

@media (prefers-color-scheme: dark) {
:root {
--text: #fff;
--title: #fff;
--bg: #000;
--code-bg: #282828;
--link: lab(90, 40, 5);
--inlineCode-bg: #282828;
--inlineCode-text: #ebdbb2;
--primary: lab(63 59.32 -1.47);
--secondary: lab(63 59.32 -1.47);
--tertiary: lab(63 59.32 -1.47);
}
}

@media (prefers-color-scheme: dark) {
body {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
}

@media (prefers-reduced-motion) {
* {
transition: none !important;
transform: none !important;
}
}

body {
margin: 0;
min-height: 100%;
font-family: var(--main-font);
color: var(--text);
background-color: var(--bg);
display: flex;
flex-direction: column;
font-size: var(--text-md);
}

header {
display: flex;
flex-direction: row;
align-items: center;
padding: 2rem;
border-bottom: 0.05rem solid var(--text);
}

main {
width: 50%;
margin-left: auto;
margin-right: auto;
}

footer {
display: flex;
flex-direction: row;
place-items: center;
padding: 2rem;
border-top: 0.05rem solid var(--text);
}

p {
}

li {
color: var(--link);
}

a {
color: var(--secondary);
}

hr {
color: var(--tertiary);
width: 80%;
}

.site-title {
font-size: var(--text-xl);
margin-right: auto;
}

.nav-item {
font-size: var(--text-lg);
padding-right: 0.5rem;
}
28 changes: 28 additions & 0 deletions templates/base.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Quixotic</title>
<link rel="stylesheet" href="/styles/global.css" />
</head>

<body>
<header>
<h1 class="site-title"><a href="/">Untitled</a></h1>
<nav>
<ul>
<a class="nav-item" href="/blog">/blog</a>
<a class="nav-item" href="/software">/software</a>
</ul>
</nav>
</header>

<main>{% block content %} {% endblock %}</main>

<footer>
<ul>
<li><a href="http://github.com/mmibbetson">GitHub</a></li>
</ul>
</footer>
</body>
</html>
9 changes: 9 additions & 0 deletions templates/blog-page.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{% extends "base.html" %}

{% block content %}
<h1 class="title">
{{ page.title }}
</h1>
<p class="subtitle"><strong>{{ page.date }}</strong></p>
{{ page.content | safe }}
{% endblock content %}
14 changes: 14 additions & 0 deletions templates/blog.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{% extends "base.html" %}

{% block content %}
<h1 class="title">
{{ section.title }}
</h1>
<ul>
<!-- If you are using pagination, section.pages will be empty.
You need to use the paginator object -->
{% for page in section.pages %}
<li><a href="{{ page.permalink | safe }}">{{ page.title }}</a></li>
{% endfor %}
</ul>
{% endblock content %}
9 changes: 9 additions & 0 deletions templates/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{% extends "base.html" %}

{% block content %}
<h1 class="title">
This is my blog made with Zola.

There is no styling or content, currently.
</h1>
{% endblock content %}
9 changes: 9 additions & 0 deletions templates/software-page.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{% extends "base.html" %}

{% block content %}
<h1 class="title">
{{ page.title }}
</h1>
<p class="subtitle"><strong>{{ page.date }}</strong></p>
{{ page.content | safe }}
{% endblock content %}
12 changes: 12 additions & 0 deletions templates/software.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{% extends "base.html" %}

{% block content %}
<h1 class="title">
{{ section.title }}
</h1>
<ul>
{% for page in section.pages %}
<li><a href="{{ page.permalink | safe }}">{{ page.title }}</a></li>
{% endfor %}
</ul>
{% endblock content %}

0 comments on commit ec258aa

Please sign in to comment.