Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,16 @@ theme_config:
footer: true # Show/hide site footer (default: true)
```

### Analytics

Monoholic has built-in support for [GoatCounter](https://www.goatcounter.com/), a privacy-friendly analytics platform. Add your GoatCounter subdomain to `_config.yml`:

```yaml
goatcounter: your-subdomain
```

This injects the GoatCounter tracking script on every page. Remove the key entirely to disable analytics.

### Menu Configuration

Monoholic uses a data-driven approach to its menu. Create or edit `_data/menu.yml` to define your site's navigation structure.
Expand All @@ -90,6 +100,23 @@ entries:
- `content_file`: Path to an external markdown file (e.g., `about.md`) to load content from your root directory.
- `post_list`: Set to `true` to auto-generate a list of your Jekyll posts under this section.

#### Nested Menu Sections

Menu entries can contain nested `entries` to create recursive sub-sections:

```yaml
entries:
- title: projects
entries:
- title: web
content: |
<p>Web projects here.</p>
- title: archive
post_list: true
```

Nesting can go as deep as needed — `menu.html` includes itself recursively for each `entries` array it encounters.

#### Using External Content Files

You can reference external markdown files instead of inline content:
Expand All @@ -102,6 +129,21 @@ entries:

This will load and render the content from `about.md` in your site's root directory.

### Per-Page JavaScript

To load custom JavaScript files on a specific page, add a `custom_js` list to the page's front matter:

```yaml
---
layout: post
custom_js:
- my-script
- chart
---
```

Each entry is a filename (without `.js`) relative to `assets/js/`. The example above loads `assets/js/my-script.js` and `assets/js/chart.js` at the bottom of the page body.

## Contributing

Bug reports and pull requests are welcome on GitHub at [https://github.com/stiermid/monoholic](https://github.com/stiermid/monoholic). This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](https://www.contributor-covenant.org/) code of conduct.
Expand Down
1 change: 0 additions & 1 deletion _includes/back_link.html

This file was deleted.

15 changes: 5 additions & 10 deletions _includes/footer.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
<footer class="site-footer h-card">
<data class="u-url" href="{{ "/" | relative_url }}"></data>
<div class="wrapper">
<div class="footer-col-wrapper">
<div
class="footer-col"
style="display: flex; justify-content: space-between; align-items: center; width: 100%;"
>
<p>
&copy; {{ 'now' | date: '%Y' }}
{{ site.title | upcase }}
</p>
</div>
<div class="footer-col">
<p>
&copy; {{ 'now' | date: '%Y' }}
{{ site.title | upcase }}
</p>
</div>
</div>
</footer>
2 changes: 1 addition & 1 deletion _includes/post_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<span class="post-meta">
* {{ post.date | date: site.theme_config.date_format }}
</span>
<a class="post-link" href="{{ post.url | relative_url }}">
<a href="{{ post.url | relative_url }}">
{{ post.title | escape }}
</a>
</li>
Expand Down
2 changes: 1 addition & 1 deletion _layouts/default.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!doctype html>
<html lang="{{ page.lang | default: "en" }}">
{%- include head.html -%}
<body class="{% if site.theme_config.monochrome_images != false %}m-img{% endif %}">
<body class="{% if site.theme_config.monochrome_images != false %}images-monochrome{% endif %}">
<main class="page-content" aria-label="Content">
<div class="wrapper">
{{ content }}
Expand Down
4 changes: 2 additions & 2 deletions _layouts/post.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
layout: default
---
{%- include back_link.html -%}
<a href="{{ '/' | relative_url }}">{{ site.theme_config.back }}</a>

<article>
<span class="post-meta" style="text-align: right">
<span class="post-meta">
{{ page.date | date: site.theme_config.date_format }}
</span>
<h1>{{ page.title }}</h1>
Expand Down
2 changes: 1 addition & 1 deletion _sass/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ img {
margin: 0 auto;
}

.m-img img {
.images-monochrome img {
filter: grayscale(1);
}
7 changes: 2 additions & 5 deletions _sass/_components.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
.footer-col {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
}

Expand All @@ -33,13 +34,9 @@
}

.page-content {
.post-title {
font-size: var(--font-size-post-title);
margin-bottom: var(--space-sm);
}

.post-meta {
color: var(--meta-color);
display: block;
text-align: right;
}
}
1 change: 0 additions & 1 deletion _sass/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
--font-size-base: 16px;
--font-size-sm: 0.85rem;
--font-size-section: 1.1rem;
--font-size-post-title: 1.5rem;
--font-size-site-title: 2rem;

// Spacing scale
Expand Down