vowel 0.6.4 → 0.7.0-beta.0
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 +1 -1
- package/bin.js +47 -27
- package/cli.js +15 -0
- package/config.js +93 -26
- package/extractDate.js +70 -6
- package/index.js +14 -5
- package/package.json +39 -8
- package/plugins/assets/index.js +65 -0
- package/plugins/atproto/index.js +132 -0
- package/plugins/atproto/password.js +71 -0
- package/plugins/atproto/publish.js +406 -0
- package/plugins/atproto/record.js +144 -0
- package/plugins/atproto/rkey.js +54 -0
- package/plugins/deploy-cloudflare/index.js +30 -16
- package/plugins/fonts/index.js +18 -21
- package/plugins/html/assets/bundle-BeK1Hptv.css +21 -0
- package/plugins/html/bundle/assets/index-BeK1Hptv.css +21 -0
- package/plugins/html/bundle/index.js +21145 -0
- package/plugins/html/editor/EditButton.svelte +152 -0
- package/plugins/html/editor/Editor.svelte +51 -0
- package/plugins/html/editor/Overlays.svelte +6 -0
- package/plugins/html/editor/SettingsPanel.svelte +397 -0
- package/plugins/html/editor/Toolbar.svelte +644 -0
- package/plugins/html/editor/create-session.js +250 -0
- package/plugins/html/editor/directives.js +128 -0
- package/plugins/html/editor/frontmatter.js +97 -0
- package/plugins/html/editor/ingest.js +339 -0
- package/plugins/html/editor/main.js +94 -0
- package/plugins/html/editor/nodes/Alert.svelte +21 -0
- package/plugins/html/editor/nodes/Blockquote.svelte +9 -0
- package/plugins/html/editor/nodes/CodeBlock.svelte +19 -0
- package/plugins/html/editor/nodes/Embed.svelte +19 -0
- package/plugins/html/editor/nodes/Emphasis.svelte +11 -0
- package/plugins/html/editor/nodes/Heading.svelte +15 -0
- package/plugins/html/editor/nodes/Highlight.svelte +11 -0
- package/plugins/html/editor/nodes/Image.svelte +18 -0
- package/plugins/html/editor/nodes/InlineCode.svelte +11 -0
- package/plugins/html/editor/nodes/Link.svelte +17 -0
- package/plugins/html/editor/nodes/List.svelte +15 -0
- package/plugins/html/editor/nodes/ListItem.svelte +9 -0
- package/plugins/html/editor/nodes/Page.svelte +21 -0
- package/plugins/html/editor/nodes/Paragraph.svelte +9 -0
- package/plugins/html/editor/nodes/Strikethrough.svelte +11 -0
- package/plugins/html/editor/nodes/Strong.svelte +11 -0
- package/plugins/html/editor/nodes/ThematicBreak.svelte +9 -0
- package/plugins/html/editor/nodes/index.js +18 -0
- package/plugins/html/editor/rollup.config.js +35 -0
- package/plugins/html/editor/serialize.js +157 -0
- package/plugins/html/editor/settings-file.js +83 -0
- package/plugins/html/editor/socket.js +202 -0
- package/plugins/html/editor/source.js +43 -0
- package/plugins/html/image.js +31 -5
- package/plugins/html/index.js +430 -458
- package/plugins/html/partials.js +299 -0
- package/plugins/html/socialLinks.js +67 -0
- package/plugins/html/writeRules.js +377 -0
- package/plugins/icons/index.js +2 -6
- package/plugins/images/index.js +78 -55
- package/plugins/markdown/brandColors.js +10 -0
- package/plugins/markdown/colorScheme.js +64 -0
- package/plugins/markdown/emoji.js +30 -0
- package/plugins/markdown/frontmatter.js +253 -0
- package/plugins/markdown/index.js +276 -334
- package/plugins/markdown/links.js +97 -0
- package/plugins/markdown/metadata.js +229 -68
- package/plugins/markdown/readRules.js +143 -0
- package/plugins/markdown/typography.js +109 -0
- package/plugins/markdown/visitor.js +143 -0
- package/plugins/publish/index.js +34 -0
- package/plugins/robots/agents.js +79 -0
- package/plugins/robots/index.js +30 -10
- package/plugins/robots/robots.js +48 -0
- package/plugins/styles/index.js +111 -18
- package/plugins/styles/theme.js +116 -0
- package/plugins/urls/index.js +49 -62
- package/plugins/urls/urlMetadata.js +246 -0
- package/plugins/vectors/index.js +5 -9
- package/plugins/xml/entryContent.js +103 -0
- package/plugins/xml/index.js +105 -43
- package/secretPaths.js +170 -0
- package/stylesheets/DefaultStyles.css +367 -437
- package/stylesheets/ResetStyles.css +2 -38
- package/stylesheets/SyntaxHighlightingStyles.css +36 -4
- package/stylesheets/TypographyStyles.css +386 -128
- package/systemPaths.js +48 -0
- package/utils.js +56 -5
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -73
- package/.github/ISSUE_TEMPLATE/config.yml +0 -7
- package/docs-source/.cache.json +0 -9
- package/docs-source/.obsidian/app.json +0 -3
- package/docs-source/.obsidian/appearance.json +0 -3
- package/docs-source/.obsidian/core-plugins-migration.json +0 -30
- package/docs-source/.obsidian/core-plugins.json +0 -20
- package/docs-source/.obsidian/workspace.json +0 -168
- package/docs-source/.stackblitzrc +0 -3
- package/docs-source/.votive.db +0 -0
- package/docs-source/about.md +0 -3
- package/docs-source/blog/home.md +0 -5
- package/docs-source/blog/url-ui.md +0 -21
- package/docs-source/blog.md +0 -5
- package/docs-source/docs/.votive.db +0 -0
- package/docs-source/docs/deploy.md +0 -67
- package/docs-source/docs/file-structure.md +0 -31
- package/docs-source/docs/folder-settings.md +0 -23
- package/docs-source/docs/home.md +0 -55
- package/docs-source/docs/images.md +0 -10
- package/docs-source/docs/items.md +0 -13
- package/docs-source/docs/pages.md +0 -141
- package/docs-source/docs/settings.md +0 -4
- package/docs-source/docs/styling.md +0 -34
- package/docs-source/docs/taxonomies.md +0 -37
- package/docs-source/features/cards.md +0 -7
- package/docs-source/features/editing.md +0 -7
- package/docs-source/features/emoji.md +0 -7
- package/docs-source/features/frontmatter.md +0 -7
- package/docs-source/features/lists.md +0 -7
- package/docs-source/features/navigation.md +0 -7
- package/docs-source/features/rich-previews.md +0 -7
- package/docs-source/features/robots.md +0 -7
- package/docs-source/features/rss.md +0 -7
- package/docs-source/features/sitemap.md +0 -7
- package/docs-source/features/speed.md +0 -7
- package/docs-source/features/static.md +0 -7
- package/docs-source/features/taxonomies.md +0 -7
- package/docs-source/home.md +0 -42
- package/docs-source/output/about.html +0 -1
- package/docs-source/output/blog/url-ui.html +0 -8
- package/docs-source/output/blog.html +0 -1
- package/docs-source/output/default.css +0 -1
- package/docs-source/output/docs/deploy.html +0 -34
- package/docs-source/output/docs/file-structure.html +0 -24
- package/docs-source/output/docs/folder-settings.html +0 -20
- package/docs-source/output/docs/images.html +0 -2
- package/docs-source/output/docs/items.html +0 -6
- package/docs-source/output/docs/pages.html +0 -101
- package/docs-source/output/docs/styling.html +0 -18
- package/docs-source/output/docs/taxonomies.html +0 -20
- package/docs-source/output/docs.html +0 -28
- package/docs-source/output/features/cards.html +0 -1
- package/docs-source/output/features/editing.html +0 -1
- package/docs-source/output/features/emoji.html +0 -1
- package/docs-source/output/features/frontmatter.html +0 -1
- package/docs-source/output/features/lists.html +0 -1
- package/docs-source/output/features/navigation.html +0 -1
- package/docs-source/output/features/rich-previews.html +0 -1
- package/docs-source/output/features/robots.html +0 -1
- package/docs-source/output/features/rss.html +0 -1
- package/docs-source/output/features/sitemap.html +0 -1
- package/docs-source/output/features/speed.html +0 -1
- package/docs-source/output/features/static.html +0 -1
- package/docs-source/output/features/taxonomies.html +0 -1
- package/docs-source/output/features.html +0 -1
- package/docs-source/output/feed.xml +0 -1
- package/docs-source/output/index.html +0 -21
- package/docs-source/output/reset.css +0 -1
- package/docs-source/output/roadmap.html +0 -87
- package/docs-source/output/robots.txt +0 -14
- package/docs-source/output/sitemap.xml +0 -16
- package/docs-source/output/typography.css +0 -1
- package/docs-source/roadmap.md +0 -98
- package/docs-source/settings.md +0 -13
- package/getMetadata.js +0 -41
- package/jsconfig.json +0 -10
- package/plugins/markdown/robots.js +0 -18
- package/regex.js +0 -36
- package/stylesheets/brand-colors.css +0 -119
|
@@ -1,8 +1,25 @@
|
|
|
1
1
|
@layer reset, typography;
|
|
2
2
|
|
|
3
3
|
@layer typography {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
/*
|
|
7
|
+
FONT FAMILIES
|
|
8
|
+
*/
|
|
9
|
+
:root {
|
|
10
|
+
/*
|
|
11
|
+
these variables declare a stack with system fallbacks
|
|
12
|
+
declare brand fonts with `--font-x-brand` to keep stack intact
|
|
13
|
+
*/
|
|
14
|
+
--font-stack-serif: var(--font-serif-brand), var(--font-serif-system);
|
|
15
|
+
--font-stack-sans: var(--font-sans-brand), var(--font-sans-system);
|
|
16
|
+
--font-stack-monospace: var(--font-monospace-brand), var(--font-monospace-system);
|
|
17
|
+
|
|
18
|
+
--font-serif-brand: "Declare a brand serif font with this variable";
|
|
19
|
+
--font-sans-brand: "Declare a brand sans-serif font with this variable";
|
|
20
|
+
--font-monospace-brand: "Declare a brand monospace font with this variable";
|
|
21
|
+
|
|
22
|
+
--font-sans-system:
|
|
6
23
|
-apple-system,
|
|
7
24
|
BlinkMacSystemFont,
|
|
8
25
|
avenir next,
|
|
@@ -16,199 +33,440 @@
|
|
|
16
33
|
noto,
|
|
17
34
|
arial,
|
|
18
35
|
sans-serif;
|
|
36
|
+
|
|
37
|
+
--font-monospace-system:
|
|
38
|
+
Menlo,
|
|
39
|
+
Consolas,
|
|
40
|
+
Monaco,
|
|
41
|
+
Liberation Mono,
|
|
42
|
+
Lucida Console,
|
|
43
|
+
monospace;
|
|
44
|
+
|
|
45
|
+
--font-serif-system:
|
|
46
|
+
Iowan Old Style,
|
|
47
|
+
Apple Garamond,
|
|
48
|
+
Baskerville,
|
|
49
|
+
Times New Roman,
|
|
50
|
+
Droid Serif,
|
|
51
|
+
Times,
|
|
52
|
+
Source Serif Pro,
|
|
53
|
+
serif,
|
|
54
|
+
Apple Color Emoji,
|
|
55
|
+
Segoe UI Emoji,
|
|
56
|
+
Segoe UI Symbol;
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
/*
|
|
60
|
+
the recommended root font size on small screens (16px) and
|
|
61
|
+
large screens (18px)
|
|
62
|
+
*/
|
|
63
|
+
--font-size-root: clamp(1rem, 0.875rem + 0.333vw, 1.125rem);
|
|
64
|
+
|
|
65
|
+
/*
|
|
66
|
+
the difference in size of h1 relative to the root
|
|
67
|
+
font size; increase or decrease this number for larger or
|
|
68
|
+
smaller headings
|
|
69
|
+
*/
|
|
70
|
+
--font-size-delta: calc(1.5 * var(--font-size-root));
|
|
71
|
+
|
|
72
|
+
/*
|
|
73
|
+
the rate of decay from h1 to h6 font size, where h6 is
|
|
74
|
+
almost as small as the root font size; a higher number
|
|
75
|
+
makes subheadings smaller
|
|
76
|
+
*/
|
|
77
|
+
--font-size-decay: 3;
|
|
78
|
+
|
|
79
|
+
/*
|
|
80
|
+
letter spacing of h1 and h6, with h2-h6 imputed
|
|
81
|
+
according to the decay variable
|
|
82
|
+
*/
|
|
83
|
+
--letter-spacing-h1: -0.01ch;
|
|
84
|
+
--letter-spacing-h6: 0ch;
|
|
85
|
+
--letter-spacing-decay: 2;
|
|
86
|
+
|
|
87
|
+
/*
|
|
88
|
+
weight of h1 and h6, with h2-h6 imputed according
|
|
89
|
+
to the decay variable
|
|
90
|
+
*/
|
|
91
|
+
--font-weight-h1: 800;
|
|
92
|
+
--font-weight-h6: 600;
|
|
93
|
+
--font-weight-decay: 2;
|
|
94
|
+
|
|
95
|
+
/*
|
|
96
|
+
*do not edit or overwrite*: calculations to impute
|
|
97
|
+
font sizes, weights, and spacing between h1 and h6
|
|
98
|
+
*/
|
|
99
|
+
--font-size-h1: calc(var(--font-size-root) + var(--font-size-delta));
|
|
100
|
+
--font-size-h2: calc(var(--font-size-root) + calc(var(--font-size-delta) * pow(5 / 6, var(--font-size-decay))));
|
|
101
|
+
--font-size-h3: calc(var(--font-size-root) + calc(var(--font-size-delta) * pow(4 / 6, var(--font-size-decay))));
|
|
102
|
+
--font-size-h4: calc(var(--font-size-root) + calc(var(--font-size-delta) * pow(3 / 6, var(--font-size-decay))));
|
|
103
|
+
--font-size-h5: calc(var(--font-size-root) + calc(var(--font-size-delta) * pow(2 / 6, var(--font-size-decay))));
|
|
104
|
+
--font-size-h6: calc(var(--font-size-root) + calc(var(--font-size-delta) * pow(1 / 6, var(--font-size-decay))));
|
|
105
|
+
--letter-spacing-delta: calc(var(--letter-spacing-h1) - var(--letter-spacing-h6));
|
|
106
|
+
--letter-spacing-h2: calc(var(--letter-spacing-h6) + calc(var(--letter-spacing-delta) * pow(5 / 6, var(--letter-spacing-decay))));
|
|
107
|
+
--letter-spacing-h3: calc(var(--letter-spacing-h6) + calc(var(--letter-spacing-delta) * pow(4 / 6, var(--letter-spacing-decay))));
|
|
108
|
+
--letter-spacing-h4: calc(var(--letter-spacing-h6) + calc(var(--letter-spacing-delta) * pow(3 / 6, var(--letter-spacing-decay))));
|
|
109
|
+
--letter-spacing-h5: calc(var(--letter-spacing-h6) + calc(var(--letter-spacing-delta) * pow(2 / 6, var(--letter-spacing-decay))));
|
|
110
|
+
--font-weight-delta: calc(var(--font-weight-h1) - var(--font-weight-h6));
|
|
111
|
+
--font-weight-h2: calc(var(--font-weight-h6) + calc(var(--font-weight-delta) * pow(5 / 6, var(--font-weight-decay))));
|
|
112
|
+
--font-weight-h3: calc(var(--font-weight-h6) + calc(var(--font-weight-delta) * pow(4 / 6, var(--font-weight-decay))));
|
|
113
|
+
--font-weight-h4: calc(var(--font-weight-h6) + calc(var(--font-weight-delta) * pow(3 / 6, var(--font-weight-decay))));
|
|
114
|
+
--font-weight-h5: calc(var(--font-weight-h6) + calc(var(--font-weight-delta) * pow(2 / 6, var(--font-weight-decay))));
|
|
19
115
|
}
|
|
20
116
|
|
|
117
|
+
html {
|
|
118
|
+
font-family: var(--font-stack-sans);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
pre,
|
|
122
|
+
code,
|
|
123
|
+
kbd {
|
|
124
|
+
font-family: var(--font-stack-monospace);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/*
|
|
128
|
+
BOX SIZING
|
|
129
|
+
*/
|
|
130
|
+
|
|
131
|
+
p,
|
|
21
132
|
h1,
|
|
22
133
|
h2,
|
|
23
134
|
h3,
|
|
24
135
|
h4,
|
|
25
136
|
h5,
|
|
26
|
-
h6
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
137
|
+
h6,
|
|
138
|
+
ul,
|
|
139
|
+
ol,
|
|
140
|
+
li,
|
|
141
|
+
dl,
|
|
142
|
+
dt,
|
|
143
|
+
dd,
|
|
144
|
+
table,
|
|
145
|
+
tbody,
|
|
146
|
+
th,
|
|
147
|
+
tr,
|
|
148
|
+
td,
|
|
149
|
+
blockquote,
|
|
150
|
+
a,
|
|
151
|
+
strong,
|
|
152
|
+
em,
|
|
153
|
+
i,
|
|
154
|
+
u,
|
|
155
|
+
q,
|
|
156
|
+
b,
|
|
157
|
+
s,
|
|
158
|
+
cite,
|
|
159
|
+
ins,
|
|
160
|
+
del,
|
|
161
|
+
dfn,
|
|
162
|
+
small,
|
|
163
|
+
address,
|
|
164
|
+
figcaption,
|
|
165
|
+
sub,
|
|
166
|
+
sup,
|
|
167
|
+
time,
|
|
168
|
+
kbd,
|
|
169
|
+
data,
|
|
170
|
+
samp,
|
|
171
|
+
var,
|
|
172
|
+
button {
|
|
173
|
+
text-box-trim: trim-both;
|
|
174
|
+
text-box-edge: cap alphabetic;
|
|
175
|
+
margin: 0;
|
|
32
176
|
}
|
|
33
177
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
font-weight: 800;
|
|
38
|
-
}
|
|
178
|
+
/*
|
|
179
|
+
TEXT STYLES
|
|
180
|
+
*/
|
|
39
181
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
margin-top: 3rem;
|
|
182
|
+
a {
|
|
183
|
+
text-decoration: none;
|
|
43
184
|
}
|
|
44
185
|
|
|
45
|
-
|
|
46
|
-
font-
|
|
47
|
-
margin-top: 3rem;
|
|
186
|
+
[rel=home] {
|
|
187
|
+
font-weight: bold;
|
|
48
188
|
}
|
|
49
189
|
|
|
50
|
-
|
|
51
|
-
|
|
190
|
+
table {
|
|
191
|
+
border-collapse: collapse;
|
|
52
192
|
}
|
|
53
193
|
|
|
54
|
-
|
|
55
|
-
font-
|
|
194
|
+
time {
|
|
195
|
+
font-weight: bold;
|
|
56
196
|
}
|
|
57
197
|
|
|
58
|
-
|
|
59
|
-
font-
|
|
198
|
+
figcaption {
|
|
199
|
+
font-style: italic;
|
|
60
200
|
}
|
|
61
201
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
202
|
+
nav a:where([aria-current='page'], [aria-current='true']),
|
|
203
|
+
nav a:where([aria-current='page'], [aria-current='true']):hover {
|
|
204
|
+
cursor: default;
|
|
65
205
|
}
|
|
66
206
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
h2 {
|
|
73
|
-
font-size: 2.1rem;
|
|
74
|
-
}
|
|
207
|
+
b,
|
|
208
|
+
strong {
|
|
209
|
+
font-weight: bolder;
|
|
210
|
+
}
|
|
75
211
|
|
|
76
|
-
h3 {
|
|
77
|
-
font-size: 1.75rem;
|
|
78
|
-
}
|
|
79
212
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}
|
|
213
|
+
small {
|
|
214
|
+
font-size: 80%;
|
|
83
215
|
}
|
|
84
216
|
|
|
85
|
-
|
|
86
|
-
|
|
217
|
+
sub,
|
|
218
|
+
sup {
|
|
219
|
+
font-size: 75%;
|
|
220
|
+
line-height: 0;
|
|
221
|
+
position: relative;
|
|
222
|
+
vertical-align: baseline;
|
|
87
223
|
}
|
|
88
224
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
/* padding-left: 0; */
|
|
92
|
-
margin-top: 0;
|
|
225
|
+
sub {
|
|
226
|
+
bottom: -0.25em;
|
|
93
227
|
}
|
|
94
228
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
ol ol,
|
|
98
|
-
ol ul {
|
|
99
|
-
font-size: 100%;
|
|
100
|
-
/* margin: 1rem 0 1rem 3rem; */
|
|
229
|
+
sup {
|
|
230
|
+
top: -0.5em;
|
|
101
231
|
}
|
|
102
232
|
|
|
103
|
-
/*
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
padding: 0;
|
|
107
|
-
}
|
|
233
|
+
/*
|
|
234
|
+
CONTENT SPACING
|
|
235
|
+
*/
|
|
108
236
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
font-family:
|
|
112
|
-
Menlo,
|
|
113
|
-
Consolas,
|
|
114
|
-
Monaco,
|
|
115
|
-
Liberation Mono,
|
|
116
|
-
Lucida Console,
|
|
117
|
-
monospace;
|
|
237
|
+
nav>a {
|
|
238
|
+
text-wrap: nowrap;
|
|
118
239
|
}
|
|
119
240
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
margin-inline: 0px;
|
|
123
|
-
padding: 3px 4px;
|
|
124
|
-
border-radius: 5px;
|
|
125
|
-
}
|
|
241
|
+
/* main */
|
|
242
|
+
main {
|
|
126
243
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
overflow-x: auto;
|
|
244
|
+
time {
|
|
245
|
+
display: block;
|
|
246
|
+
}
|
|
131
247
|
}
|
|
132
248
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
249
|
+
main,
|
|
250
|
+
section {
|
|
251
|
+
|
|
252
|
+
row-gap: 2lh;
|
|
253
|
+
align-items: stretch;
|
|
254
|
+
|
|
255
|
+
/* flex layout blocks */
|
|
256
|
+
&,
|
|
257
|
+
blockquote,
|
|
258
|
+
aside,
|
|
259
|
+
article,
|
|
260
|
+
figure,
|
|
261
|
+
nav[aria-label=Contents],
|
|
262
|
+
ul,
|
|
263
|
+
ol {
|
|
264
|
+
display: flex;
|
|
265
|
+
flex-direction: column;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
/* nav spacing */
|
|
270
|
+
nav[aria-label=Contents] {
|
|
271
|
+
|
|
272
|
+
ol,
|
|
273
|
+
ol,
|
|
274
|
+
li {
|
|
275
|
+
display: flex;
|
|
276
|
+
flex-direction: column;
|
|
277
|
+
justify-content: flex-start;
|
|
278
|
+
line-height: 1.2;
|
|
279
|
+
gap: 0.8lh;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
136
282
|
}
|
|
137
283
|
|
|
138
|
-
|
|
139
|
-
|
|
284
|
+
main {
|
|
285
|
+
row-gap: 1lh;
|
|
286
|
+
|
|
287
|
+
&>p {
|
|
288
|
+
margin-top: 1lh;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
&>section {
|
|
292
|
+
margin-top: 1lh;
|
|
293
|
+
}
|
|
140
294
|
}
|
|
141
295
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
296
|
+
/* content */
|
|
297
|
+
section {
|
|
298
|
+
|
|
299
|
+
/* image caption space */
|
|
300
|
+
figure {
|
|
301
|
+
gap: 1lh;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
/* list spacing */
|
|
305
|
+
ul,
|
|
306
|
+
ol {
|
|
307
|
+
gap: 1lh;
|
|
308
|
+
|
|
309
|
+
/* nested list space */
|
|
310
|
+
ul,
|
|
311
|
+
ol {
|
|
312
|
+
padding-top: 1lh;
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
/* block spacing */
|
|
317
|
+
aside,
|
|
318
|
+
blockquote,
|
|
319
|
+
article {
|
|
320
|
+
gap: 1lh;
|
|
321
|
+
padding: clamp(1lh, 3vh, 1.5lh) clamp(2ch, 2vw, 3ch);
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
/* code spacing */
|
|
325
|
+
pre {
|
|
326
|
+
padding: 0.5lh 2ch;
|
|
327
|
+
overflow-x: auto;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
/* table spacing */
|
|
331
|
+
td,
|
|
332
|
+
th {
|
|
333
|
+
padding: 0.5lh 2ch;
|
|
334
|
+
text-align: left;
|
|
335
|
+
|
|
336
|
+
&:first-child {
|
|
337
|
+
padding-left: 0;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
145
340
|
}
|
|
146
341
|
|
|
147
|
-
|
|
148
|
-
|
|
342
|
+
body {
|
|
343
|
+
display: flex;
|
|
344
|
+
flex-direction: row;
|
|
345
|
+
|
|
346
|
+
&>* {
|
|
347
|
+
width: 100%;
|
|
348
|
+
}
|
|
149
349
|
}
|
|
150
350
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
351
|
+
/* sidebar */
|
|
352
|
+
aside {
|
|
353
|
+
nav {
|
|
354
|
+
|
|
355
|
+
ul,
|
|
356
|
+
li {
|
|
357
|
+
display: flex;
|
|
358
|
+
flex-direction: column;
|
|
359
|
+
gap: 1.1em;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
155
362
|
}
|
|
156
363
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
364
|
+
|
|
365
|
+
/*
|
|
366
|
+
FONTS SIZING
|
|
367
|
+
*/
|
|
368
|
+
|
|
369
|
+
body {
|
|
370
|
+
font-size: var(--font-size-root);
|
|
160
371
|
}
|
|
161
372
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
373
|
+
h1 {
|
|
374
|
+
font-size: var(--font-size-h1);
|
|
375
|
+
letter-spacing: var(--letter-spacing-h1);
|
|
376
|
+
font-weight: var(--font-weight-h1);
|
|
377
|
+
|
|
378
|
+
main article &,
|
|
379
|
+
main aside &,
|
|
380
|
+
main blockquote & {
|
|
381
|
+
font-size: var(--font-size-h3);
|
|
382
|
+
}
|
|
165
383
|
}
|
|
166
384
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
385
|
+
h2 {
|
|
386
|
+
font-size: var(--font-size-h2);
|
|
387
|
+
letter-spacing: var(--letter-spacing-h2);
|
|
388
|
+
font-weight: var(--font-weight-h2);
|
|
389
|
+
|
|
390
|
+
main article &,
|
|
391
|
+
main aside &,
|
|
392
|
+
main blockquote & {
|
|
393
|
+
font-size: var(--font-size-h3);
|
|
394
|
+
}
|
|
171
395
|
}
|
|
172
396
|
|
|
173
|
-
|
|
174
|
-
|
|
397
|
+
h3 {
|
|
398
|
+
font-size: var(--font-size-h3);
|
|
399
|
+
letter-spacing: var(--letter-spacing-h3);
|
|
400
|
+
font-weight: var(--font-weight-h3);
|
|
401
|
+
|
|
402
|
+
main article &,
|
|
403
|
+
main aside &,
|
|
404
|
+
main blockquote & {
|
|
405
|
+
font-size: var(--font-size-h4);
|
|
406
|
+
}
|
|
175
407
|
}
|
|
176
408
|
|
|
177
|
-
|
|
178
|
-
font-size:
|
|
409
|
+
h4 {
|
|
410
|
+
font-size: var(--font-size-h4);
|
|
411
|
+
letter-spacing: var(--letter-spacing-h4);
|
|
412
|
+
font-weight: var(--font-weight-h4);
|
|
413
|
+
|
|
414
|
+
main article &,
|
|
415
|
+
main aside &,
|
|
416
|
+
main blockquote & {
|
|
417
|
+
font-size: var(--font-size-h5);
|
|
418
|
+
}
|
|
179
419
|
}
|
|
180
420
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
421
|
+
h5 {
|
|
422
|
+
font-size: var(--font-size-h5);
|
|
423
|
+
letter-spacing: var(--letter-spacing-h5);
|
|
424
|
+
font-weight: var(--font-weight-h5);
|
|
425
|
+
|
|
426
|
+
main article &,
|
|
427
|
+
main aside &,
|
|
428
|
+
main blockquote & {
|
|
429
|
+
font-size: var(--font-size-h6);
|
|
430
|
+
}
|
|
184
431
|
}
|
|
185
432
|
|
|
186
|
-
|
|
187
|
-
|
|
433
|
+
h6 {
|
|
434
|
+
font-size: var(--font-size-h6);
|
|
435
|
+
letter-spacing: var(--letter-spacing-h6);
|
|
436
|
+
font-weight: var(--font-weight-h6);
|
|
188
437
|
}
|
|
189
438
|
|
|
190
|
-
|
|
191
|
-
font-
|
|
192
|
-
font-
|
|
193
|
-
|
|
194
|
-
text-box-edge: cap alphabetic;
|
|
439
|
+
[rel=home] {
|
|
440
|
+
font-size: var(--font-size-h3);
|
|
441
|
+
font-weight: var(--font-weight-h1);
|
|
442
|
+
letter-spacing: var(--letter-spacing-h1);
|
|
195
443
|
}
|
|
196
444
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
445
|
+
|
|
446
|
+
ul ul,
|
|
447
|
+
ul ol,
|
|
448
|
+
ol ol,
|
|
449
|
+
ol ul {
|
|
450
|
+
font-size: inherit;
|
|
202
451
|
}
|
|
203
452
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
453
|
+
/* main content */
|
|
454
|
+
main {
|
|
455
|
+
nav[aria-label=Breadcrumbs] {
|
|
456
|
+
font-size: 0.8em;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
code,
|
|
460
|
+
kbd,
|
|
461
|
+
samp {
|
|
462
|
+
font-size: 0.9em;
|
|
463
|
+
}
|
|
208
464
|
}
|
|
209
465
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
466
|
+
/* header */
|
|
467
|
+
header {
|
|
468
|
+
a[rel=home] {
|
|
469
|
+
font-size: 2em;
|
|
470
|
+
}
|
|
213
471
|
}
|
|
214
472
|
}
|
package/systemPaths.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { createHash } from "node:crypto"
|
|
2
|
+
import os from "node:os"
|
|
3
|
+
import path from "node:path"
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The OS-appropriate root for per-application data (not votive-specific
|
|
7
|
+
* yet - see systemDirectoryFor). Follows the XDG Base Directory spec on
|
|
8
|
+
* Linux/other POSIX systems, and each platform's own convention
|
|
9
|
+
* elsewhere - the same rough convention tools like npm/eslint follow
|
|
10
|
+
* for their own caches.
|
|
11
|
+
* @returns {string}
|
|
12
|
+
*/
|
|
13
|
+
function systemDataRoot() {
|
|
14
|
+
if (process.platform === "darwin") {
|
|
15
|
+
return path.join(os.homedir(), "Library", "Application Support")
|
|
16
|
+
}
|
|
17
|
+
if (process.platform === "win32") {
|
|
18
|
+
return process.env.LOCALAPPDATA || path.join(os.homedir(), "AppData", "Local")
|
|
19
|
+
}
|
|
20
|
+
return process.env.XDG_DATA_HOME || path.join(os.homedir(), ".local", "share")
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Computes a per-project system directory, so Vowel doesn't write
|
|
25
|
+
* `.votive.db`, a buffer cache, or its build output into a project
|
|
26
|
+
* folder a non-developer end user might be confused by. Keyed by a hash
|
|
27
|
+
* of the resolved `sourceFolder` path, so two projects never collide
|
|
28
|
+
* without a manually-assigned project name.
|
|
29
|
+
*
|
|
30
|
+
* Vowel's own concern, not votive's: votive takes whatever
|
|
31
|
+
* `databasePath`/`cacheDirectory`/`targetFolder` a config gives it and
|
|
32
|
+
* falls back to project-relative defaults otherwise. (It lived in votive
|
|
33
|
+
* and was exported from there once; nothing in votive ever called it.)
|
|
34
|
+
* The `sourceFolder` must already be resolved - `resolveProjectFolder`
|
|
35
|
+
* from votive, whose realpath step is what keeps the same folder reached
|
|
36
|
+
* through a symlink from hashing to a second directory; config.js does
|
|
37
|
+
* the two in that order. The `votive` path segment is kept as it was so
|
|
38
|
+
* existing system directories stay where they are.
|
|
39
|
+
* @param {string} sourceFolder
|
|
40
|
+
* @returns {string}
|
|
41
|
+
*/
|
|
42
|
+
function systemDirectoryFor(sourceFolder) {
|
|
43
|
+
const key = createHash("sha1").update(path.resolve(sourceFolder)).digest("hex").slice(0, 16)
|
|
44
|
+
const root = systemDataRoot()
|
|
45
|
+
return path.join(root, "votive", key)
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export { systemDirectoryFor }
|
package/utils.js
CHANGED
|
@@ -66,15 +66,66 @@ export function toTitleCase(string) {
|
|
|
66
66
|
if (!string) return
|
|
67
67
|
return string.split(" ").map(word => {
|
|
68
68
|
const letters = word.split("")
|
|
69
|
-
letters[0] = letters[0]
|
|
69
|
+
letters[0] = letters[0]?.toUpperCase()
|
|
70
70
|
return letters.join("")
|
|
71
71
|
}).join(" ")
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
+
/**
|
|
75
|
+
* A tag page's markdown: a title and the glob directive that lists every
|
|
76
|
+
* page carrying the tag.
|
|
77
|
+
*
|
|
78
|
+
* Returns *markdown*, not hast. It used to return a parsed tree, because
|
|
79
|
+
* its caller stamped that straight onto a target it created. The tag page
|
|
80
|
+
* is a stub now, so this is the content of a source file and the ordinary
|
|
81
|
+
* markdown read parses it - which is what gives a tag page an inferred
|
|
82
|
+
* title, a routed prettyURL and a tracked listing without special cases.
|
|
83
|
+
*/
|
|
74
84
|
export function createHashtagPage(tag) {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
const hast = toHast(mdast)
|
|
85
|
+
return `# ${toTitleCase(tag)}\n\n/**?tag=${tag}`
|
|
86
|
+
}
|
|
78
87
|
|
|
79
|
-
|
|
88
|
+
/**
|
|
89
|
+
* Every listing in vowel goes through here rather than calling
|
|
90
|
+
* `api.targets()` directly. All five call sites - the tag pages, the
|
|
91
|
+
* breadcrumb family, glob expansions, the nav and the feed - are listing
|
|
92
|
+
* *pages*, which is what the name says and what the two filters mean
|
|
93
|
+
* together.
|
|
94
|
+
*
|
|
95
|
+
* **Virtual targets** (`write: false`) have no file on disk and therefore
|
|
96
|
+
* no URL to link to. Votive keeps them because a plugin may still want to
|
|
97
|
+
* read one back, and votive is right not to care why it is virtual - that
|
|
98
|
+
* is vowel's business. `html_file: false` is what produces them now; a
|
|
99
|
+
* secret page used to leave one at its public path as well, which is gone
|
|
100
|
+
* along with the rest of `secret_key`.
|
|
101
|
+
*
|
|
102
|
+
* **Hidden targets** are the replacement for that, and the filter that
|
|
103
|
+
* matters most: a page under a secret path segment is published at a
|
|
104
|
+
* hashed URL and must not appear in a listing, a menu, the sitemap or the
|
|
105
|
+
* feed. Listing one publishes the secret, which is the single thing the
|
|
106
|
+
* feature exists to prevent - so the check lives here, in the one
|
|
107
|
+
* function every listing goes through.
|
|
108
|
+
*
|
|
109
|
+
* **Non-HTML targets** are not pages either. Several reach a listing:
|
|
110
|
+
* every folder's `settings.md`, emitted as its own target so the
|
|
111
|
+
* settings panel can fetch it; and copy-through assets - fonts, images -
|
|
112
|
+
* which became visible once votive stopped hiding targets that had no
|
|
113
|
+
* abstract. None has a title, so each renders as an empty `<article>`.
|
|
114
|
+
*
|
|
115
|
+
* @param {{targets: (query: object) => any[]}} api
|
|
116
|
+
* @param {object} query
|
|
117
|
+
*/
|
|
118
|
+
export function listPages(api, query) {
|
|
119
|
+
return api.targets(query).filter(isListedPage)
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* listPages' rule on one target, for a caller that has a listing in
|
|
124
|
+
* hand already and wants the pages out of it without listing again.
|
|
125
|
+
* @param {any} target
|
|
126
|
+
*/
|
|
127
|
+
export function isListedPage(target) {
|
|
128
|
+
return target.write !== false
|
|
129
|
+
&& target.extension === ".html"
|
|
130
|
+
&& !target.metadata?.hidden
|
|
80
131
|
}
|