@compiiile/compiiile 2.2.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/.compiiile/public/favicon.png +0 -0
- package/.compiiile/src/app.js +5 -0
- package/.compiiile/src/components/ClientScript.vue +48 -0
- package/.compiiile/src/components/ContentWrapper.vue +288 -0
- package/.compiiile/src/components/SlidesContent.vue +56 -0
- package/.compiiile/src/components/TableOfContent.vue +65 -0
- package/.compiiile/src/components/layout/HamburgerButton.vue +90 -0
- package/.compiiile/src/components/layout/TopBar.vue +106 -0
- package/.compiiile/src/components/layout/navBar/FilesTree.vue +35 -0
- package/.compiiile/src/components/layout/navBar/NavBar.vue +48 -0
- package/.compiiile/src/components/layout/navBar/NavListItem.vue +216 -0
- package/.compiiile/src/components/searchBar/SearchBar.vue +371 -0
- package/.compiiile/src/components/searchBar/SearchResult.vue +98 -0
- package/.compiiile/src/env.d.ts +1 -0
- package/.compiiile/src/layouts/BaseLayout.astro +38 -0
- package/.compiiile/src/layouts/SlidesLayout.astro +12 -0
- package/.compiiile/src/layouts/WorkspaceLayout.astro +58 -0
- package/.compiiile/src/pages/404.astro +17 -0
- package/.compiiile/src/pages/[...path].astro +61 -0
- package/.compiiile/src/style/code-theme.scss +30 -0
- package/.compiiile/src/style/index.scss +36 -0
- package/.compiiile/src/style/layouts.scss +43 -0
- package/.compiiile/src/style/print.scss +80 -0
- package/.compiiile/src/style/slides.scss +79 -0
- package/.compiiile/src/style/texts.scss +92 -0
- package/.compiiile/src/style/variables.scss +47 -0
- package/.compiiile/src/utils/searchIndex.js +28 -0
- package/.compiiile/src/utils/styles.js +9 -0
- package/.eslintrc.cjs +15 -0
- package/.github/FUNDING.yml +2 -0
- package/.prettierignore +1 -0
- package/.prettierrc.json +9 -0
- package/CHANGELOG.md +25 -0
- package/CONTRIBUTING.md +31 -0
- package/LICENCE.md +674 -0
- package/README.md +273 -0
- package/bin/cli.js +5 -0
- package/bin/config.js +137 -0
- package/bin/vitePluginCompiiile/index.js +32 -0
- package/bin/vitePluginCompiiile/markdownConfig.js +30 -0
- package/bin/vitePluginCompiiile/models/Context.js +138 -0
- package/bin/vitePluginCompiiile/models/FileListItem.js +10 -0
- package/bin/vitePluginCompiiile/models/FilesTreeItem.js +8 -0
- package/bin/vitePluginCompiiile/models/RouteListItem.js +9 -0
- package/bin/vitePluginCompiiile/rehypeHandleYamlMatterPlugin.js +8 -0
- package/bin/vitePluginCompiiile/rehypeImagePlugin.js +51 -0
- package/bin/vitePluginCompiiile/rehypeLinkPlugin.js +20 -0
- package/build.js +16 -0
- package/compiiile.config.js +6 -0
- package/dist/style.css +1 -0
- package/markdown-preview.md +242 -0
- package/package.json +81 -0
- package/slides-preview.mdx +39 -0
- package/src/env.d.ts +1 -0
- package/tsconfig.json +6 -0
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Markdown preview
|
|
3
|
+
description: Here is how you can write some markdown and see how it will look on the page
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Markdown preview
|
|
7
|
+
|
|
8
|
+
> This test file serves as a cheatsheet and markdown preview. It is inspired by the one from the [markdown-here repository](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet).
|
|
9
|
+
|
|
10
|
+
:eyes: Here is how you can write some markdown and see how it will look on the page:
|
|
11
|
+
|
|
12
|
+
## Titles
|
|
13
|
+
|
|
14
|
+
```md
|
|
15
|
+
# H1
|
|
16
|
+
|
|
17
|
+
## H2
|
|
18
|
+
|
|
19
|
+
### H3
|
|
20
|
+
|
|
21
|
+
#### H4
|
|
22
|
+
|
|
23
|
+
##### H5
|
|
24
|
+
|
|
25
|
+
###### H6
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
# H1
|
|
29
|
+
|
|
30
|
+
## H2
|
|
31
|
+
|
|
32
|
+
### H3
|
|
33
|
+
|
|
34
|
+
#### H4
|
|
35
|
+
|
|
36
|
+
##### H5
|
|
37
|
+
|
|
38
|
+
###### H6
|
|
39
|
+
|
|
40
|
+
## Emphasis
|
|
41
|
+
|
|
42
|
+
```md
|
|
43
|
+
Emphasis, aka italics, with single asterisks or _underscores_.
|
|
44
|
+
|
|
45
|
+
Strong emphasis, aka bold, with **asterisks** or double underscores.
|
|
46
|
+
|
|
47
|
+
Combined emphasis with **asterisks and _underscores_**.
|
|
48
|
+
|
|
49
|
+
Strikethrough uses two tildes. ~~Scratch this.~~
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Emphasis, aka italics, with single asterisks or _underscores_.
|
|
53
|
+
|
|
54
|
+
Strong emphasis, aka bold, with **asterisks** or double underscores.
|
|
55
|
+
|
|
56
|
+
Combined emphasis with **asterisks and _underscores_**.
|
|
57
|
+
|
|
58
|
+
Strikethrough uses two tildes. ~~Scratch this.~~
|
|
59
|
+
|
|
60
|
+
## Lists
|
|
61
|
+
|
|
62
|
+
```md
|
|
63
|
+
1. First ordered list item
|
|
64
|
+
2. Another item
|
|
65
|
+
- Unordered sub-list.
|
|
66
|
+
3. Third item
|
|
67
|
+
1. Ordered sub-list
|
|
68
|
+
4. And another item.
|
|
69
|
+
|
|
70
|
+
You can have properly indented paragraphs within list items. Notice the blank line above, and the leading spaces (at least one, but we'll use three here to also align the raw Markdown).
|
|
71
|
+
|
|
72
|
+
To have a line break without a paragraph, you will need to use two trailing spaces.
|
|
73
|
+
Note that this line is separate, but within the same paragraph.
|
|
74
|
+
|
|
75
|
+
- Unordered list can use asterisks
|
|
76
|
+
|
|
77
|
+
* Or minuses
|
|
78
|
+
|
|
79
|
+
- Or pluses
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
1. First ordered list item
|
|
83
|
+
2. Another item
|
|
84
|
+
- Unordered sub-list.
|
|
85
|
+
3. Third item
|
|
86
|
+
1. Ordered sub-list
|
|
87
|
+
4. And another item.
|
|
88
|
+
|
|
89
|
+
You can have properly indented paragraphs within list items. Notice the blank line above, and the leading spaces (at least one, but we'll use three here to also align the raw Markdown).
|
|
90
|
+
|
|
91
|
+
To have a line break without a paragraph, you will need to use two trailing spaces.
|
|
92
|
+
Note that this line is separate, but within the same paragraph.
|
|
93
|
+
|
|
94
|
+
- Unordered list can use asterisks
|
|
95
|
+
|
|
96
|
+
* Or minuses
|
|
97
|
+
|
|
98
|
+
- Or pluses
|
|
99
|
+
|
|
100
|
+
## Links
|
|
101
|
+
|
|
102
|
+
```md
|
|
103
|
+
[I'm an inline-style link](https://github.com/AlbanCrepel/compiiile)
|
|
104
|
+
|
|
105
|
+
[I'm an inline-style link with title](https://github.com/AlbanCrepel/compiiile "Compiiile's Repository")
|
|
106
|
+
|
|
107
|
+
[I am a cross-reference link](./README.md)
|
|
108
|
+
|
|
109
|
+
[I am a cross-reference link pointing to an achor](./README.md#support)
|
|
110
|
+
|
|
111
|
+
URLs and URLs in angle brackets will automatically get turned into links.
|
|
112
|
+
https://github.com/AlbanCrepel/compiiile or <https://github.com/AlbanCrepel/compiiile>.
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
[I'm an inline-style link](https://github.com/AlbanCrepel/compiiile)
|
|
116
|
+
|
|
117
|
+
[I'm an inline-style link with title](https://github.com/AlbanCrepel/compiiile "Compiiile's Repository")
|
|
118
|
+
|
|
119
|
+
[I am a cross-reference link](./README.md)
|
|
120
|
+
|
|
121
|
+
[I am a cross-reference link pointing to an achor](./README.md#support)
|
|
122
|
+
|
|
123
|
+
URLs and URLs in angle brackets will automatically get turned into links.
|
|
124
|
+
https://github.com/AlbanCrepel/compiiile or <https://github.com/AlbanCrepel/compiiile>.
|
|
125
|
+
|
|
126
|
+
## Images
|
|
127
|
+
|
|
128
|
+
You can specify the title, alt text, and size of any image:
|
|
129
|
+
|
|
130
|
+
```md
|
|
131
|
+

|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+

|
|
135
|
+
|
|
136
|
+
## Code and syntax highlight
|
|
137
|
+
|
|
138
|
+
````
|
|
139
|
+
```javascript
|
|
140
|
+
var s = "JavaScript syntax highlighting";
|
|
141
|
+
alert(s);
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
```python
|
|
145
|
+
s = "Python syntax highlighting"
|
|
146
|
+
print s
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
```
|
|
150
|
+
No language indicated, so no syntax highlighting.
|
|
151
|
+
But let's throw in a <b>tag</b>.
|
|
152
|
+
```
|
|
153
|
+
````
|
|
154
|
+
|
|
155
|
+
```javascript
|
|
156
|
+
var s = "JavaScript syntax highlighting"
|
|
157
|
+
alert(s)
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
```python
|
|
161
|
+
s = "Python syntax highlighting"
|
|
162
|
+
print s
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
```
|
|
166
|
+
No language indicated, so no syntax highlighting.
|
|
167
|
+
But let's throw in a <b>tag</b>.
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
## Tables
|
|
171
|
+
|
|
172
|
+
```md
|
|
173
|
+
| First column | Second column |
|
|
174
|
+
| ------------ | ------------------ |
|
|
175
|
+
| Some content | Some other content |
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
| First column | Second column |
|
|
179
|
+
| ------------ | ------------------ |
|
|
180
|
+
| Some content | Some other content |
|
|
181
|
+
|
|
182
|
+
## Blockquotes
|
|
183
|
+
|
|
184
|
+
```md
|
|
185
|
+
> Blockquotes are very handy in email to emulate reply text.
|
|
186
|
+
> This line is part of the same quote.
|
|
187
|
+
|
|
188
|
+
Quote break.
|
|
189
|
+
|
|
190
|
+
> This is a very long line that will still be quoted properly when it wraps. Oh boy let's keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can _put_ **Markdown** into a blockquote.
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
> Blockquotes are very handy in email to emulate reply text.
|
|
194
|
+
> This line is part of the same quote.
|
|
195
|
+
|
|
196
|
+
Quote break.
|
|
197
|
+
|
|
198
|
+
> This is a very long line that will still be quoted properly when it wraps. Oh boy let's keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can _put_ **Markdown** into a blockquote.
|
|
199
|
+
|
|
200
|
+
## Emojis
|
|
201
|
+
|
|
202
|
+
```md
|
|
203
|
+
:ok_woman: :zap: :sparkles:
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
:ok_woman: :zap: :sparkles:
|
|
207
|
+
|
|
208
|
+
## Checkboxes
|
|
209
|
+
|
|
210
|
+
```md
|
|
211
|
+
- [ ] a todo item
|
|
212
|
+
- [x] I've done this one
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
- [ ] a todo item
|
|
216
|
+
- [x] I've done this one
|
|
217
|
+
|
|
218
|
+
## Inline HTML
|
|
219
|
+
|
|
220
|
+
```md
|
|
221
|
+
<ul>
|
|
222
|
+
<li>An html list item</li>
|
|
223
|
+
<li>A second list item</li>
|
|
224
|
+
</ul>
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
<ul>
|
|
228
|
+
<li>An html list item</li>
|
|
229
|
+
<li>A second list item</li>
|
|
230
|
+
</ul>
|
|
231
|
+
|
|
232
|
+
## Separators
|
|
233
|
+
|
|
234
|
+
```md
|
|
235
|
+
Three or more Hyphens
|
|
236
|
+
|
|
237
|
+
---
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
Three or more Hyphens
|
|
241
|
+
|
|
242
|
+
---
|
package/package.json
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@compiiile/compiiile",
|
|
3
|
+
"private": false,
|
|
4
|
+
"version": "2.2.0",
|
|
5
|
+
"description": "The most convenient way to render a folder containing markdown files. Previewing and searching markdown files has never been that easy.",
|
|
6
|
+
"author": "AlbanCrepel <alban.crepel@gmail.com>",
|
|
7
|
+
"license": "GPL-3.0-only",
|
|
8
|
+
"type": "module",
|
|
9
|
+
"bin": {
|
|
10
|
+
"compiiile": "bin/cli.js"
|
|
11
|
+
},
|
|
12
|
+
"scripts": {
|
|
13
|
+
"dev": "node ./bin/cli.js dev",
|
|
14
|
+
"build": "node ./bin/cli.js build && node ./build.js",
|
|
15
|
+
"preview": "node ./bin/cli.js preview",
|
|
16
|
+
"lint": "eslint --ext .js,.vue,.ts --ignore-path .gitignore --fix .compiiile bin",
|
|
17
|
+
"format": "prettier . --write"
|
|
18
|
+
},
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "git+https://github.com/AlbanCrepel/compiiile.git"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@astrojs/mdx": "^2.0.1",
|
|
25
|
+
"@astrojs/vue": "^4.0.4",
|
|
26
|
+
"@babel/core": "^7.0.0-0",
|
|
27
|
+
"@babel/eslint-parser": "^7.22.15",
|
|
28
|
+
"@fontsource-variable/archivo": "^5.0.16",
|
|
29
|
+
"@fontsource-variable/dm-sans": "^5.0.3",
|
|
30
|
+
"@fontsource-variable/jetbrains-mono": "^5.0.18",
|
|
31
|
+
"astro": "^4.0.6",
|
|
32
|
+
"astro-seo": "^0.8.0",
|
|
33
|
+
"eslint": "^8.51.0",
|
|
34
|
+
"eslint-config-prettier": "^9.0.0",
|
|
35
|
+
"eslint-plugin-vue": "^9.17.0",
|
|
36
|
+
"fzf": "^0.5.2",
|
|
37
|
+
"hastscript": "^8.0.0",
|
|
38
|
+
"mermaid": "^11.0.0-alpha.6",
|
|
39
|
+
"node-emoji": "^2.1.0",
|
|
40
|
+
"pkg-dir": "^7.0.0",
|
|
41
|
+
"prettier": "^3.0.3",
|
|
42
|
+
"rehype-autolink-headings": "^7.0.0",
|
|
43
|
+
"rehype-slug": "^6.0.0",
|
|
44
|
+
"remark-emoji": "^4.0.0",
|
|
45
|
+
"reveal.js": "^4.6.1",
|
|
46
|
+
"sass": "^1.66.1",
|
|
47
|
+
"slugify": "^1.6.6",
|
|
48
|
+
"uuid": "^9.0.1",
|
|
49
|
+
"vfile-matter": "^5.0.0",
|
|
50
|
+
"vite": "^5.0.10",
|
|
51
|
+
"vue": "^3.3.12",
|
|
52
|
+
"yargs": "^17.7.2",
|
|
53
|
+
"zod": "^3.22.3"
|
|
54
|
+
},
|
|
55
|
+
"keywords": [
|
|
56
|
+
"markdown",
|
|
57
|
+
"cli",
|
|
58
|
+
"preview",
|
|
59
|
+
"slides",
|
|
60
|
+
"vite",
|
|
61
|
+
"search",
|
|
62
|
+
"astro",
|
|
63
|
+
"mdx",
|
|
64
|
+
"compiiile"
|
|
65
|
+
],
|
|
66
|
+
"funding": [
|
|
67
|
+
{
|
|
68
|
+
"type": "github",
|
|
69
|
+
"url": "https://github.com/sponsors/AlbanCrepel"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"type": "ko-fi",
|
|
73
|
+
"url": "https://ko-fi.com/alban_crepel"
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
"bugs": {
|
|
77
|
+
"url": "https://github.com/compiiile/compiiile/issues"
|
|
78
|
+
},
|
|
79
|
+
"homepage": "https://github.com/compiiile/compiiile",
|
|
80
|
+
"main": "build.js"
|
|
81
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
asSlides: true
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# 👋 Here are some slides
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# It can contain some lists
|
|
10
|
+
|
|
11
|
+
- My first list item
|
|
12
|
+
- A second list item
|
|
13
|
+
- [Some link](https://github.com/AlbanCrepel/compiiile)
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## 📚 Expose your ideas
|
|
18
|
+
|
|
19
|
+
> 💡 Just use the language and framework you want in your developer course, and don't impose your ideas.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## How about some code ?
|
|
24
|
+
|
|
25
|
+
```javascript
|
|
26
|
+
console.log("I prefer using this than the actual debugger")
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
I forgot to showcase once again the poorly-designed logo of Compiiile:
|
|
32
|
+
|
|
33
|
+

|
|
34
|
+
|
|
35
|
+
(it's using a nice font though)
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
And that's it ! Happy markdowning :upside_down_face:
|
package/src/env.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/// <reference types="astro/client" />
|