vowel 0.1.46 → 0.2.2
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 +82 -20
- package/bin.js +2 -78
- package/docs-source/$features/cards.md +7 -0
- package/docs-source/$features/editing.md +7 -0
- package/docs-source/$features/emoji.md +7 -0
- package/docs-source/$features/frontmatter.md +7 -0
- package/docs-source/$features/lists.md +7 -0
- package/docs-source/$features/navigation.md +7 -0
- package/docs-source/$features/rich-previews.md +7 -0
- package/docs-source/$features/robots.md +7 -0
- package/docs-source/$features/rss.md +7 -0
- package/docs-source/$features/sitemap.md +7 -0
- package/docs-source/$features/speed.md +7 -0
- package/docs-source/$features/static.md +7 -0
- package/docs-source/$features/taxonomies.md +7 -0
- package/docs-source/.cache.json +9 -0
- package/docs-source/.obsidian/app.json +3 -0
- package/docs-source/.obsidian/appearance.json +3 -0
- package/docs-source/.obsidian/core-plugins-migration.json +30 -0
- package/docs-source/.obsidian/core-plugins.json +20 -0
- package/docs-source/.obsidian/workspace.json +168 -0
- package/docs-source/.stackblitzrc +3 -0
- package/docs-source/.vercel/README.txt +11 -0
- package/docs-source/.vercel/project.json +1 -0
- package/docs-source/about.md +3 -0
- package/docs-source/assets/styles.css +51 -0
- package/docs-source/blog/home.md +5 -0
- package/docs-source/blog/url-ui.md +21 -0
- package/docs-source/docs/.votive.db +0 -0
- package/docs-source/docs/deploy.md +67 -0
- package/docs-source/docs/file-structure.md +31 -0
- package/docs-source/docs/folder-settings.md +23 -0
- package/docs-source/docs/home.md +55 -0
- package/docs-source/docs/images.md +10 -0
- package/docs-source/docs/items.md +13 -0
- package/docs-source/docs/pages.md +141 -0
- package/docs-source/docs/settings.md +4 -0
- package/docs-source/docs/styling.md +34 -0
- package/docs-source/docs/taxonomies.md +37 -0
- package/docs-source/home.md +42 -0
- package/docs-source/roadmap.md +98 -0
- package/docs-source/settings.md +12 -0
- package/extractDate.js +83 -0
- package/getMetadata.js +41 -0
- package/index.js +669 -0
- package/jsconfig.json +9 -17
- package/package.json +61 -63
- package/regex.js +36 -0
- package/{src/lib/components → stylesheets}/DefaultStyles.css +5 -5
- package/utils.js +10 -0
- package/.cache.json +0 -1
- package/.prettierrc +0 -8
- package/.vscode/settings.json +0 -3
- package/CHANGELOG.md +0 -79
- package/server.js +0 -87
- package/src/app.d.ts +0 -12
- package/src/app.html +0 -13
- package/src/lib/components/Breadcrumbs.svelte +0 -19
- package/src/lib/components/ConditionalWrapper.svelte +0 -10
- package/src/lib/components/DefaultStyles.svelte +0 -11
- package/src/lib/components/FrontMatterTaxonomy.svelte +0 -48
- package/src/lib/components/Frontmatter.svelte +0 -56
- package/src/lib/components/FrontmatterProperty.svelte +0 -78
- package/src/lib/components/Markdown/Image.svelte +0 -50
- package/src/lib/components/Markdown/Link.svelte +0 -19
- package/src/lib/components/Markdown/LinkPreview.svelte +0 -45
- package/src/lib/components/Markdown/Text.svelte +0 -6
- package/src/lib/components/Markdown/index.svelte +0 -147
- package/src/lib/components/Markdown/validators.js +0 -29
- package/src/lib/components/Nav.svelte +0 -40
- package/src/lib/components/NoStyles.svelte +0 -5
- package/src/lib/components/Page.svelte +0 -90
- package/src/lib/components/ResetStyles.svelte +0 -7
- package/src/lib/components/Sitemap.svelte +0 -38
- package/src/lib/components/TypographyStyles.svelte +0 -10
- package/src/lib/components/index.js +0 -12
- package/src/lib/index.js +0 -1
- package/src/lib/utilities/buildURL.js +0 -18
- package/src/lib/utilities/checkFileExists.js +0 -16
- package/src/lib/utilities/createFolderClass.js +0 -4
- package/src/lib/utilities/createPageClass.js +0 -6
- package/src/lib/utilities/getFileLabel.js +0 -35
- package/src/lib/utilities/getFolder.js +0 -16
- package/src/lib/utilities/getFolderLabel.js +0 -12
- package/src/lib/utilities/getMetadata.js +0 -46
- package/src/lib/utilities/getPage.js +0 -25
- package/src/lib/utilities/getPagesByFolder.js +0 -95
- package/src/lib/utilities/index.js +0 -22
- package/src/lib/utilities/isActiveLink.js +0 -12
- package/src/lib/utilities/isObject.js +0 -8
- package/src/lib/utilities/loadCache.js +0 -28
- package/src/lib/utilities/mutateMarkdownAST.js +0 -68
- package/src/lib/utilities/mutateMarkdownFrontmatter.js +0 -113
- package/src/lib/utilities/parseDate.js +0 -43
- package/src/lib/utilities/processMarkdownFiles.js +0 -243
- package/src/lib/utilities/readMarkdownFile.js +0 -188
- package/src/lib/utilities/regexPatterns.js +0 -12
- package/src/lib/utilities/resolveHomeDirPath.js +0 -5
- package/src/lib/utilities/sendWebmention.js +0 -34
- package/src/lib/utilities/writeCache.js +0 -14
- package/src/routes/$vowel/published.json/+server.js +0 -54
- package/src/routes/+error.svelte +0 -110
- package/src/routes/[...path]/+layout.server.js +0 -78
- package/src/routes/[...path]/+page.server.js +0 -42
- package/src/routes/[...path]/+page.svelte +0 -186
- package/src/routes/feed.xml/+server.js +0 -120
- package/src/routes/robots.txt/+server.js +0 -54
- package/src/routes/sitemap.xml/+server.js +0 -68
- package/static/favicon.png +0 -0
- package/static/styles.css +0 -0
- package/svelte.config.js +0 -30
- package/vercel.json +0 -5
- package/vite.config.js +0 -84
- /package/{src/lib/components → stylesheets}/ResetStyles.css +0 -0
- /package/{src/lib/components → stylesheets}/TypographyStyles.css +0 -0
package/jsconfig.json
CHANGED
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"strict": true,
|
|
12
|
-
"moduleResolution": "bundler"
|
|
13
|
-
}
|
|
14
|
-
// Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias and https://kit.svelte.dev/docs/configuration#files
|
|
15
|
-
//
|
|
16
|
-
// If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
|
|
17
|
-
// from the referenced tsconfig.json - TypeScript does not merge them in
|
|
18
|
-
}
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"allowJs": true,
|
|
4
|
+
"checkJs": true,
|
|
5
|
+
"noImplicitlyAny": true,
|
|
6
|
+
"module": "esnext",
|
|
7
|
+
"target": "esnext",
|
|
8
|
+
"moduleResolution": "nodenext"
|
|
9
|
+
}
|
|
10
|
+
}
|
package/package.json
CHANGED
|
@@ -1,64 +1,62 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
-
}
|
|
2
|
+
"name": "vowel",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "0.2.2",
|
|
5
|
+
"bin": "bin.js",
|
|
6
|
+
"main": "index.js",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"test": "node --test tests/*.js"
|
|
9
|
+
},
|
|
10
|
+
"keywords": [
|
|
11
|
+
"markdown",
|
|
12
|
+
"website",
|
|
13
|
+
"static site generator"
|
|
14
|
+
],
|
|
15
|
+
"author": "Sam Littlefair",
|
|
16
|
+
"license": "MIT",
|
|
17
|
+
"description": "Markdown websites",
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"fast-xml-parser": "^5.3.6",
|
|
20
|
+
"faye-websocket": "^0.11.4",
|
|
21
|
+
"hast-util-from-html": "^2.0.3",
|
|
22
|
+
"hast-util-to-string": "^3.0.1",
|
|
23
|
+
"hastscript": "^9.0.1",
|
|
24
|
+
"js-yaml": "^4.1.0",
|
|
25
|
+
"mdast": "^2.3.2",
|
|
26
|
+
"mdast-normalize-headings": "^4.0.0",
|
|
27
|
+
"mdast-util-from-markdown": "^2.0.2",
|
|
28
|
+
"mdast-util-frontmatter": "^2.0.1",
|
|
29
|
+
"mdast-util-gfm-strikethrough": "^2.0.0",
|
|
30
|
+
"mdast-util-gfm-table": "^2.0.0",
|
|
31
|
+
"mdast-util-gfm-task-list-item": "^2.0.0",
|
|
32
|
+
"mdast-util-to-hast": "^13.2.1",
|
|
33
|
+
"mdast-util-to-markdown": "^2.1.2",
|
|
34
|
+
"mdast-util-to-string": "^4.0.0",
|
|
35
|
+
"micromark-extension-frontmatter": "^2.0.0",
|
|
36
|
+
"micromark-extension-gfm-footnote": "^2.1.0",
|
|
37
|
+
"micromark-extension-gfm-table": "^2.1.1",
|
|
38
|
+
"micromark-extension-gfm-task-list-item": "^2.1.0",
|
|
39
|
+
"rehype": "^13.0.2",
|
|
40
|
+
"rehype-stringify": "^10.0.1",
|
|
41
|
+
"remark": "^15.0.1",
|
|
42
|
+
"remark-frontmatter": "^5.0.0",
|
|
43
|
+
"remark-gfm": "^4.0.1",
|
|
44
|
+
"remark-html": "^16.0.1",
|
|
45
|
+
"remark-parse": "^11.0.0",
|
|
46
|
+
"remark-rehype": "^11.1.2",
|
|
47
|
+
"unified": "^11.0.5",
|
|
48
|
+
"unist-util-find": "^3.0.0",
|
|
49
|
+
"unist-util-is": "^6.0.0",
|
|
50
|
+
"unist-util-position": "5.0.0",
|
|
51
|
+
"unist-util-stringify-position": "^4.0.0",
|
|
52
|
+
"unist-util-visit": "^5.0.0",
|
|
53
|
+
"unist-util-visit-parents": "^6.0.0",
|
|
54
|
+
"url-metadata": "^5.4.1",
|
|
55
|
+
"voot": "^0.0.2",
|
|
56
|
+
"votive": "^0.0.6",
|
|
57
|
+
"xast-util-sitemap": "^2.0.0",
|
|
58
|
+
"xast-util-to-xml": "^4.0.0",
|
|
59
|
+
"yaml": "^2.8.2",
|
|
60
|
+
"yamljs": "^0.3.0"
|
|
61
|
+
}
|
|
62
|
+
}
|
package/regex.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
const dateRegex = /(?:\b(?<first_segment>(?<first_MMM_or_MMMM>January|February|March|April|May|June|July|August|September|October|November|December|Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sept|Sep|Oct|Nov|Dec)|(?<first_YYYY>\d\d\d\d)|(?<first_do>(?:\d|[0-3]\d)(?:st|nd|rd|th))|(?<first_dd_or_MM_or_yy>[0-3]\d)|(?<first_d_or_M>\d))(?<first_delimiter>\.| |, |\/|-)?)(?:\b(?<second_segment>(?<second_MMM_or_MMMM>January|February|March|April|May|June|July|August|September|October|November|December|Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sept|Sep|Oct|Nov|Dec)|(?<second_YYYY>\d\d\d\d)|(?<second_do>(\d\d)(:?st|nd|rd|th))|(?<second_dd_or_MM_or_yy>[0-3]\d)|(?<second_d_or_M>\d))(?<second_delimiter>\.| |, |\/|-)?)(?:\b(?<third_segment>(?<third_MMM_or_MMMM>January|February|March|April|May|June|July|August|September|October|November|December|Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sept|Sep|Oct|Nov|Dec)|(?<third_YYYY>\d\d\d\d)|(?<third_do>(\d\d)(?:st|nd|rd|th))|(?<third_dd_or_MM_or_yy>[0-3]\d)|(?<third_d_or_M>\d)))(?<time>(?<time_delimiter>T|\ | at )(?<H_or_HH>[0-2]?\d):(?<MM>[0-6]\d)(?::(?<SS>00))?(?:\.(?<SSS>\d\d\d))?(?<Z>Z|(?:\+(\d\d):(\d\d)))?(?<meridiam_indicator>am|pm)?)?/mig
|
|
3
|
+
const slice = /(?:\b(?<first_segment>(?<first_MMM_or_MMMM>January|February|March|April|May|June|July|August|September|October|November|December|Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sept|Sep|Oct|Nov|Dec)|(?<first_YYYY>\d\d\d\d)|(?<first_do>(?:\d|[0-3]\d)(?:st|nd|rd|th))|(?<first_dd_or_MM_or_yy>[0-3]\d)|(?<first_d_or_M>\d))(?<first_delimiter>\.| |, |\/|-)?)(?:\b(?<second_segment>(?<second_MMM_or_MMMM>January|February|March|April|May|June|July|August|September|October|November|December|Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sept|Sep|Oct|Nov|Dec)|(?<second_YYYY>\d\d\d\d)|(?<second_do>(\d\d)(:?st|nd|rd|th))|(?<second_dd_or_MM_or_yy>[0-3]\d)|(?<second_d_or_M>\d))(?<second_delimiter>\.| |, |\/|-)?)(?:\b(?<third_segment>(?<third_MMM_or_MMMM>January|February|March|April|May|June|July|August|September|October|November|December|Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sept|Sep|Oct|Nov|Dec)|(?<third_YYYY>\d\d\d\d)|(?<third_do>(\d\d)(?:st|nd|rd|th))|(?<third_dd_or_MM_or_yy>[0-3]\d)|(?<third_d_or_M>\d)))/
|
|
4
|
+
|
|
5
|
+
const test = [
|
|
6
|
+
"111",
|
|
7
|
+
"1/1/1",
|
|
8
|
+
"02/03/24",
|
|
9
|
+
"2025-01-15",
|
|
10
|
+
"03/22/2023",
|
|
11
|
+
"1999.12.31",
|
|
12
|
+
"April 9, 2011 at 8:00pm",
|
|
13
|
+
"17th October 2020",
|
|
14
|
+
"2000/07/04",
|
|
15
|
+
"05-Aug-1985",
|
|
16
|
+
"Sunday, March 3, 2030",
|
|
17
|
+
"14 Sep 2014",
|
|
18
|
+
"Dec 25, 2022",
|
|
19
|
+
"07.11.2017",
|
|
20
|
+
"29-Feb-2016",
|
|
21
|
+
"Monday, 1st January 1996",
|
|
22
|
+
"09/09/1999",
|
|
23
|
+
"03/04/203",
|
|
24
|
+
"June 37",
|
|
25
|
+
"1999/13",
|
|
26
|
+
"April-09-11",
|
|
27
|
+
"17 October, '20",
|
|
28
|
+
"20000704",
|
|
29
|
+
"05-August-85",
|
|
30
|
+
"14-September-2014",
|
|
31
|
+
"25th of Dec, 2022",
|
|
32
|
+
"07.11.17",
|
|
33
|
+
"29-02-16",
|
|
34
|
+
"Monday 1st Jan 96",
|
|
35
|
+
"09.09/1999"
|
|
36
|
+
]
|
|
@@ -176,7 +176,7 @@ header {
|
|
|
176
176
|
margin-top: 4rem;
|
|
177
177
|
}
|
|
178
178
|
|
|
179
|
-
nav.
|
|
179
|
+
nav.primary {
|
|
180
180
|
border: 1px solid var(--border-color);
|
|
181
181
|
padding: 6px 10px;
|
|
182
182
|
margin-inline: -3px;
|
|
@@ -189,13 +189,13 @@ nav.top-bar {
|
|
|
189
189
|
background: var(--soft-background);
|
|
190
190
|
}
|
|
191
191
|
|
|
192
|
-
nav.
|
|
192
|
+
nav.primary:has(+ nav.primary) {
|
|
193
193
|
border-bottom: none;
|
|
194
194
|
border-bottom-left-radius: 0;
|
|
195
195
|
border-bottom-right-radius: 0;
|
|
196
196
|
}
|
|
197
197
|
|
|
198
|
-
nav.
|
|
198
|
+
nav.primary:has(+ nav.primary):after {
|
|
199
199
|
display: block;
|
|
200
200
|
content: '';
|
|
201
201
|
border-bottom: 1px solid var(--border-color);
|
|
@@ -203,7 +203,7 @@ nav.top-bar:has(+ nav.top-bar):after {
|
|
|
203
203
|
margin-top: 0.7rem;
|
|
204
204
|
}
|
|
205
205
|
|
|
206
|
-
nav.
|
|
206
|
+
nav.primary+nav.primary {
|
|
207
207
|
border-top-left-radius: 0;
|
|
208
208
|
border-top-right-radius: 0;
|
|
209
209
|
border-top: none;
|
|
@@ -220,7 +220,7 @@ header .breadcrumbs {
|
|
|
220
220
|
|
|
221
221
|
/* Sidebar */
|
|
222
222
|
|
|
223
|
-
.
|
|
223
|
+
.secondary {
|
|
224
224
|
margin-inline: auto;
|
|
225
225
|
}
|
|
226
226
|
|
package/utils.js
ADDED
package/.cache.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{}
|
package/.prettierrc
DELETED
package/.vscode/settings.json
DELETED
package/CHANGELOG.md
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
|
|
4
|
-
|
|
5
|
-
## [0.1.45](https://github.com/samlfair/vowel/compare/v0.1.44...v0.1.45) (2024-10-21)
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
### Features
|
|
9
|
-
|
|
10
|
-
* add h-name to h1 ([ae5cc82](https://github.com/samlfair/vowel/commit/ae5cc82bf260605b49d7f0bd29762358b89f0aa4))
|
|
11
|
-
|
|
12
|
-
## [0.1.44](https://github.com/samlfair/vowel/compare/v0.1.43...v0.1.44) (2024-10-21)
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
### Bug Fixes
|
|
16
|
-
|
|
17
|
-
* metadata retrieval bug ([566f7cf](https://github.com/samlfair/vowel/commit/566f7cf64be2749e30cddcb474f6385638c408a9))
|
|
18
|
-
* webmentions bug ([2215ff5](https://github.com/samlfair/vowel/commit/2215ff5f5668d140535f6df3d30754fd685f22ae))
|
|
19
|
-
|
|
20
|
-
## [0.1.43](https://github.com/samlfair/vowel/compare/v0.1.42...v0.1.43) (2024-10-18)
|
|
21
|
-
|
|
22
|
-
## [0.1.42](https://github.com/samlfair/vowel/compare/v0.1.41...v0.1.42) (2024-10-18)
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
### Bug Fixes
|
|
26
|
-
|
|
27
|
-
* un-hardcode webmention urls ([3421a69](https://github.com/samlfair/vowel/commit/3421a6998aa4ba20613b84c707e62fe273ddf327))
|
|
28
|
-
|
|
29
|
-
## [0.1.41](https://github.com/samlfair/vowel/compare/v0.1.40...v0.1.41) (2024-10-17)
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
### Bug Fixes
|
|
33
|
-
|
|
34
|
-
* webmentions bug ([485eda1](https://github.com/samlfair/vowel/commit/485eda1d03c54794503a2b6113066e0e21dc4798))
|
|
35
|
-
|
|
36
|
-
## [0.1.40](https://github.com/samlfair/vowel/compare/v0.1.39...v0.1.40) (2024-10-17)
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
### Features
|
|
40
|
-
|
|
41
|
-
* add h-entry microformat markup ([875b509](https://github.com/samlfair/vowel/commit/875b5092e5cf050149114ba31e1972a9c0f1dfa7))
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
### Bug Fixes
|
|
45
|
-
|
|
46
|
-
* link preview bug ([293f88f](https://github.com/samlfair/vowel/commit/293f88fcb089d70c4d1e9e4c08668f03a6244b63))
|
|
47
|
-
|
|
48
|
-
## [0.1.39](https://github.com/samlfair/vowel/compare/v0.1.38...v0.1.39) (2024-10-17)
|
|
49
|
-
|
|
50
|
-
## [0.1.38](https://github.com/samlfair/vowel/compare/v0.1.37...v0.1.38) (2024-10-17)
|
|
51
|
-
|
|
52
|
-
## [0.1.37](https://github.com/samlfair/vowel/compare/v0.1.36...v0.1.37) (2024-10-17)
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
### Features
|
|
56
|
-
|
|
57
|
-
* add 'new' status for webmentions ([12ea209](https://github.com/samlfair/vowel/commit/12ea2098eb24f4bf64c681fa7dc66371592bb08c))
|
|
58
|
-
|
|
59
|
-
## [0.1.36](https://github.com/samlfair/vowel/compare/v0.1.35...v0.1.36) (2024-10-17)
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
### Features
|
|
63
|
-
|
|
64
|
-
* send webmentions for urls with publish command ([e07abeb](https://github.com/samlfair/vowel/commit/e07abeb5911ab8079b4caec715eb0a463c4809cd))
|
|
65
|
-
|
|
66
|
-
## [0.1.35](https://github.com/samlfair/vowel/compare/v0.1.34...v0.1.35) (2024-10-17)
|
|
67
|
-
|
|
68
|
-
## [0.1.34](https://github.com/samlfair/vowel/compare/v0.1.33...v0.1.34) (2024-10-16)
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
### Features
|
|
72
|
-
|
|
73
|
-
* add webmention and github links to header ([114d9b4](https://github.com/samlfair/vowel/commit/114d9b455211957cac361825d1da8017e3afb45f))
|
|
74
|
-
|
|
75
|
-
## 0.1.33 (2024-10-14)
|
|
76
|
-
|
|
77
|
-
# Changelog
|
|
78
|
-
|
|
79
|
-
All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
|
package/server.js
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { fileURLToPath } from 'url';
|
|
2
|
-
import { createServer, build } from 'vite';
|
|
3
|
-
import { writeFile, mkdir, readFile } from 'fs/promises';
|
|
4
|
-
import { existsSync } from 'fs';
|
|
5
|
-
import { dirname, join } from 'path';
|
|
6
|
-
import mri from 'mri';
|
|
7
|
-
|
|
8
|
-
const args = mri(process.argv);
|
|
9
|
-
const { build: isBuild, directory, publish } = args;
|
|
10
|
-
|
|
11
|
-
const __dirname = fileURLToPath(new URL('.', import.meta.url));
|
|
12
|
-
|
|
13
|
-
// If this is not a build, read the process argument
|
|
14
|
-
const arg = !isBuild ? process.argv[2] : false;
|
|
15
|
-
|
|
16
|
-
// Check if this is a user (process argument) or package dev (cwd)
|
|
17
|
-
const $home = isBuild ? process.cwd() : directory;
|
|
18
|
-
|
|
19
|
-
const define = {
|
|
20
|
-
$home: [directory],
|
|
21
|
-
$build: [isBuild],
|
|
22
|
-
$publish: [publish]
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
const config = {
|
|
26
|
-
// any valid user config options, plus `mode` and `configFile`
|
|
27
|
-
configFile: join(__dirname, 'vite.config.js'),
|
|
28
|
-
root: __dirname,
|
|
29
|
-
server: {
|
|
30
|
-
port: 1337
|
|
31
|
-
},
|
|
32
|
-
define
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
const vercelDefaults = {
|
|
36
|
-
cleanUrls: true,
|
|
37
|
-
outputDirectory: '.output',
|
|
38
|
-
buildCommand: null
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
async function buildProject() {
|
|
42
|
-
const outputDir = join($home[0], '.output');
|
|
43
|
-
|
|
44
|
-
const vercelConfigPath = join($home[0], 'vercel.json');
|
|
45
|
-
|
|
46
|
-
const vercelDirPath = join($home[0], '.vercel');
|
|
47
|
-
const projectJsonPath = join(vercelDirPath, 'project.json');
|
|
48
|
-
let projectData = null;
|
|
49
|
-
|
|
50
|
-
try {
|
|
51
|
-
if (existsSync(projectJsonPath)) {
|
|
52
|
-
const data = await readFile(projectJsonPath, 'utf-8');
|
|
53
|
-
projectData = JSON.parse(data);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
await build(config);
|
|
57
|
-
|
|
58
|
-
if (projectData !== null) {
|
|
59
|
-
await mkdir(vercelDirPath, { recursive: true });
|
|
60
|
-
await writeFile(projectJsonPath, JSON.stringify(projectData, null, 2), 'utf-8');
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
const jsonData = JSON.stringify(vercelDefaults, null, 2);
|
|
64
|
-
|
|
65
|
-
const path = join($home, 'vercel.json');
|
|
66
|
-
await writeFile(path, jsonData, 'utf-8');
|
|
67
|
-
// await writeFile(vercelConfigPath, jsonData, 'utf-8');
|
|
68
|
-
console.log('Build completed successfully.');
|
|
69
|
-
} catch (err) {
|
|
70
|
-
console.error('Build failed:', err);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
async function runServer() {
|
|
75
|
-
const server = await createServer(config);
|
|
76
|
-
await server.listen();
|
|
77
|
-
|
|
78
|
-
server.printUrls();
|
|
79
|
-
server.bindCLIShortcuts({ print: true });
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
// If build mode
|
|
83
|
-
if (isBuild) {
|
|
84
|
-
buildProject();
|
|
85
|
-
} else {
|
|
86
|
-
runServer();
|
|
87
|
-
}
|
package/src/app.d.ts
DELETED
package/src/app.html
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
-
|
|
7
|
-
%sveltekit.head%
|
|
8
|
-
</head>
|
|
9
|
-
|
|
10
|
-
<body>
|
|
11
|
-
<div class="container">%sveltekit.body%</div>
|
|
12
|
-
</body>
|
|
13
|
-
</html>
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { page } from '$app/stores';
|
|
3
|
-
import { getFolderLabel, getFolder } from '$lib/utilities';
|
|
4
|
-
|
|
5
|
-
let { level } = $props();
|
|
6
|
-
|
|
7
|
-
const path = $derived($page.data.segments.slice(0, level).join('/'));
|
|
8
|
-
// The page for the current crumb
|
|
9
|
-
const crumbyPage = $derived(getFolder($page.data.website, path));
|
|
10
|
-
const folderLabel = $derived(getFolderLabel(crumbyPage, true, false));
|
|
11
|
-
|
|
12
|
-
const active = $derived(level === $page.data.segments.length);
|
|
13
|
-
</script>
|
|
14
|
-
|
|
15
|
-
<a aria-current={active ? 'page' : undefined} href={crumbyPage?.['$'].url}>{folderLabel}</a>
|
|
16
|
-
{#if !active}
|
|
17
|
-
<span aria-hidden="true" class="separator"></span>
|
|
18
|
-
<svelte:self level={level + 1} />
|
|
19
|
-
{/if}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { sentenceCase } from 'change-case';
|
|
3
|
-
// @ts-ignore
|
|
4
|
-
import { getFileLabel, getPage } from '$lib/utilities';
|
|
5
|
-
|
|
6
|
-
/** @type {{ property: any, key: string }}*/
|
|
7
|
-
let { property, key, website } = $props();
|
|
8
|
-
|
|
9
|
-
const path = key + '/' + property;
|
|
10
|
-
const page = getPage(website, path);
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Check if a value is an object
|
|
14
|
-
* @param {any} value - Value to check.
|
|
15
|
-
* @returns {boolean}
|
|
16
|
-
*/
|
|
17
|
-
function isObject(value) {
|
|
18
|
-
return typeof value === 'object' && !Array.isArray(value) && value !== null;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Check if a value is an object
|
|
23
|
-
* @param {any} value - Value to check.
|
|
24
|
-
* @returns {boolean}
|
|
25
|
-
*/
|
|
26
|
-
function isArray(value) {
|
|
27
|
-
return typeof value === 'object' && Array.isArray(value) && value !== null;
|
|
28
|
-
}
|
|
29
|
-
</script>
|
|
30
|
-
|
|
31
|
-
<dl>
|
|
32
|
-
<dt class={key}>{sentenceCase(key)}</dt>
|
|
33
|
-
<dd class={key}>
|
|
34
|
-
{#if isArray(property)}
|
|
35
|
-
<ul>
|
|
36
|
-
{#each property as item}
|
|
37
|
-
{@const path = key + '/' + item}
|
|
38
|
-
{@const page = getPage(website, path)}
|
|
39
|
-
<li>
|
|
40
|
-
<a href={page.url}>{getFileLabel(page)}</a>
|
|
41
|
-
</li>
|
|
42
|
-
{/each}
|
|
43
|
-
</ul>
|
|
44
|
-
{:else}
|
|
45
|
-
<a href={page.url}>{getFileLabel(page)}</a>
|
|
46
|
-
{/if}
|
|
47
|
-
</dd>
|
|
48
|
-
</dl>
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { FrontmatterProperty, FrontmatterTaxonomy } from './';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* @typedef {import("../utilities/processMarkdownFiles").MarkdownFile} MarkdownFile
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* @type {{props: {properties: MarkdownFile}}}
|
|
10
|
-
*/
|
|
11
|
-
let { props } = $props();
|
|
12
|
-
// TODO: Normalize frontmatter props
|
|
13
|
-
let { properties, website, format } = $derived(props);
|
|
14
|
-
const keys = $derived(Object.keys(properties || {}));
|
|
15
|
-
|
|
16
|
-
const excludedProperties = [
|
|
17
|
-
'title',
|
|
18
|
-
'description',
|
|
19
|
-
'type',
|
|
20
|
-
'ast',
|
|
21
|
-
'url',
|
|
22
|
-
'frontmatter',
|
|
23
|
-
'published',
|
|
24
|
-
'date',
|
|
25
|
-
'image',
|
|
26
|
-
'breadcrumb',
|
|
27
|
-
'imputedProperties',
|
|
28
|
-
'toc'
|
|
29
|
-
];
|
|
30
|
-
|
|
31
|
-
// const { website } = $page.data;
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Fetch a given property from a page.
|
|
35
|
-
* @param {MarkdownFile} properties - A markdown file.
|
|
36
|
-
* @param {string} key - The name of a property
|
|
37
|
-
* @returns {any}
|
|
38
|
-
*/
|
|
39
|
-
function getProperty(properties, key) {
|
|
40
|
-
// @ts-ignore
|
|
41
|
-
return properties[key];
|
|
42
|
-
}
|
|
43
|
-
</script>
|
|
44
|
-
|
|
45
|
-
{#if properties}
|
|
46
|
-
{#each keys as key}
|
|
47
|
-
{#if !excludedProperties.includes(key)}
|
|
48
|
-
{@const property = getProperty(properties, key)}
|
|
49
|
-
{#if website.hasOwnProperty(key)}
|
|
50
|
-
<FrontmatterTaxonomy {property} {key} {website} />
|
|
51
|
-
{:else}
|
|
52
|
-
<FrontmatterProperty {property} {key} {format} />
|
|
53
|
-
{/if}
|
|
54
|
-
{/if}
|
|
55
|
-
{/each}
|
|
56
|
-
{/if}
|