You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+42Lines changed: 42 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,6 +69,16 @@ theme_config:
69
69
footer: true # Show/hide site footer (default: true)
70
70
```
71
71
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
+
72
82
### Menu Configuration
73
83
74
84
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:
90
100
- `content_file`: Path to an external markdown file (e.g., `about.md`) to load content from your root directory.
91
101
- `post_list`: Set to `true` to auto-generate a list of your Jekyll posts under this section.
92
102
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
+
93
120
#### Using External Content Files
94
121
95
122
You can reference external markdown files instead of inline content:
@@ -102,6 +129,21 @@ entries:
102
129
103
130
This will load and render the content from `about.md` in your site's root directory.
104
131
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
+
105
147
## Contributing
106
148
107
149
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.
0 commit comments