vowel 0.0.2 → 0.1.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/.prettierrc +8 -0
- package/.vscode/settings.json +3 -0
- package/README.md +123 -27
- package/bin.js +30 -0
- package/content/.cache.json +627 -0
- package/content/.obsidian/app.json +3 -0
- package/content/.obsidian/appearance.json +3 -0
- package/content/.obsidian/core-plugins-migration.json +30 -0
- package/content/.obsidian/core-plugins.json +20 -0
- package/content/.obsidian/workspace.json +168 -0
- package/content/about.md +3 -0
- package/content/assets/open-props.css +1630 -0
- package/content/assets/styles-2.css +128 -0
- package/content/assets/styles-3.css +275 -0
- package/content/docs/file-structure.md +31 -0
- package/content/docs/folder-settings.md +22 -0
- package/content/docs/home.md +8 -0
- package/content/docs/images.md +10 -0
- package/content/docs/pages.md +64 -0
- package/content/docs/quickstart.md +52 -0
- package/content/docs/run-build-deploy.md +20 -0
- package/content/docs/settings.md +4 -0
- package/content/docs/styling.md +10 -0
- package/content/docs/taxonomies.md +37 -0
- package/content/home.md +73 -0
- package/content/roadmap.md +81 -0
- package/content/settings.md +12 -0
- package/content/vercel.json +5 -0
- package/jsconfig.json +18 -0
- package/package.json +37 -19
- package/server.js +80 -0
- package/src/app.d.ts +12 -0
- package/src/app.html +12 -0
- package/src/lib/components/Breadcrumbs.svelte +19 -0
- package/src/lib/components/DefaultStyles.svelte +126 -0
- package/src/lib/components/FrontMatterTaxonomy.svelte +48 -0
- package/src/lib/components/Frontmatter.svelte +54 -0
- package/src/lib/components/FrontmatterProperty.svelte +72 -0
- package/src/lib/components/Markdown/Image.svelte +48 -0
- package/src/lib/components/Markdown/Link.svelte +10 -0
- package/src/lib/components/Markdown/LinkPreview.svelte +39 -0
- package/src/lib/components/Markdown/Text.svelte +6 -0
- package/src/lib/components/Markdown/index.svelte +84 -0
- package/src/lib/components/Markdown/validators.js +29 -0
- package/src/lib/components/Nav.svelte +39 -0
- package/src/lib/components/Page.svelte +59 -0
- package/src/lib/components/Sitemap.svelte +38 -0
- package/src/lib/components/index.js +9 -0
- package/src/lib/index.js +1 -0
- package/src/lib/utilities/buildURL.js +18 -0
- package/src/lib/utilities/checkFileExists.js +16 -0
- package/src/lib/utilities/createFolderClass.js +4 -0
- package/src/lib/utilities/createPageClass.js +4 -0
- package/src/lib/utilities/getFileLabel.js +18 -0
- package/src/lib/utilities/getFolder.js +16 -0
- package/src/lib/utilities/getFolderLabel.js +8 -0
- package/src/lib/utilities/getPage.js +24 -0
- package/src/lib/utilities/getPagesByFolder.js +93 -0
- package/src/lib/utilities/index.js +20 -0
- package/src/lib/utilities/isActiveLink.js +12 -0
- package/src/lib/utilities/isObject.js +8 -0
- package/src/lib/utilities/loadCache.js +28 -0
- package/src/lib/utilities/mutateMarkdownAST.js +59 -0
- package/src/lib/utilities/mutateMarkdownFrontmatter.js +115 -0
- package/src/lib/utilities/parseDate.js +43 -0
- package/src/lib/utilities/processMarkdownFiles.js +212 -0
- package/src/lib/utilities/readMarkdownFile.js +134 -0
- package/src/lib/utilities/regexPatterns.js +12 -0
- package/src/lib/utilities/resolveHomeDirPath.js +5 -0
- package/src/lib/utilities/writeCache.js +14 -0
- package/src/routes/[...path]/+layout.server.js +71 -0
- package/src/routes/[...path]/+page.server.js +22 -0
- package/src/routes/[...path]/+page.svelte +125 -0
- package/src/routes/feed.xml/+server.js +120 -0
- package/src/routes/robots.txt/+server.js +54 -0
- package/src/routes/sitemap.xml/+server.js +68 -0
- package/static/favicon.png +0 -0
- package/static/styles.css +0 -0
- package/svelte.config.js +32 -0
- package/vercel.json +5 -0
- package/vite.config.js +72 -0
- package/index.js +0 -28
package/.prettierrc
ADDED
package/README.md
CHANGED
|
@@ -1,40 +1,136 @@
|
|
|
1
|
-
|
|
1
|
+
## MVP
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
- [x] Add all element types supported in Obsidian to markdown
|
|
4
|
+
- [x] Add rich link previews
|
|
5
|
+
- [x] Add RSS
|
|
6
|
+
- [x] Add robots.txt
|
|
7
|
+
- [x] AI
|
|
8
|
+
- [x] Search
|
|
9
|
+
- [x] Image
|
|
10
|
+
- [x] Typing
|
|
11
|
+
- [x] Add sitemap
|
|
12
|
+
- [x] Make taxonomies linkable in frontmatter (if a corresponding folder exists)
|
|
13
|
+
- [x] Add header metadata (meta tags)
|
|
14
|
+
- [x] CSS handling
|
|
15
|
+
- [x] Favicon handling
|
|
16
|
+
- [x] Docs
|
|
17
|
+
- [x] Build action
|
|
4
18
|
|
|
5
|
-
##
|
|
19
|
+
## V2
|
|
6
20
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
21
|
+
- [x] Fallback homepages
|
|
22
|
+
- [ ] Create post list element (`#tags/blue`, `@tags/blue`, `~tags/blue`)
|
|
23
|
+
- [x] Better favicon and styles handling
|
|
24
|
+
- [ ] Ignore README files
|
|
25
|
+
- [ ] Add more header metadata
|
|
26
|
+
- [ ] Define folder settings
|
|
27
|
+
- [ ] Title
|
|
28
|
+
- [ ] Breadrumb
|
|
29
|
+
- [x] Define special page properties
|
|
30
|
+
- [x] Title
|
|
31
|
+
- [x] Description
|
|
32
|
+
- [x] Meta image
|
|
33
|
+
- [x] Date
|
|
34
|
+
- [ ] Modified date
|
|
35
|
+
- [ ] Tags
|
|
36
|
+
- [ ] Author/Authors
|
|
37
|
+
- [ ] Make file names kebab-cased for URLs and links
|
|
38
|
+
- [ ] Add hidden routes (`$`)
|
|
39
|
+
- [ ] Image alt text
|
|
40
|
+
- [ ] Code highlighter
|
|
41
|
+
- [x] Deploy action (Vercel)
|
|
42
|
+
- [ ] Add anchor links for headings
|
|
43
|
+
- [ ] Post TOC
|
|
44
|
+
- [ ] GitHub-style notes
|
|
45
|
+
- [ ] Add in-browser search
|
|
46
|
+
- [x] Figure out how to stop components from remounting on every change
|
|
47
|
+
- [ ] Make RSS optional
|
|
48
|
+
- [ ] Pagination
|
|
49
|
+
- [ ] Demote headings global option
|
|
50
|
+
|
|
51
|
+
## Wish list
|
|
52
|
+
|
|
53
|
+
- [ ] Automatic file creation
|
|
54
|
+
- [ ] Image serving and optimization
|
|
55
|
+
- [ ] GUI
|
|
56
|
+
- [ ] More deploy actions
|
|
57
|
+
- [ ] Optional JSON interactivity (ratings, comments, SubPubHub)
|
|
58
|
+
- [ ] Redirects
|
|
59
|
+
- [ ] Advanced markdown
|
|
60
|
+
- [ ] Highlight
|
|
61
|
+
- [ ] Sanitize
|
|
62
|
+
- [ ] Tables
|
|
63
|
+
- [ ] Strike
|
|
64
|
+
- [ ] Task lists
|
|
65
|
+
- [ ] Footnotes
|
|
66
|
+
- [ ] Mermaid
|
|
67
|
+
- [ ] Math
|
|
68
|
+
- [ ] Wikilinks
|
|
69
|
+
|
|
70
|
+
## Ideas
|
|
71
|
+
|
|
72
|
+
https://github.com/arobase-che/remark-attr
|
|
73
|
+
https://github.com/wataru-chocola/remark-definition-list
|
|
74
|
+
https://github.com/FinnRG/remark-mentions
|
|
75
|
+
https://github.com/remarkjs/remark-toc
|
|
76
|
+
|
|
77
|
+
- Docusaurus
|
|
78
|
+
- MkDocs
|
|
79
|
+
- Coolify
|
|
80
|
+
- NodeGui
|
|
81
|
+
|
|
82
|
+
https://www.nngroup.com/articles/breadcrumb-navigation-useful/
|
|
83
|
+
https://www.nngroup.com/articles/url-as-ui/
|
|
10
84
|
|
|
11
|
-
|
|
85
|
+
CSS Frameworks:
|
|
12
86
|
|
|
13
|
-
|
|
14
|
-
|
|
87
|
+
- Open Props
|
|
88
|
+
- Pico
|
|
89
|
+
- Milligram
|
|
90
|
+
- Spectre
|
|
15
91
|
|
|
16
|
-
|
|
17
|
-
//=> ['a', 'e', 'i', 'o', 'u']
|
|
92
|
+
## Docs
|
|
18
93
|
|
|
19
|
-
|
|
20
|
-
isVowel('o');
|
|
21
|
-
//=> true
|
|
94
|
+
Welcome to Vowel! This project is under development.
|
|
22
95
|
|
|
23
|
-
|
|
24
|
-
includesVowel('rhythms');
|
|
25
|
-
//=> false
|
|
96
|
+
Vowel is a Really Simple Static Site Generator. Write Markdown files, and Vowel will generate a website for you. Eventually, you will also be able to write a `style.css` file to style your website. When complete, Vowel will generate:
|
|
26
97
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
98
|
+
- An RSS feed
|
|
99
|
+
- A sitemap
|
|
100
|
+
- Rich link previews (internal and external)
|
|
101
|
+
- Post lists
|
|
102
|
+
- Navigation
|
|
103
|
+
- Optimized images
|
|
104
|
+
- Metadata
|
|
105
|
+
- And more
|
|
30
106
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
107
|
+
Each file in Vowel is a page. Index pages are called `home.md`.
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
.
|
|
111
|
+
├── home.md
|
|
112
|
+
├── settings.md
|
|
113
|
+
├── about.md
|
|
114
|
+
└── posts/
|
|
115
|
+
├── home.md
|
|
116
|
+
├── red-car.md
|
|
117
|
+
├── blue-true.md
|
|
118
|
+
└── green-van.md
|
|
34
119
|
```
|
|
35
120
|
|
|
36
|
-
|
|
121
|
+
In the above project, `/home.md` is the website homepage. `about.md` is `/about`, `/posts/home.md` is the blog homepage, `/blog`, and `/posts/red-car.md` is a blog post, `/posts/red-car`.
|
|
122
|
+
|
|
123
|
+
Every folder must have an index page. That means that there are two ways to represent a page:
|
|
124
|
+
|
|
125
|
+
- `/example-page.md`
|
|
126
|
+
- `/example-page/home.md`
|
|
127
|
+
Both of the above will generate the `/example-page` URL. You cannot have both files.
|
|
128
|
+
|
|
129
|
+
At the root of a project, a `settings.md` file defines global configurations, like your site title. It can have the following properties:
|
|
130
|
+
|
|
131
|
+
- `title`: Website title
|
|
132
|
+
- `breadcrumb`: The root breadcrumb
|
|
133
|
+
|
|
134
|
+
Each folder can also have a `settings.md` file, with the following properties:
|
|
37
135
|
|
|
38
|
-
|
|
39
|
-
<a href="http://paco.sh"><img src="https://raw.githubusercontent.com/pacocoursey/pacocoursey.github.io/master/footer.png" height="300"></a>
|
|
40
|
-
</p>
|
|
136
|
+
- `breadcrumb`: The breadcrumb for the folder
|
package/bin.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { execSync, spawn } from 'child_process';
|
|
4
|
+
import path from 'node:path';
|
|
5
|
+
import url from 'node:url';
|
|
6
|
+
|
|
7
|
+
// Directory where the module is
|
|
8
|
+
const binURL = import.meta.url;
|
|
9
|
+
const binFilePath = url.fileURLToPath(binURL);
|
|
10
|
+
const binDirName = path.dirname(binFilePath);
|
|
11
|
+
|
|
12
|
+
// Directory where the command was called
|
|
13
|
+
const homeDir = process.cwd();
|
|
14
|
+
|
|
15
|
+
// Args: File to run, home directory,
|
|
16
|
+
const child = spawn('node', ['./server.js', homeDir, process.argv[2] === 'build'], {
|
|
17
|
+
cwd: binDirName
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
child.stdout.on('data', (data) => {
|
|
21
|
+
console.log(`${data}`);
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
child.stderr.on('data', (data) => {
|
|
25
|
+
console.error(`${data}`);
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
child.on('close', (code) => {
|
|
29
|
+
console.log(`child process exited with code ${code}`);
|
|
30
|
+
});
|