@compiiile/compiiile 2.7.5 → 2.8.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/.compiiile/src/components/layout/ThemeSwitcher.vue +1 -1
- package/.compiiile/src/components/layout/TopBar.vue +1 -1
- package/.compiiile/src/pages/robots.txt.js +14 -0
- package/.compiiile/src/utils/styles.js +2 -2
- package/{markdown-preview.md → 1-markdown-preview.md} +2 -2
- package/{slides-preview.mdx → 2-slides-preview.mdx} +4 -0
- package/3-pro-installation.md +108 -0
- package/4-pro-features.mdx +532 -0
- package/5-pro-slides.mdx +94 -0
- package/README.md +4 -3
- package/bin/config.js +9 -1
- package/package.json +6 -3
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const robotsTxt = `
|
|
2
|
+
User-agent: *
|
|
3
|
+
${JSON.parse(process.env.VITE_COMPIIILE_NO_INDEX) ? "Disallow: /" : "Allow: /"}
|
|
4
|
+
|
|
5
|
+
${import.meta.env.SITE ? `Sitemap: ${new URL("sitemap-index.xml", import.meta.env.SITE).href}` : ""}
|
|
6
|
+
`.trim()
|
|
7
|
+
|
|
8
|
+
export const GET = () => {
|
|
9
|
+
return new Response(robotsTxt, {
|
|
10
|
+
headers: {
|
|
11
|
+
"Content-Type": "text/plain; charset=utf-8"
|
|
12
|
+
}
|
|
13
|
+
})
|
|
14
|
+
}
|
|
@@ -2,8 +2,8 @@ import "../style/index.scss"
|
|
|
2
2
|
/* Importing global fonts */
|
|
3
3
|
import "@fontsource-variable/archivo/wdth.css"
|
|
4
4
|
import "@fontsource-variable/archivo/wdth-italic.css"
|
|
5
|
-
import "@fontsource-variable/dm-sans"
|
|
5
|
+
import "@fontsource-variable/dm-sans/index.css"
|
|
6
6
|
import "@fontsource-variable/dm-sans/wght-italic.css"
|
|
7
|
-
import "@fontsource-variable/jetbrains-mono"
|
|
7
|
+
import "@fontsource-variable/jetbrains-mono/index.css"
|
|
8
8
|
import "@fontsource-variable/jetbrains-mono/wght-italic.css"
|
|
9
9
|
/* -------------------- */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: Markdown preview
|
|
3
|
-
description: Here is how you can write some
|
|
2
|
+
title: "Markdown preview"
|
|
3
|
+
description: Here is how you can write some Markdown and see how it will look on the page thanks to Compiiile.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Markdown preview
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
+
title: "Slides preview"
|
|
3
|
+
description: "Compiiile allows you to create beautiful slides written in Markdown without any configuration."
|
|
2
4
|
asSlides: true
|
|
3
5
|
---
|
|
4
6
|
|
|
@@ -37,3 +39,5 @@ I forgot to showcase once again the poorly-designed logo of Compiiile:
|
|
|
37
39
|
---
|
|
38
40
|
|
|
39
41
|
And that's it ! Happy markdowning :upside_down_face:
|
|
42
|
+
|
|
43
|
+
[:arrow_right: Check what compiiile-pro has to offer](./3-pro-installation.md)
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "[PRO] Installation"
|
|
3
|
+
description: "Compiiile with some spice ! With the pro version, enhance your Markdown files, add diagrams, mindmaps, admonitions, and ready-made components and get your knowledge-base or course ready to be served in one simple command."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Compiiile-pro
|
|
7
|
+
|
|
8
|
+
Compiiile with some spice :cherries:! With the ***pro*** version, enhance your Markdown files, add diagrams, mindmaps, admonitions, and ready-made components and get your knowledge-base or course ready to be served in one simple command :sparkles:.
|
|
9
|
+
|
|
10
|
+
## Installation
|
|
11
|
+
|
|
12
|
+
You can install `compiiile-pro` either globally or per-project:
|
|
13
|
+
|
|
14
|
+
### Globally
|
|
15
|
+
|
|
16
|
+
Open a terminal and type one of these commands, whether using [npm](https://www.npmjs.com/) or [yarn](https://yarnpkg.com/) depending on which package manager you are using:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
yarn global add @compiiile/compiiile-pro # install globally with yarn
|
|
20
|
+
# or
|
|
21
|
+
npm install -g @compiiile/compiiile-pro # install globally with npm
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### Per-project
|
|
25
|
+
|
|
26
|
+
Open a terminal inside the folder containing your markdown files. Then, add `compiiile-pro` as a local command using yarn or npm:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
yarn add @compiiile/compiiile-pro # install as a project dependency with yarn
|
|
30
|
+
# or
|
|
31
|
+
npm install @compiiile/compiiile-pro # install as a project dependency with npm
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Usage
|
|
35
|
+
|
|
36
|
+
Once installed, 3 commands are available that act the same as the usual `compiiile` command:
|
|
37
|
+
- `compiiile-pro dev`
|
|
38
|
+
- `compiiile-pro build`
|
|
39
|
+
- `compiiile-pro preview`
|
|
40
|
+
|
|
41
|
+
## License
|
|
42
|
+
|
|
43
|
+
Compiiile-pro is free to try in development, but **you need a license to use it in production**. This is a personal **lifetime** license: buy once without any subscription, and enjoy it as long as you want! It also allows you to use compiiile for commercial projects.
|
|
44
|
+
|
|
45
|
+
<a style="background-color:var(--highlight-color);color:#f7fafc;display:block;text-align:center;border-radius:4px;text-decoration:none;padding:10px;" href="https://compiiile.lemonsqueezy.com/buy/1900be98-a8c2-4aa5-a06e-e0f5f26843b4" target="_blank">Purchase a license for compiiile-pro</a>
|
|
46
|
+
|
|
47
|
+
Once purchased, you will receive an email with your personal license key.
|
|
48
|
+
|
|
49
|
+
To use your license for the `build` command, you can use the next following ways (**from higher priority to lower priority**):
|
|
50
|
+
|
|
51
|
+
### Set it with environment variables
|
|
52
|
+
|
|
53
|
+
You have 2 environment variables that you can pass to the build command to use your licence: `COMPIIILE_PRO_LICENSE="<YOUR-LICENCE>"` and `COMPIIILE_PRO_EMAIL="<YOUR-EMAIL-USED-FOR-PURCHASE>"`.
|
|
54
|
+
|
|
55
|
+
Here is the complete command as example:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
COMPIIILE_PRO_LICENSE="XXXX-XXXX-XXXX-XXXX" COMPIIILE_PRO_EMAIL="john.doe@mail.com" compiiile-pro build
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Set it as build arguments
|
|
62
|
+
|
|
63
|
+
Similarly, you have 2 parameters that you can pass to the build command to use your licence: `--pro.license="<YOUR-LICENCE>"` and `--pro.email="<YOUR-EMAIL-USED-FOR-PURCHASE>"`.
|
|
64
|
+
|
|
65
|
+
Here is the complete command as example:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
compiiile-pro build --pro.license="XXXX-XXXX-XXXX-XXXX" --pro.email="john.doe@mail.com"
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Set it globally
|
|
72
|
+
|
|
73
|
+
To use the same license on multiple projects, you can create a `.compiiilerc` file at the root of your user folder (`~/.compiiilerc`).
|
|
74
|
+
|
|
75
|
+
Here is the content that you will have to specify:
|
|
76
|
+
|
|
77
|
+
You can use this one-line command to create this file (make sure to replace the values with the corresponding ones):
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
echo 'pro.license=<your-license-key>\npro.email=<your-email>' > ~/.compiiilerc
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Your file should contain these 2 parameters:
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
pro.license=<your-license-key>
|
|
87
|
+
pro.email=<your-email>
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Affiliate
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
You can become an affiliate and earn 20% on each sale by referring new customers (or should we say... *compiiilers ?*):
|
|
94
|
+
|
|
95
|
+
<a style="background-color:var(--highlight-color);color:#f7fafc;display:block;text-align:center;border-radius:4px;text-decoration:none;padding:10px;" href="https://compiiile.lemonsqueezy.com/affiliates" target="_blank">Become an affiliate</a>
|
|
96
|
+
|
|
97
|
+
## Added features
|
|
98
|
+
|
|
99
|
+
Here is a list of features that the pro version adds:
|
|
100
|
+
- add a button to copy code blocks and be able to specify the code block file name
|
|
101
|
+
- add admonitions (or alerts) with different semantic colors
|
|
102
|
+
- use any [Phosphor Icon](https://phosphoricons.com/) in your Markdown files or Vue components
|
|
103
|
+
- add [MermaidJs](https://mermaid.js.org/#/) integration to write diagrams in Markdown, without compromising on style
|
|
104
|
+
- add [Markmap](https://markmap.js.org/) integration to write mindmaps in Markdown from bullet-points lists
|
|
105
|
+
- add [d2](https://d2lang.com/) integration to write diagrams
|
|
106
|
+
- use ready-to-use components (for slides layouts, etc) in `mdx` files
|
|
107
|
+
|
|
108
|
+
See an overview of these features in the next page.
|
|
@@ -0,0 +1,532 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "[PRO] Features"
|
|
3
|
+
description: "Use icons, admonitions, mermaid diagrams, markmap mindmaps in Markdow thanks to compiiile-pro."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# compiiile-pro added features <Icon name="star" />
|
|
7
|
+
|
|
8
|
+
## Admonitions
|
|
9
|
+
|
|
10
|
+
> [!NOTE]
|
|
11
|
+
> A note to `highlight` information for users.
|
|
12
|
+
|
|
13
|
+
> [!NOTE] Some custom title
|
|
14
|
+
> A note to highlight information for users.
|
|
15
|
+
|
|
16
|
+
> [!NOTE] Custom title
|
|
17
|
+
>
|
|
18
|
+
> > [!NOTE] Custom title
|
|
19
|
+
> > Admonition-ception, yes that's possible!
|
|
20
|
+
|
|
21
|
+
> [!TIP]
|
|
22
|
+
> Optional information to `help` a user be more successful.
|
|
23
|
+
|
|
24
|
+
> [!IMPORTANT]
|
|
25
|
+
> Crucial information `necessary` for users to succeed.
|
|
26
|
+
|
|
27
|
+
> [!WARNING]
|
|
28
|
+
> Critical content demanding `immediate` user attention due to potential risks.
|
|
29
|
+
|
|
30
|
+
> [!CAUTION]
|
|
31
|
+
> `Negative` potential consequences of an action.
|
|
32
|
+
|
|
33
|
+
<details>
|
|
34
|
+
<summary>Display the source:</summary>
|
|
35
|
+
|
|
36
|
+
```md
|
|
37
|
+
> [!NOTE]
|
|
38
|
+
> A note to `highlight` information for users.
|
|
39
|
+
|
|
40
|
+
> [!NOTE] Some custom title
|
|
41
|
+
> A note to highlight information for users.
|
|
42
|
+
|
|
43
|
+
> [!NOTE] Custom title
|
|
44
|
+
>
|
|
45
|
+
> > [!NOTE] Custom title
|
|
46
|
+
> > Admonition-ception, yes that's possible!
|
|
47
|
+
|
|
48
|
+
> [!TIP]
|
|
49
|
+
> Optional information to `help` a user be more successful.
|
|
50
|
+
|
|
51
|
+
> [!IMPORTANT]
|
|
52
|
+
> Crucial information `necessary` for users to succeed.
|
|
53
|
+
|
|
54
|
+
> [!WARNING]
|
|
55
|
+
> Critical content demanding `immediate` user attention due to potential risks.
|
|
56
|
+
|
|
57
|
+
> [!CAUTION]
|
|
58
|
+
> `Negative` potential consequences of an action.
|
|
59
|
+
```
|
|
60
|
+
</details>
|
|
61
|
+
|
|
62
|
+
## Diagrams
|
|
63
|
+
|
|
64
|
+
```mermaid
|
|
65
|
+
graph TD
|
|
66
|
+
B( compiiile-pro ) -->|Is amazing! | C{ What does it do? }
|
|
67
|
+
C --> D[ Write diagrams in Markdown ]
|
|
68
|
+
C --> E[ Display mindmaps ]
|
|
69
|
+
C --> F[ Use a collection of components ]
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
<details>
|
|
73
|
+
<summary>Source</summary>
|
|
74
|
+
|
|
75
|
+
````md
|
|
76
|
+
```mermaid
|
|
77
|
+
graph TD
|
|
78
|
+
B( compiiile-pro ) -->|Is amazing! | C{ What does it do? }
|
|
79
|
+
C --> D[ Write diagrams in Markdown ]
|
|
80
|
+
C --> E[ Display mindmaps ]
|
|
81
|
+
C --> F[ Use a collection of components ]
|
|
82
|
+
```
|
|
83
|
+
````
|
|
84
|
+
</details>
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
```markmap
|
|
88
|
+
---
|
|
89
|
+
markmap:
|
|
90
|
+
width: 700px
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
- compiiile-pro
|
|
94
|
+
- diagrams
|
|
95
|
+
- mindmaps
|
|
96
|
+
- components
|
|
97
|
+
- icons
|
|
98
|
+
- layout
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
<details>
|
|
102
|
+
<summary>Source</summary>
|
|
103
|
+
|
|
104
|
+
````md
|
|
105
|
+
```markmap
|
|
106
|
+
---
|
|
107
|
+
markmap:
|
|
108
|
+
width: 700px
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
- compiiile-pro
|
|
112
|
+
- diagrams
|
|
113
|
+
- mindmaps
|
|
114
|
+
- components
|
|
115
|
+
- icons
|
|
116
|
+
- layout
|
|
117
|
+
```
|
|
118
|
+
````
|
|
119
|
+
</details>
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
```mermaid
|
|
124
|
+
gitGraph
|
|
125
|
+
commit id: "☝️ added README"
|
|
126
|
+
commit id: "feat - diagrams"
|
|
127
|
+
branch mindmaps
|
|
128
|
+
commit id: "feat - mindmaps"
|
|
129
|
+
checkout main
|
|
130
|
+
merge mindmaps
|
|
131
|
+
branch components
|
|
132
|
+
commit id: "feat - components"
|
|
133
|
+
checkout main
|
|
134
|
+
commit id: "📚 doc - project description"
|
|
135
|
+
merge components tag: "1.0.0"
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
<details>
|
|
139
|
+
<summary>Source</summary>
|
|
140
|
+
|
|
141
|
+
````md
|
|
142
|
+
```mermaid
|
|
143
|
+
gitGraph
|
|
144
|
+
commit id: "☝️ added README"
|
|
145
|
+
commit id: "feat - diagrams"
|
|
146
|
+
branch mindmaps
|
|
147
|
+
commit id: "feat - mindmaps"
|
|
148
|
+
checkout main
|
|
149
|
+
merge mindmaps
|
|
150
|
+
branch components
|
|
151
|
+
commit id: "feat - components"
|
|
152
|
+
checkout main
|
|
153
|
+
commit id: "📚 doc - project description"
|
|
154
|
+
merge components tag: "1.0.0"
|
|
155
|
+
```
|
|
156
|
+
````
|
|
157
|
+
</details>
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
```mermaid
|
|
162
|
+
sequenceDiagram
|
|
163
|
+
Client->>Server: GET /products
|
|
164
|
+
Server-->>Client: Return product list
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
<details>
|
|
168
|
+
<summary>Source</summary>
|
|
169
|
+
|
|
170
|
+
````md
|
|
171
|
+
```mermaid
|
|
172
|
+
sequenceDiagram
|
|
173
|
+
Client->>Server: GET /products
|
|
174
|
+
Server-->>Client: Return product list
|
|
175
|
+
```
|
|
176
|
+
````
|
|
177
|
+
</details>
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
```mermaid
|
|
182
|
+
classDiagram
|
|
183
|
+
class BankAccount
|
|
184
|
+
BankAccount : +String owner
|
|
185
|
+
BankAccount : +Bigdecimal balance
|
|
186
|
+
BankAccount : +deposit(amount)
|
|
187
|
+
BankAccount : +withdrawal(amount)
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
<details>
|
|
191
|
+
<summary>Source</summary>
|
|
192
|
+
|
|
193
|
+
````md
|
|
194
|
+
```mermaid
|
|
195
|
+
classDiagram
|
|
196
|
+
class BankAccount
|
|
197
|
+
BankAccount : +String owner
|
|
198
|
+
BankAccount : +Bigdecimal balance
|
|
199
|
+
BankAccount : +deposit(amount)
|
|
200
|
+
BankAccount : +withdrawal(amount)
|
|
201
|
+
```
|
|
202
|
+
````
|
|
203
|
+
</details>
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
```mermaid
|
|
208
|
+
stateDiagram-v2
|
|
209
|
+
[*] --> Still
|
|
210
|
+
Still --> [*]
|
|
211
|
+
|
|
212
|
+
Still --> Moving
|
|
213
|
+
Moving --> Still
|
|
214
|
+
Moving --> Crash
|
|
215
|
+
Crash --> [*]
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
<details>
|
|
219
|
+
<summary>Source</summary>
|
|
220
|
+
|
|
221
|
+
````md
|
|
222
|
+
```mermaid
|
|
223
|
+
stateDiagram-v2
|
|
224
|
+
[*] --> Still
|
|
225
|
+
Still --> [*]
|
|
226
|
+
|
|
227
|
+
Still --> Moving
|
|
228
|
+
Moving --> Still
|
|
229
|
+
Moving --> Crash
|
|
230
|
+
Crash --> [*]
|
|
231
|
+
```
|
|
232
|
+
````
|
|
233
|
+
</details>
|
|
234
|
+
|
|
235
|
+
---
|
|
236
|
+
|
|
237
|
+
```mermaid
|
|
238
|
+
erDiagram
|
|
239
|
+
CUSTOMER ||--o{ ORDER : places
|
|
240
|
+
ORDER ||--|{ LINE-ITEM : contains
|
|
241
|
+
CUSTOMER }|..|{ DELIVERY-ADDRESS : uses
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
<details>
|
|
245
|
+
<summary>Source</summary>
|
|
246
|
+
|
|
247
|
+
````md
|
|
248
|
+
```mermaid
|
|
249
|
+
erDiagram
|
|
250
|
+
CUSTOMER ||--o{ ORDER : places
|
|
251
|
+
ORDER ||--|{ LINE-ITEM : contains
|
|
252
|
+
CUSTOMER }|..|{ DELIVERY-ADDRESS : uses
|
|
253
|
+
```
|
|
254
|
+
````
|
|
255
|
+
</details>
|
|
256
|
+
|
|
257
|
+
---
|
|
258
|
+
|
|
259
|
+
```mermaid
|
|
260
|
+
gantt
|
|
261
|
+
title A Gantt Diagram
|
|
262
|
+
dateFormat YYYY-MM-DD
|
|
263
|
+
section Section
|
|
264
|
+
A task :a1, 2014-01-01, 30d
|
|
265
|
+
Another task :after a1, 20d
|
|
266
|
+
section Another
|
|
267
|
+
Task in Another :2014-01-12, 12d
|
|
268
|
+
another task :24d
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
<details>
|
|
272
|
+
<summary>Source</summary>
|
|
273
|
+
|
|
274
|
+
````md
|
|
275
|
+
```mermaid
|
|
276
|
+
gantt
|
|
277
|
+
title A Gantt Diagram
|
|
278
|
+
dateFormat YYYY-MM-DD
|
|
279
|
+
section Section
|
|
280
|
+
A task :a1, 2014-01-01, 30d
|
|
281
|
+
Another task :after a1, 20d
|
|
282
|
+
section Another
|
|
283
|
+
Task in Another :2014-01-12, 12d
|
|
284
|
+
another task :24d
|
|
285
|
+
```
|
|
286
|
+
````
|
|
287
|
+
</details>
|
|
288
|
+
|
|
289
|
+
---
|
|
290
|
+
|
|
291
|
+
```mermaid
|
|
292
|
+
pie title Pets adopted by volunteers
|
|
293
|
+
"Dogs" : 386
|
|
294
|
+
"Cats" : 85
|
|
295
|
+
"Rats" : 15
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
<details>
|
|
299
|
+
<summary>Source</summary>
|
|
300
|
+
|
|
301
|
+
````md
|
|
302
|
+
```mermaid
|
|
303
|
+
pie title Pets adopted by volunteers
|
|
304
|
+
"Dogs" : 386
|
|
305
|
+
"Cats" : 85
|
|
306
|
+
"Rats" : 15
|
|
307
|
+
```
|
|
308
|
+
````
|
|
309
|
+
</details>
|
|
310
|
+
|
|
311
|
+
---
|
|
312
|
+
|
|
313
|
+
```mermaid
|
|
314
|
+
quadrantChart
|
|
315
|
+
title Reach and engagement of campaigns
|
|
316
|
+
x-axis Low Reach --> High Reach
|
|
317
|
+
y-axis Low Engagement --> High Engagement
|
|
318
|
+
quadrant-1 We should expand
|
|
319
|
+
quadrant-2 Need to promote
|
|
320
|
+
quadrant-3 Re-evaluate
|
|
321
|
+
quadrant-4 May be improved
|
|
322
|
+
Campaign A: [0.3, 0.6]
|
|
323
|
+
Campaign B: [0.45, 0.23]
|
|
324
|
+
Campaign C: [0.57, 0.69]
|
|
325
|
+
Campaign D: [0.78, 0.34]
|
|
326
|
+
Campaign E: [0.40, 0.34]
|
|
327
|
+
Campaign F: [0.35, 0.78]
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
<details>
|
|
331
|
+
<summary>Source</summary>
|
|
332
|
+
|
|
333
|
+
````md
|
|
334
|
+
```mermaid
|
|
335
|
+
quadrantChart
|
|
336
|
+
title Reach and engagement of campaigns
|
|
337
|
+
x-axis Low Reach --> High Reach
|
|
338
|
+
y-axis Low Engagement --> High Engagement
|
|
339
|
+
quadrant-1 We should expand
|
|
340
|
+
quadrant-2 Need to promote
|
|
341
|
+
quadrant-3 Re-evaluate
|
|
342
|
+
quadrant-4 May be improved
|
|
343
|
+
Campaign A: [0.3, 0.6]
|
|
344
|
+
Campaign B: [0.45, 0.23]
|
|
345
|
+
Campaign C: [0.57, 0.69]
|
|
346
|
+
Campaign D: [0.78, 0.34]
|
|
347
|
+
Campaign E: [0.40, 0.34]
|
|
348
|
+
Campaign F: [0.35, 0.78]
|
|
349
|
+
```
|
|
350
|
+
````
|
|
351
|
+
</details>
|
|
352
|
+
|
|
353
|
+
---
|
|
354
|
+
|
|
355
|
+
```mermaid
|
|
356
|
+
xychart-beta
|
|
357
|
+
title "Sales Revenue"
|
|
358
|
+
x-axis [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
|
|
359
|
+
y-axis "Revenue (in $)" 4000 --> 11000
|
|
360
|
+
bar [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000]
|
|
361
|
+
line [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000]
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
<details>
|
|
365
|
+
<summary>Source</summary>
|
|
366
|
+
|
|
367
|
+
````md
|
|
368
|
+
```mermaid
|
|
369
|
+
xychart-beta
|
|
370
|
+
title "Sales Revenue"
|
|
371
|
+
x-axis [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
|
|
372
|
+
y-axis "Revenue (in $)" 4000 --> 11000
|
|
373
|
+
bar [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000]
|
|
374
|
+
line [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000]
|
|
375
|
+
```
|
|
376
|
+
````
|
|
377
|
+
</details>
|
|
378
|
+
|
|
379
|
+
---
|
|
380
|
+
|
|
381
|
+
```mermaid
|
|
382
|
+
timeline
|
|
383
|
+
title History of Social Media Platform
|
|
384
|
+
2002 : LinkedIn
|
|
385
|
+
2004 : Facebook
|
|
386
|
+
: Google
|
|
387
|
+
2005 : Youtube
|
|
388
|
+
2006 : Twitter
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
<details>
|
|
392
|
+
<summary>Source</summary>
|
|
393
|
+
|
|
394
|
+
````md
|
|
395
|
+
```mermaid
|
|
396
|
+
timeline
|
|
397
|
+
title History of Social Media Platform
|
|
398
|
+
2002 : LinkedIn
|
|
399
|
+
2004 : Facebook
|
|
400
|
+
: Google
|
|
401
|
+
2005 : Youtube
|
|
402
|
+
2006 : Twitter
|
|
403
|
+
```
|
|
404
|
+
````
|
|
405
|
+
</details>
|
|
406
|
+
|
|
407
|
+
---
|
|
408
|
+
|
|
409
|
+
```d2
|
|
410
|
+
direction: right
|
|
411
|
+
|
|
412
|
+
costumes: {
|
|
413
|
+
shape: sql_table
|
|
414
|
+
id: int {constraint: primary_key}
|
|
415
|
+
silliness: int
|
|
416
|
+
monster: int
|
|
417
|
+
last_updated: timestamp
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
monsters: {
|
|
421
|
+
shape: sql_table
|
|
422
|
+
id: int {constraint: primary_key}
|
|
423
|
+
movie: string
|
|
424
|
+
weight: int
|
|
425
|
+
last_updated: timestamp
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
costumes.monster -> monsters.id
|
|
429
|
+
costumes.style.border-radius: 4
|
|
430
|
+
monsters.style.border-radius: 4
|
|
431
|
+
|
|
432
|
+
style: {
|
|
433
|
+
fill: "#eeeeee"
|
|
434
|
+
}
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
<details>
|
|
438
|
+
<summary>Source</summary>
|
|
439
|
+
|
|
440
|
+
````md
|
|
441
|
+
```d2
|
|
442
|
+
direction: right
|
|
443
|
+
|
|
444
|
+
costumes: {
|
|
445
|
+
shape: sql_table
|
|
446
|
+
id: int {constraint: primary_key}
|
|
447
|
+
silliness: int
|
|
448
|
+
monster: int
|
|
449
|
+
last_updated: timestamp
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
monsters: {
|
|
453
|
+
shape: sql_table
|
|
454
|
+
id: int {constraint: primary_key}
|
|
455
|
+
movie: string
|
|
456
|
+
weight: int
|
|
457
|
+
last_updated: timestamp
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
costumes.monster -> monsters.id
|
|
461
|
+
costumes.style.border-radius: 4
|
|
462
|
+
monsters.style.border-radius: 4
|
|
463
|
+
|
|
464
|
+
style: {
|
|
465
|
+
fill: "#eeeeee"
|
|
466
|
+
}
|
|
467
|
+
```
|
|
468
|
+
````
|
|
469
|
+
</details>
|
|
470
|
+
|
|
471
|
+
## Code blocks
|
|
472
|
+
|
|
473
|
+
Code block all have a copy content button with the pro version. The file type will be displayed, and you can also display a custom filename:
|
|
474
|
+
|
|
475
|
+
```bash filename="script.sh"
|
|
476
|
+
yarn dev
|
|
477
|
+
```
|
|
478
|
+
|
|
479
|
+
```bash
|
|
480
|
+
yarn add @compiiile/compiiile-pro
|
|
481
|
+
```
|
|
482
|
+
|
|
483
|
+
````mdx
|
|
484
|
+
```bash filename="script.sh"
|
|
485
|
+
yarn dev
|
|
486
|
+
```
|
|
487
|
+
|
|
488
|
+
```bash
|
|
489
|
+
yarn add @compiiile/compiiile-pro
|
|
490
|
+
```
|
|
491
|
+
````
|
|
492
|
+
|
|
493
|
+
## Components
|
|
494
|
+
|
|
495
|
+
Components are usable in `mdx` files without importing them.
|
|
496
|
+
|
|
497
|
+
### Icon
|
|
498
|
+
|
|
499
|
+
The `Icon` component is used to display an icon from the PhosphorIcons library. The icon name has to be passed in the `name` prop.
|
|
500
|
+
|
|
501
|
+
> Some blockquote with an icon <Icon name="github-logo" />
|
|
502
|
+
|
|
503
|
+
```mdx
|
|
504
|
+
> Some blockquote with an icon <Icon name="github-logo" />
|
|
505
|
+
```
|
|
506
|
+
|
|
507
|
+
You can also use icons in regular Markdown files (not `mdx`) by using the `i` tag with appropriate classes: `<i class="ph ph-smiley"></i>`
|
|
508
|
+
|
|
509
|
+
In Vue components, you can use the following syntax to dynamically import the icon you want: `<i-ph-user />`
|
|
510
|
+
|
|
511
|
+
### CGrid
|
|
512
|
+
|
|
513
|
+
The `CGrid` component allows you to use a grid layout (very useful for slides):
|
|
514
|
+
|
|
515
|
+
```mdx
|
|
516
|
+
<CGrid template="2 1" align="center">
|
|
517
|
+
<div>
|
|
518
|
+
# Title
|
|
519
|
+
|
|
520
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. From [xodnnhm](https://giphy.com/xodnnhm).
|
|
521
|
+
</div>
|
|
522
|
+
|
|
523
|
+

|
|
524
|
+
|
|
525
|
+
</CGrid>
|
|
526
|
+
```
|
|
527
|
+
|
|
528
|
+
- The `template` prop works just like the `grid-template-columns` CSS property, you can omit the `fr` unit, it will be processed automatically.
|
|
529
|
+
- `template="1 1"` will make 2 columns of equal width
|
|
530
|
+
- `template="2 1"` will make 2 columns with the first one using 2/3 width
|
|
531
|
+
- You can vertically align items with the `align` prop, working like the `align-items` CSS property.
|
|
532
|
+
|
package/5-pro-slides.mdx
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
asSlides: true
|
|
3
|
+
title: "[PRO] Slides"
|
|
4
|
+
description: "Use icons, admonitions, mermaid diagrams, markmap mindmaps in Markdow thanks to compiiile-pro."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## compiiile-pro<br/>with slides :sparkles:
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
<CGrid template="1 1" align="center">
|
|
12
|
+
<div>
|
|
13
|
+
## Admonitions<br/>& grids
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
<div>
|
|
17
|
+
> [!TIP] Admonitions
|
|
18
|
+
> As it works with regular content, it works on slides too! <Icon name="confetti" />
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
</CGrid>
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
<CGrid template="2 1" align="center">
|
|
26
|
+
<div>
|
|
27
|
+
# Title
|
|
28
|
+
|
|
29
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. From [xodnnhm](https://giphy.com/xodnnhm).
|
|
30
|
+
</div>
|
|
31
|
+
|
|
32
|
+

|
|
33
|
+
|
|
34
|
+
</CGrid>
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
<CGrid template="2 1" align="center">
|
|
39
|
+

|
|
40
|
+
|
|
41
|
+
<div>
|
|
42
|
+
# Title
|
|
43
|
+
|
|
44
|
+
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. From [xodnnhm](https://giphy.com/xodnnhm).
|
|
45
|
+
</div>
|
|
46
|
+
</CGrid>
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Mindmaps
|
|
51
|
+
|
|
52
|
+
```markmap
|
|
53
|
+
- compiiile-pro
|
|
54
|
+
- diagrams
|
|
55
|
+
- mindmaps
|
|
56
|
+
- components
|
|
57
|
+
- icons
|
|
58
|
+
- layout
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
```mermaid
|
|
64
|
+
gitGraph
|
|
65
|
+
commit id: "☝️ added README"
|
|
66
|
+
commit id: "feat - diagrams"
|
|
67
|
+
branch mindmaps
|
|
68
|
+
commit id: "feat - mindmaps"
|
|
69
|
+
checkout main
|
|
70
|
+
merge mindmaps
|
|
71
|
+
branch components
|
|
72
|
+
commit id: "feat - components"
|
|
73
|
+
checkout main
|
|
74
|
+
commit id: "📚 doc - project description"
|
|
75
|
+
merge components tag: "1.0.0"
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
Code blocks can be copied too:
|
|
81
|
+
|
|
82
|
+
```bash filename="script.sh"
|
|
83
|
+
yarn dev
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
yarn add @compiiile/compiiile-pro
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Enjoy :heart:
|
|
93
|
+
|
|
94
|
+
[:arrow_right: Check the Changelog](./CHANGELOG.md)
|
package/README.md
CHANGED
|
@@ -100,9 +100,9 @@ Et voilà, you should be able to preview your files in your browser :tada:.
|
|
|
100
100
|
|
|
101
101
|
Once installed, 3 commands are available to see your beautiful markdown files :eyes::
|
|
102
102
|
|
|
103
|
-
- `compiiile dev
|
|
104
|
-
- `compiiile build
|
|
105
|
-
- `compiiile preview
|
|
103
|
+
- `compiiile dev`: creates a web server to check your markdown files (alias to only `compiiile`)
|
|
104
|
+
- `compiiile build`: builds all the files for you to serve them production-ready
|
|
105
|
+
- `compiiile preview`: preview your production-ready build
|
|
106
106
|
|
|
107
107
|
You can run the command you want in your terminal while being in the desired folder.
|
|
108
108
|
|
|
@@ -186,6 +186,7 @@ Here is the list of parameters that you can set to customize Compiiile (none are
|
|
|
186
186
|
| `data` | `Object` | An object with data to use in MDX files (check use case below) |
|
|
187
187
|
| `theme` | `string` | The website theme, value can be : `auto` (default value: adapts to system preferences) \| `light` \| `dark` |
|
|
188
188
|
| `useAutoTitles` | `Boolean` | If set to `true`, use the first file heading as title to be displayed in the navbar and for SEO. Defaults to `false` |
|
|
189
|
+
| `noIndex` | `Boolean` | If set to `true`, the `robots.txt` file will disallow all routes, preventing indexation. Defaults to `false` |
|
|
189
190
|
| `vite.server.fs.allow` | `string[]` | Add local paths to vite's server fs allow list |
|
|
190
191
|
|
|
191
192
|
You can use these parameters in 2 ways:
|
package/bin/config.js
CHANGED
|
@@ -8,6 +8,7 @@ import { copyFileSync, cpSync } from "node:fs"
|
|
|
8
8
|
import markdownConfig from "./vitePluginCompiiile/markdownConfig.js"
|
|
9
9
|
import resolvePackagePath from "resolve-package-path"
|
|
10
10
|
import requireg from "requireg"
|
|
11
|
+
import sitemap from "@astrojs/sitemap"
|
|
11
12
|
|
|
12
13
|
const source = process.cwd()
|
|
13
14
|
process.env.COMPIIILE_SOURCE = source
|
|
@@ -46,6 +47,7 @@ const argv = yargs(hideBin(process.argv))
|
|
|
46
47
|
.version(packageJSON.version).argv
|
|
47
48
|
|
|
48
49
|
process.env.VITE_COMPIIILE_SITE_URL = argv.siteUrl ?? ""
|
|
50
|
+
process.env.VITE_COMPIIILE_NO_INDEX = /true/i.test(argv.noIndex) // defaults to `false` if not set or not equal to `true`
|
|
49
51
|
|
|
50
52
|
process.env.VITE_COMPIIILE_TITLE = argv.title ?? ""
|
|
51
53
|
process.env.VITE_COMPIIILE_DESCRIPTION = argv.description ?? ""
|
|
@@ -96,7 +98,13 @@ const astroConfig = {
|
|
|
96
98
|
srcDir: new URL("../.compiiile/src", import.meta.url).pathname,
|
|
97
99
|
outDir: path.join(source, argv.dest || ".compiiile/dist"),
|
|
98
100
|
...(argv.logo ? { publicDir } : {}),
|
|
99
|
-
integrations: [
|
|
101
|
+
integrations: [
|
|
102
|
+
vue({ appEntrypoint: "/src/app.js" }),
|
|
103
|
+
...(configFromFile.integrations ?? []),
|
|
104
|
+
mdx(),
|
|
105
|
+
...(process.env.VITE_COMPIIILE_SITE_URL ? [sitemap()] : [])
|
|
106
|
+
],
|
|
107
|
+
...(process.env.VITE_COMPIIILE_SITE_URL ? { site: process.env.VITE_COMPIIILE_SITE_URL } : {}),
|
|
100
108
|
vite: {
|
|
101
109
|
plugins: [compiiile()],
|
|
102
110
|
resolve: {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@compiiile/compiiile",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.8.2",
|
|
5
5
|
"description": "The most convenient way to render a folder containing markdown files. Previewing and searching markdown files has never been that easy.",
|
|
6
6
|
"author": "AlbanCrepel <alban.crepel@gmail.com>",
|
|
7
7
|
"license": "GPL-3.0-only",
|
|
@@ -11,10 +11,11 @@
|
|
|
11
11
|
},
|
|
12
12
|
"scripts": {
|
|
13
13
|
"dev": "node ./bin/cli.js dev",
|
|
14
|
-
"build": "
|
|
14
|
+
"build": "compiiile-pro build && node ./build.js",
|
|
15
15
|
"preview": "node ./bin/cli.js preview",
|
|
16
16
|
"lint": "eslint --ext .js,.vue,.ts --ignore-path .gitignore --fix .compiiile bin",
|
|
17
|
-
"format": "prettier . --write"
|
|
17
|
+
"format": "prettier . --write",
|
|
18
|
+
"dev-pro": "compiiile-pro dev"
|
|
18
19
|
},
|
|
19
20
|
"repository": {
|
|
20
21
|
"type": "git",
|
|
@@ -22,9 +23,11 @@
|
|
|
22
23
|
},
|
|
23
24
|
"dependencies": {
|
|
24
25
|
"@astrojs/mdx": "^2.1.1",
|
|
26
|
+
"@astrojs/sitemap": "^3.1.1",
|
|
25
27
|
"@astrojs/vue": "^4.0.8",
|
|
26
28
|
"@babel/core": "^7.0.0-0",
|
|
27
29
|
"@babel/eslint-parser": "^7.22.15",
|
|
30
|
+
"@compiiile/compiiile-pro": "^1.0.3",
|
|
28
31
|
"@fontsource-variable/archivo": "^5.0.16",
|
|
29
32
|
"@fontsource-variable/dm-sans": "^5.0.3",
|
|
30
33
|
"@fontsource-variable/jetbrains-mono": "^5.0.18",
|