Skip to content

Commit 524757d

Browse files
author
Agil Mammadov
authored
Merge pull request #18 from stiermid/refactor/css-bem-cleanup
refactor: cleanup/renaming/docs
2 parents 9ca5e45 + 2a26e40 commit 524757d

9 files changed

Lines changed: 54 additions & 22 deletions

File tree

README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,16 @@ theme_config:
6969
footer: true # Show/hide site footer (default: true)
7070
```
7171

72+
### Analytics
73+
74+
Monoholic has built-in support for [GoatCounter](https://www.goatcounter.com/), a privacy-friendly analytics platform. Add your GoatCounter subdomain to `_config.yml`:
75+
76+
```yaml
77+
goatcounter: your-subdomain
78+
```
79+
80+
This injects the GoatCounter tracking script on every page. Remove the key entirely to disable analytics.
81+
7282
### Menu Configuration
7383

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

103+
#### Nested Menu Sections
104+
105+
Menu entries can contain nested `entries` to create recursive sub-sections:
106+
107+
```yaml
108+
entries:
109+
- title: projects
110+
entries:
111+
- title: web
112+
content: |
113+
<p>Web projects here.</p>
114+
- title: archive
115+
post_list: true
116+
```
117+
118+
Nesting can go as deep as needed — `menu.html` includes itself recursively for each `entries` array it encounters.
119+
93120
#### Using External Content Files
94121

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

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

132+
### Per-Page JavaScript
133+
134+
To load custom JavaScript files on a specific page, add a `custom_js` list to the page's front matter:
135+
136+
```yaml
137+
---
138+
layout: post
139+
custom_js:
140+
- my-script
141+
- chart
142+
---
143+
```
144+
145+
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.
146+
105147
## Contributing
106148

107149
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.

_includes/back_link.html

Lines changed: 0 additions & 1 deletion
This file was deleted.

_includes/footer.html

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
11
<footer class="site-footer h-card">
22
<data class="u-url" href="{{ "/" | relative_url }}"></data>
33
<div class="wrapper">
4-
<div class="footer-col-wrapper">
5-
<div
6-
class="footer-col"
7-
style="display: flex; justify-content: space-between; align-items: center; width: 100%;"
8-
>
9-
<p>
10-
&copy; {{ 'now' | date: '%Y' }}
11-
{{ site.title | upcase }}
12-
</p>
13-
</div>
4+
<div class="footer-col">
5+
<p>
6+
&copy; {{ 'now' | date: '%Y' }}
7+
{{ site.title | upcase }}
8+
</p>
149
</div>
1510
</div>
1611
</footer>

_includes/post_list.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<span class="post-meta">
55
* {{ post.date | date: site.theme_config.date_format }}
66
</span>
7-
<a class="post-link" href="{{ post.url | relative_url }}">
7+
<a href="{{ post.url | relative_url }}">
88
{{ post.title | escape }}
99
</a>
1010
</li>

_layouts/default.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!doctype html>
22
<html lang="{{ page.lang | default: "en" }}">
33
{%- include head.html -%}
4-
<body class="{% if site.theme_config.monochrome_images != false %}m-img{% endif %}">
4+
<body class="{% if site.theme_config.monochrome_images != false %}images-monochrome{% endif %}">
55
<main class="page-content" aria-label="Content">
66
<div class="wrapper">
77
{{ content }}

_layouts/post.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
22
layout: default
33
---
4-
{%- include back_link.html -%}
4+
<a href="{{ '/' | relative_url }}">{{ site.theme_config.back }}</a>
55

66
<article>
7-
<span class="post-meta" style="text-align: right">
7+
<span class="post-meta">
88
{{ page.date | date: site.theme_config.date_format }}
99
</span>
1010
<h1>{{ page.title }}</h1>

_sass/_base.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@ img {
3838
margin: 0 auto;
3939
}
4040

41-
.m-img img {
41+
.images-monochrome img {
4242
filter: grayscale(1);
4343
}

_sass/_components.scss

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
.footer-col {
2525
display: flex;
2626
justify-content: space-between;
27+
align-items: center;
2728
width: 100%;
2829
}
2930

@@ -33,13 +34,9 @@
3334
}
3435

3536
.page-content {
36-
.post-title {
37-
font-size: var(--font-size-post-title);
38-
margin-bottom: var(--space-sm);
39-
}
40-
4137
.post-meta {
4238
color: var(--meta-color);
4339
display: block;
40+
text-align: right;
4441
}
4542
}

_sass/_variables.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
--font-size-base: 16px;
1111
--font-size-sm: 0.85rem;
1212
--font-size-section: 1.1rem;
13-
--font-size-post-title: 1.5rem;
1413
--font-size-site-title: 2rem;
1514

1615
// Spacing scale

0 commit comments

Comments
 (0)