Skip to content

Commit 611b372

Browse files
Updates
1 parent 46f30b1 commit 611b372

File tree

2 files changed

+73
-24
lines changed

2 files changed

+73
-24
lines changed

docs/nodes/uib-markweb.md

Lines changed: 55 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
title: uib-markweb - Dynamic web sites using Markdown
3-
description: >
3+
description: |
44
The `uib-markweb` node allows you to create dynamic web sites using Markdown files.
55
created: 2026-01-09 15:10:14
6-
updated: 2026-02-02 16:10:39
6+
updated: 2026-02-02 20:13:30
77
status: Release
88
since: v7.6.0
99
---
@@ -36,29 +36,67 @@ While these are initially processed server-side so that only HTML is passed over
3636

3737
These provide more complex processing than simple variable replacement. They are enclosed in `%%...%%` tags. Attributes are generally optional and are specified inside square brackets `[...]` as comma-separated `attribute=value` pairs.
3838

39-
* `%%nav [attributes]%%` - Generates a navigation menu based on the folder structure. Attributes can be used to control depth, type (files/folders/both), orientation (horizontal/vertical), etc.
39+
#### Navigation menu (`%%nav%%`)
4040

41-
`nav` uses the `%%index%%` directive internally to build the menu structure. So it accepts the same attributes as `index`, plus:
41+
`%%nav [attributes]%%` - Generates a navigation menu based on the folder structure. Attributes can be used to control depth, type (files/folders/both), orientation (horizontal/vertical), etc.
4242

43-
* `orient` - The orientation of the menu: `horizontal` ~~or `vertical`~~ (default: `horizontal`). As of v7.6.0, only `horizontal` is implemented. You can use `%%index%%` to build vertical lists.
43+
`nav` uses the `%%index%%` directive internally to build the menu structure. So it accepts the same attributes as `index`, plus:
4444

