@eclecticpassions/indiekit-preset-hugo 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +57 -11
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,26 +1,72 @@
1
1
  # Indiekit Plugin: preset-hugo
2
2
 
3
- Forked from [@indiekit/preset-hugo](https://www.npmjs.com/package/@indiekit/preset-hugo). In order to get unquoted dates in front matter, the following changes were made:
3
+ Forked from [@indiekit/preset-hugo](https://www.npmjs.com/package/@indiekit/preset-hugo).
4
4
 
5
- - Ensure date value is a native JavaScript Date object before being stringified
6
- - Modify the properties object mapping within getFrontMatter
5
+ ## Features
7
6
 
8
- > [!important]
9
- > I asked an LLM to help me with the code. Please review before using in your setup.
7
+ 1. Output unquoted date front matter (i.e. `date`, `publishDate`, `lastmod` ), instead of quoted string values.
10
8
 
11
- ## Installation
9
+ - For example:
10
+
11
+ ```toml
12
+ date = 2026-07-13T15:29:23+08:00
13
+ ```
14
+
15
+ Instead of:
16
+
17
+ ```toml
18
+ date = "2026-07-13T15:29:51+08:00"
19
+ ```
20
+
21
+ - Ensure date value is a native JavaScript Date object before being stringified
22
+ - Modify the properties object mapping within getFrontMatter
23
+
24
+ 2. Rename Indiekit property name `category` to `tags` and ensure single tags are also use arrays for consistency.
25
+
26
+ - For example:
27
+
28
+ ```toml
29
+ tags = [ "tag1", "tag2" ]
30
+ tags = [ "tag3" ]
31
+ ```
32
+
33
+ Instead of:
34
+
35
+ ```toml
36
+ category = [ "tag1", "tag2" ]
37
+ category = "tag3"
38
+ ```
12
39
 
13
- I personally wasn't able to use NPM's override feature for the exisiting Indiekit preset-hugo plugin.
40
+ ## Install Custom Plugin
41
+
42
+ I personally wasn't able to use [NPM's override](https://docs.npmjs.com/cli/v10/configuring-npm/package-json?v=true#overrides) feature to replace the existing Indiekit `preset-hugo` plugin, therefore:
14
43
 
15
44
  1. Remove existing: `npm remove @indiekit/preset-hugo`
16
- 2. Install with: `npm install github:eclecticpassions/indiekit-preset-hugo`
17
- 3. Replace all existing configuration (e.g. `indiekit.config.js`) and `package.json`, from `@indiekit/preset-hugo` to `@eclecticpassions/indiekit-preset-hugo`
18
- 4. Remove and rebuild `rm -rf node_modules package-lock.json` and `npm install`
45
+ 2. Install custom preset-hugo: `npm install github:eclecticpassions/indiekit-preset-hugo` or `npm install @eclecticpassions/indiekit-preset-hugo`
46
+ 3. Replace all existing configuration (e.g. in `indiekit.config.js`) and `package.json`, from `@indiekit/preset-hugo` to `@eclecticpassions/indiekit-preset-hugo`
47
+
48
+ ## Resources
49
+
50
+ - [Hugo dates](https://gohugo.io/methods/page/date/)
51
+ - [Indiekit post template](https://getindiekit.com/configuration/post-template)
52
+ - [Indiekit Hugo publication preset plugin](https://getindiekit.com/plugins/presets/hugo)
53
+
54
+ ## Disclaimer
55
+
56
+ LLMs were used to help generate the JavaScript code. All non-code parts (i.e. README) is written by me. Please review code before using in your Indiekit setup.
19
57
 
20
- See below for the README of the original preset-hugo plugin.
58
+ ---
59
+
60
+ <div align="center">
61
+
62
+ *See below for the README of the original Indiekit `preset-hugo` plugin.*
63
+
64
+ </div>
21
65
 
22
66
  ---
23
67
 
68
+ ## Indiekit Publication Preset for Hugo
69
+
24
70
  A [Hugo](https://gohugo.io) publication preset for Indiekit.
25
71
 
26
72
  ## Installation
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eclecticpassions/indiekit-preset-hugo",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Custom Hugo publication preset for Indiekit",
5
5
  "type": "module",
6
6
  "main": "index.js",