Skip to content

Commit bb1ccbe

Browse files
committed
update readme with more configuration options
1 parent 1972829 commit bb1ccbe

File tree

1 file changed

+176
-48
lines changed

1 file changed

+176
-48
lines changed

README.md

Lines changed: 176 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -113,71 +113,199 @@ Then visit [http://localhost:1313](http://localhost:1313) in your browser.
113113

114114
## Configuration Reference
115115

116+
Smigle Lite offers extensive configuration options to customize your site. Below is a complete reference based on the provided example configuration file.
117+
116118
### Basic Configuration
117119

118120
```yaml
119-
# config.yaml
120-
baseURL: "https://example.com/"
121-
languageCode: "en-us"
122-
title: "My Smigle Lite Site"
123-
theme: "smigle-lite"
121+
baseURL: localhost # Your site's base URL
122+
languageCode: en-gb # Language code for your site
123+
title: Site Title # Your site's title
124+
theme: smigle # Theme name (should be set to smigle-lite)
125+
126+
paginate: 10 # Number of posts per page
127+
```
124128
125-
# Main menu configuration
129+
### Menu Configuration
130+
131+
Configure the main navigation menu that appears at the top of your site:
132+
133+
```yaml
126134
menu:
127135
main:
128-
- identifier: "home"
129-
name: "Home"
130-
url: "/"
131-
weight: 1
132-
- identifier: "posts"
133-
name: "Posts"
134-
url: "/posts/"
135-
weight: 2
136-
- identifier: "categories"
137-
name: "Categories"
138-
url: "/categories/"
139-
weight: 3
140-
- identifier: "tags"
141-
name: "Tags"
142-
url: "/tags/"
143-
weight: 4
144-
- identifier: "about"
145-
name: "About"
146-
url: "/about/"
147-
weight: 5
136+
- identifier: home # Unique identifier for the menu item
137+
name: Home # Display name
138+
url: / # URL path
139+
weight: 1 # Order in menu (lower values appear first)
140+
- identifier: about
141+
name: About
142+
url: /about/
143+
weight: 2
144+
- identifier: posts
145+
name: Posts
146+
url: /posts/
147+
weight: 3
148+
- identifier: categories
149+
name: Categories
150+
url: /categories/
151+
weight: 5
152+
- identifier: tags
153+
name: Tags
154+
url: /tags/
155+
weight: 6
148156
```
149157
150158
### Theme Parameters
151159
160+
Smigle Lite provides several customization parameters:
161+
152162
```yaml
153-
# Complete theme parameters
154163
params:
155-
# Latest posts section
156-
latest:
157-
enable: true # Enable/disable latest posts section
158-
count: 5 # Number of posts to display
164+
# Site description (appears in metadata)
165+
description: "This is the example site description. From Configuration"
159166

160-
# Date formats
161-
abbrDateFmt: "Jan 2" # Abbreviated date format (for lists)
162-
dateFmt: "January 2, 2006" # Long date format (for post meta)
167+
# Latest posts section on homepage
168+
latest:
169+
enabled: true # Enable/disable latest posts section
170+
count: 3 # Number of posts to display
163171

164-
# Social links in footer
172+
# Content license information (appears in footer)
173+
license:
174+
name: CC BY-SA 4.0
175+
url: https://creativecommons.org/licenses/by-sa/4.0/#main-content-marker
176+
177+
# Date format configurations
178+
abbrDateFmt: "01/02" # Abbreviated date format for lists
179+
dateFmt: "06/01/02" # Full date format for post meta
180+
181+
# Social links (appears in footer)
165182
social:
166-
- name: "GitHub"
167-
url: "https://github.com/yourusername"
168-
- name: "Twitter"
169-
url: "https://twitter.com/yourusername"
170-
- name: "LinkedIn"
171-
url: "https://linkedin.com/in/yourusername"
183+
- name: GitHub
184+
url: https://github.com/joe-mccarthy/smigle-lite
185+
- name: "RSS"
186+
url: /index.xml
172187

173-
# Content license (optional)
188+
# Post navigation options
189+
post_nav:
190+
enabled: true # Enable/disable previous/next navigation
191+
show_title: false # Show post titles in navigation
192+
```
193+
194+
#### Date Format Reference
195+
196+
The date format uses Go's time formatting syntax:
197+
198+
- `01`: Month (numeric)
199+
- `02`: Day (numeric)
200+
- `06`: Year (2-digit)
201+
- `2006`: Year (4-digit)
202+
- `Jan`: Month (abbreviated)
203+
- `January`: Month (full name)
204+
205+
Examples:
206+
- `"01/02"` becomes "07/15" for July 15
207+
- `"06/01/02"` becomes "23/07/15" for July 15, 2023
208+
- `"January 2, 2006"` becomes "July 15, 2023"
209+
210+
### Taxonomies Configuration
211+
212+
Configure how content is categorized:
213+
214+
```yaml
215+
taxonomies:
216+
tags: tags # URL will be /tags/tag-name/
217+
category: categories # URL will be /categories/category-name/
218+
```
219+
220+
You can add custom taxonomies or rename existing ones through this configuration.
221+
222+
## Complete Example Configuration
223+
224+
For reference, here's a complete example configuration that demonstrates all available options:
225+
226+
```yaml
227+
baseURL: localhost
228+
languageCode: en-gb
229+
title: Site Title
230+
theme: smigle-lite
231+
232+
paginate: 10
233+
234+
menu:
235+
main:
236+
- identifier: home
237+
name: Home
238+
url: /
239+
weight: 1
240+
- identifier: about
241+
name: About
242+
url: /about/
243+
weight: 2
244+
- identifier: posts
245+
name: Posts
246+
url: /posts/
247+
weight: 3
248+
- identifier: categories
249+
name: Categories
250+
url: /categories/
251+
weight: 5
252+
- identifier: tags
253+
name: Tags
254+
url: /tags/
255+
weight: 6
256+
257+
params:
258+
description: "This is the example site description. From Configuration"
259+
latest:
260+
enabled: true
261+
count: 3
174262
license:
175-
name: "CC BY-SA 4.0"
176-
url: "https://creativecommons.org/licenses/by-sa/4.0/"
177-
178-
# Other options
179-
showTaxonomyLinks: true # Show categories and tags links in post meta
180-
favicon: "/favicon.ico" # Path to favicon (relative to static folder)
263+
name: CC BY-SA 4.0
264+
url: https://creativecommons.org/licenses/by-sa/4.0/#main-content-marker
265+
abbrDateFmt: "01/02"
266+
dateFmt: "06/01/02"
267+
social:
268+
- name: GitHub
269+
url: https://github.com/joe-mccarthy/smigle-lite
270+
- name: "RSS"
271+
url: /index.xml
272+
post_nav:
273+
enabled: true
274+
show_title: false
275+
276+
taxonomies:
277+
tags: tags
278+
category: categories
279+
```
280+
281+
This configuration should be saved as `config.yaml` in your Hugo site's root directory.
282+
283+
## Content Configuration
284+
285+
### Front Matter Examples
286+
287+
Each content file in Hugo can have front matter that determines how it's processed and displayed:
288+
289+
```yaml
290+
---
291+
title: "My First Post"
292+
date: 2023-07-15T10:00:00
293+
draft: false
294+
categories: ["Technology"]
295+
tags: ["hugo", "tutorial"]
296+
summary: "A quick introduction to Smigle Lite"
297+
---
298+
```
299+
300+
For pages that should appear in the menu:
301+
302+
```yaml
303+
---
304+
title: "About Me"
305+
menu:
306+
main:
307+
weight: 2
308+
---
181309
```
182310

183311
## Customization

0 commit comments

Comments
 (0)