45-
* `%%index [attributes]%%` - Generates an index list of files and/or folders. Attributes can be used to control depth, file types, sorting, etc.
46-
Attributes:
47-
* `start` - The starting depth level to include in the index list (default: the current page's depth).
48-
* `end` - The ending depth level (default: the current page's depth if `start` not provided, otherwise `5`).
45+
Attributes:
46+
47+
* `orient` - The orientation of the menu: `horizontal` ~~or `vertical`~~ (default: `horizontal`). As of v7.6.0, only `horizontal` is implemented. You can use `%%index%%` to build vertical lists.
48+
49+
#### Index list of files/folders (`%%index%%`)
50+
51+
`%%index [attributes]%%` - Generates an index list of files and/or folders. Attributes can be used to control depth, file types, sorting, etc.
52+
53+
Attributes:
54+
55+
* `start` - The starting depth level to include in the index list (default: the current page's depth).
56+
* `end` - The ending depth level (default: the current page's depth if `start` not provided, otherwise `5`).
4957

5058
`start` and `end` are base 0, so the root folder is level 0.
5159

52-
* `depth` - Shorthand to set the number of levels to include. Equivalent to `end = start + depth`.
53-
* `type` - The type of items to include: `files`, `folders`, or `both` (default: `both`).
60+
* `depth` - Shorthand to set the number of levels to include. Equivalent to `end = start + depth`.
61+
* `type` - The type of items to include: `files`, `folders`, or `both` (default: `both`).
62+
* `from` - Filter to include only items created/updated after this date/time.
63+
* `to` - Filter to include only items created/updated before this date/time.
64+
65+
Can be set to `now` to mean the current date/time at the time of index list creation.
66+
67+
`%%index[from=2025-01-01, to=now]%%`
68+
69+
70+
* `duration` - Filter to include only items created/updated offset from either `from` or `to`.
5471

55-
Not yet implemented:
56-
* `sort` - The sorting order: `name`, `date`, or `custom` (default: `name`).
57-
* `order` - The sorting direction: `asc` or `desc` (default: `asc`).
58-
* `exclude` - Comma-separated list of file or folder names to exclude (default: none).
72+
E.g.:
73+
74+
* `%%index[duration=1w]%%` Last week from now
75+
* `%%index[from=2025-06-01, duration=1m]%%`
76+
* `%%index[to=now, duration=2w]%%`
77+
* Duration can be negative to go backwards in time from `to`. E.g., `to=now, duration=-1m` for the month before now.
78+
79+
* `latest` - Lists the last `n` created/updated items. Overrides `start`, `end`, and `depth`.
80+
81+
E.g.:
82+
83+
* `%%index[latest=10]%%`- 10 most recently created/updated pages.
84+
* `%%index[latest=5, type=files]%%` - 5 most recent files only.
85+
* `%%index[latest=3, start=0, end=2]%%` - 3 most recent pages at depth 0-2.
86+
* `%%index[latest=10, from=2025-01-01]%%` - 10 most recent since Jan 2025.
87+
88+
*Not yet implemented*:
89+
90+
* `sort` - The sorting order: `name`, `date`, or `custom` (default: `name`).
91+
* `order` - The sorting direction: `asc` or `desc` (default: `asc`).
92+
* `exclude` - Comma-separated list of file or folder names to exclude (default: none).
93+
94+
#### Search results placeholder (`%%search-results%%`)
5995

6096
* `%%search-results%%` - Placeholder for search results. Currently has no attributes.
6197

98+
#### Other directives
99+
62100
* `%%body%%` - Placeholder for the main content of the page. No attributes.
63101

64102
> [!NOTE]
@@ -262,6 +300,8 @@ This is a rough list of the original requirements for the `uib-markweb` node.
262300
* [x] Pass all discovered content attributes to the front end as a uibuilder managed variable.
263301
* [x] `%%index%%` placeholder to generate a list of pages with links. Should use a template for each entry. Allow sorting options (e.g. by created date, updated date, title, etc.). Templates should allow metadata fields to be used. Index must allow pagination. Must have a filter option (e.g. by tag, category, author, date range, etc.)
264302
* [x] Live reload of changed markdown files. [ref](https://www.npmjs.com/package/markserv)
303+
* [x] Generate title, created, updated page attributes from file details if not in front-matter.
304+
* [x] Watch the config folder for changes. Signal all connected clients to reload page if config files change.
265305

266306

267307
### Search

docs/roadmap/next.md

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: |
44
What is being worked on for the next release.
55
author: Julian Knight (Totally Information)
66
created: 2025-01-05 12:34:47
7-
updated: 2026-01-30 13:12:32
7+
updated: 2026-02-02 17:50:34
88
---
99

1010
## To Fix
@@ -23,14 +23,23 @@ A node that creates a website out of a folder of markdown content.
2323
* [x] Search not finding in other attributes?
2424
* [x] Hash link returns are losing the path.
2525
* [x] Make sure that `%%search%%` adds a `<search>` element wrapper.
26-
27-
* [ ] ~~Check if return msgs get clientId, etc.~~ They don't, should they?
28-
* [ ] Indexes cannot currently deal with rename or delete events.
29-
* [ ] Generate title, created, updated from file details if not in front-matter.
30-
* [ ] Watcher for config folder.
26+
* [x] Generate title, created, updated from file details if not in front-matter.
27+
* [x] Watcher for config folder.
28+
* [x] Make sure index is rebuilt on file changes.
29+
* [x] Add date/time range filter to `%%index%%`. `from`, `to` and `duration` options.
30+
* [x] Add `latest` option to `%%index%%` to show most recently updated/created pages.
31+
32+
* [ ] Add tag(s)/category/author filter to `%%index%%`.
33+
* [ ] Add pagination to `%%index%%`.
34+
* [ ] Add sorting options to `%%index%%` (e.g. by created date, updated date, title, etc.).
35+
* [ ] Add template support to `%%index%%` to allow custom formatting of each entry.
36+
37+
* [ ] Allow for missing index.md file. (list top-level folders and pages). Needed for Astro/Obsidian content.
3138
* [ ] Cache the default config folder files to avoid re-reading on every page load.
32-
* [ ] Watcher for default config folder?
33-
* [ ] Make sure nav and index are rebuilt on file changes.
39+
* [ ] Make sure nav is rebuilt on file changes.
40+
* [ ] *How to deal with category/tag listing pages?*
41+
* [ ] *Indexes cannot currently deal with rename or delete events*.
42+
* [ ] ~~Check if return msgs get clientId, etc.~~ They don't, should they?
3443

3544
#### Wish list:
3645

@@ -43,7 +52,7 @@ A node that creates a website out of a folder of markdown content.
4352
* [x] Horizontal
4453
* [ ] Vertical options.
4554

46-
* [ ] Add watcher to the page template and global attributes files to auto-reload changes.
55+
* [ ] Page icon overrides. Allow front-matter `favicon` field to specify an icon for the page that overrides the default favicon.
4756
* [ ] Improve HTML styling.
4857
* [ ] Page aliases. Allow front-matter `alias` field to specify alternative url paths for a page. Also have a master map.
4958
* [ ] Add manual index-rebuild button to Editor.

0 commit comments

Comments
 (0)