@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.
- package/README.md +57 -11
- 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).
|
|
3
|
+
Forked from [@indiekit/preset-hugo](https://www.npmjs.com/package/@indiekit/preset-hugo).
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
- Modify the properties object mapping within getFrontMatter
|
|
5
|
+
## Features
|
|
7
6
|
|
|
8
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
17
|
-
3. Replace all existing configuration (e.g. `indiekit.config.js`) and `package.json`, from `@indiekit/preset-hugo` to `@eclecticpassions/indiekit-preset-hugo`
|
|
18
|
-
|
|
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
|
-
|
|
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
|