@compiiile/compiiile 2.15.0 → 2.16.1
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/components.d.ts +23 -0
- package/.compiiile/src/style/index.css +1 -1
- package/.compiiile/src/style/slides.css +2 -2
- package/.compiiile/src/style/texts.css +6 -1
- package/.compiiile/src/style/variables.css +2 -0
- package/4-pro-features.mdx +45 -1
- package/6-deploy.mdx +42 -0
- package/README.md +3 -1
- package/bin/config.js +11 -0
- package/package.json +7 -6
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
// Generated by unplugin-vue-components
|
|
4
|
+
// Read more: https://github.com/vuejs/core/pull/3399
|
|
5
|
+
export {}
|
|
6
|
+
|
|
7
|
+
/* prettier-ignore */
|
|
8
|
+
declare module 'vue' {
|
|
9
|
+
export interface GlobalComponents {
|
|
10
|
+
ClientScript: typeof import('./src/components/ClientScript.vue')['default']
|
|
11
|
+
ContentWrapper: typeof import('./src/components/ContentWrapper.vue')['default']
|
|
12
|
+
FilesTree: typeof import('./src/components/layout/navBar/FilesTree.vue')['default']
|
|
13
|
+
HamburgerButton: typeof import('./src/components/layout/HamburgerButton.vue')['default']
|
|
14
|
+
NavBar: typeof import('./src/components/layout/navBar/NavBar.vue')['default']
|
|
15
|
+
NavListItem: typeof import('./src/components/layout/navBar/NavListItem.vue')['default']
|
|
16
|
+
SearchBar: typeof import('./src/components/searchBar/SearchBar.vue')['default']
|
|
17
|
+
SearchResult: typeof import('./src/components/searchBar/SearchResult.vue')['default']
|
|
18
|
+
SlidesContent: typeof import('./src/components/SlidesContent.vue')['default']
|
|
19
|
+
TableOfContent: typeof import('./src/components/TableOfContent.vue')['default']
|
|
20
|
+
ThemeSwitcher: typeof import('./src/components/layout/ThemeSwitcher.vue')['default']
|
|
21
|
+
TopBar: typeof import('./src/components/layout/TopBar.vue')['default']
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
.reveal {
|
|
10
10
|
height: 100vh;
|
|
11
11
|
width: 100vw;
|
|
12
|
-
font-family:
|
|
12
|
+
font-family: var(--default-font) !important;
|
|
13
13
|
|
|
14
14
|
.slides {
|
|
15
15
|
text-align: inherit;
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
h4,
|
|
40
40
|
h5,
|
|
41
41
|
h6 {
|
|
42
|
-
font-family:
|
|
42
|
+
font-family: var(--heading-font);
|
|
43
43
|
font-variation-settings:
|
|
44
44
|
"wght" 900,
|
|
45
45
|
"wdth" 125;
|
|
@@ -3,7 +3,7 @@ h2,
|
|
|
3
3
|
h3,
|
|
4
4
|
h4,
|
|
5
5
|
h5 {
|
|
6
|
-
font-family:
|
|
6
|
+
font-family: var(--heading-font);
|
|
7
7
|
margin: 3rem 0 1.38rem;
|
|
8
8
|
line-height: 1;
|
|
9
9
|
font-variation-settings: "wght" 900;
|
|
@@ -87,3 +87,8 @@ body {
|
|
|
87
87
|
.hidden {
|
|
88
88
|
visibility: hidden;
|
|
89
89
|
}
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
details summary {
|
|
93
|
+
cursor: pointer;
|
|
94
|
+
}
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
--ease-in-out-quart: cubic-bezier(0.77, 0, 0.175, 1);
|
|
9
9
|
--monospace: "JetBrains Mono Variable", monospace;
|
|
10
10
|
--r-code-font: "JetBrains Mono Variable", monospace;
|
|
11
|
+
--heading-font: "Archivo Variable", sans-serif;
|
|
12
|
+
--default-font: "DM Sans Variable", sans-serif;
|
|
11
13
|
|
|
12
14
|
/* Dark theme by default */
|
|
13
15
|
--layout-background-color: #1b1b1f;
|
package/4-pro-features.mdx
CHANGED
|
@@ -5,6 +5,30 @@ description: "Use icons, admonitions, mermaid diagrams, markmap mindmaps in Mark
|
|
|
5
5
|
|
|
6
6
|
# compiiile-pro added features <Icon name="star" />
|
|
7
7
|
|
|
8
|
+
## Customize style by providing your own CSS file
|
|
9
|
+
|
|
10
|
+
You can customize every bit of the UI with your own style by passing a `css` param with the relative path to your css file :
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
compiiile-pro dev --css="./custom.css"
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Here is an example of a CSS file content to set some colors and the default font:
|
|
17
|
+
|
|
18
|
+
```css
|
|
19
|
+
@import url(https://fonts.bunny.net/css?family=inter:200i,400,400i,900);
|
|
20
|
+
|
|
21
|
+
:root {
|
|
22
|
+
--layout-background-color: #0000FF;
|
|
23
|
+
--darker-background-color: #00FF00;
|
|
24
|
+
--default-font: 'Inter', sans-serif;
|
|
25
|
+
}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
:nail_care: The list of global CSS variables can be found here : https://github.com/compiiile/compiiile/blob/master/.compiiile/src/style/variables.css
|
|
29
|
+
|
|
30
|
+
:rainbow: You can also just target CSS classes and tweak them the way you want.
|
|
31
|
+
|
|
8
32
|
## Admonitions
|
|
9
33
|
|
|
10
34
|
> [!NOTE]
|
|
@@ -572,7 +596,7 @@ The `CCard` component can be used as a traditional card or a link.
|
|
|
572
596
|
<details>
|
|
573
597
|
<summary>Source</summary>
|
|
574
598
|
|
|
575
|
-
````
|
|
599
|
+
````mdx
|
|
576
600
|
<CGrid gap="20px" template="1 1">
|
|
577
601
|
<CCard hintText="Go to the specific page">
|
|
578
602
|
[Check compiiile-pro installation](./3-pro-installation.md)
|
|
@@ -590,3 +614,23 @@ The `CCard` component can be used as a traditional card or a link.
|
|
|
590
614
|
````
|
|
591
615
|
|
|
592
616
|
</details>
|
|
617
|
+
|
|
618
|
+
### CDetails
|
|
619
|
+
|
|
620
|
+
The `CDetails` component allows you to hide a block and reveal it by clicking on an arrow, just like the `details` HTML tag.
|
|
621
|
+
|
|
622
|
+
- The title can be set via a `summary` prop or a `summary` slot
|
|
623
|
+
|
|
624
|
+
<CDetails summary="Example">
|
|
625
|
+
> [!TIP]
|
|
626
|
+
> This is lit! :sparkles:
|
|
627
|
+
</CDetails>
|
|
628
|
+
|
|
629
|
+
<CDetails summary="Source">
|
|
630
|
+
```mdx
|
|
631
|
+
<CDetails summary="Example">
|
|
632
|
+
> [!TIP]
|
|
633
|
+
> This is lit! :sparkles:
|
|
634
|
+
</CDetails>
|
|
635
|
+
```
|
|
636
|
+
</CDetails>
|
package/6-deploy.mdx
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Deploy"
|
|
3
|
+
description: "Deploy a Compiiile project and self-host or put it online via a provider like Vercel, making your knowledge-base accessible on the web."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Deploy Compiiile :rocket:
|
|
7
|
+
|
|
8
|
+
You own your Markdown files, so unlike a proprietary solution, you can deploy Compiiile and make your knowledge-base accessible on the web freely.
|
|
9
|
+
|
|
10
|
+
Let's suppose you have a folder containing a bunch Markdown files, with sub-folders, without any config file (no `package.json` whatsoever).
|
|
11
|
+
It's a breeze to deploy it, so let's dive into it!
|
|
12
|
+
|
|
13
|
+
## Self-host your knowledge-base :hammer:
|
|
14
|
+
|
|
15
|
+
### Using Docker
|
|
16
|
+
|
|
17
|
+
A [ready-to-use Docker file is available on the repo](https://github.com/compiiile/compiiile/blob/master/Dockerfile) and you can
|
|
18
|
+
follow the [instructions on the README to build the files](./README.md#using-docker).
|
|
19
|
+
|
|
20
|
+
### Build static files
|
|
21
|
+
|
|
22
|
+
Assuming you have Compiiile installed globally (`npm install -g @compiiile/compiiile`), you can run the `build` command with parameters on-the-fly to generate static files.
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
compiiile build --title="Hello world!"
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
You'll have all your static files generated in the `.compiiile/dist` folder, ready to be served on your server!
|
|
29
|
+
|
|
30
|
+
## Deploy your Markdown files on Vercel :globe_with_meridians:
|
|
31
|
+
|
|
32
|
+
In your project's `Settings` tab, put these settings:
|
|
33
|
+
- Framework preset: `Other`
|
|
34
|
+
- Build command: `compiiile build --title="Hello world!"`
|
|
35
|
+
- Output directory: `.compiiile/dist`
|
|
36
|
+
- Install command: `npm install @compiiile/compiiile`
|
|
37
|
+
|
|
38
|
+
Wait... is this it? Well, yeah, it's as simple as that! Everytime you make a new deployment (via a push to the `main` branch of your repo or via the Vercel CLI),
|
|
39
|
+
you'll get your knowledge-base updated. Once again, without even config files! Isn't it beautiful? :open_mouth:
|
|
40
|
+
|
|
41
|
+
> [!TIP]
|
|
42
|
+
> Of course, something similar can be done using `Netlify`, `GitHub pages`, or whatever you use.
|
package/README.md
CHANGED
|
@@ -197,7 +197,7 @@ The home page of Compiiile (`/`) points to a `README.md` file located at the roo
|
|
|
197
197
|
Here is the list of parameters that you can set to customize Compiiile (none are required):
|
|
198
198
|
|
|
199
199
|
| Parameter | Type | Description |
|
|
200
|
-
|
|
200
|
+
|------------------------|------------|----------------------------------------------------------------------------------------------------------------------|
|
|
201
201
|
| `title` | `string` | The title to display on the top-left of the User Interface |
|
|
202
202
|
| `description` | `string` | The description that is rendered by default for the SEO |
|
|
203
203
|
| `logo` | `string` | The relative path of the logo to display in the TopBar and as favicon |
|
|
@@ -211,6 +211,8 @@ Here is the list of parameters that you can set to customize Compiiile (none are
|
|
|
211
211
|
| `noIndex` | `Boolean` | If set to `true`, the `robots.txt` file will disallow all routes, preventing indexation. Defaults to `false` |
|
|
212
212
|
| `publicDir` | `string` | The folder name in which you can serve public files, defaults to `public` |
|
|
213
213
|
| `vite.server.fs.allow` | `string[]` | Add local paths to vite's server fs allow list |
|
|
214
|
+
| `printReady` | `Boolean` | Add a `/print` page to display a full ready-to-print content (uses `@compiiile/compiiile-print`) |
|
|
215
|
+
| `css` | `string` | A relative path to a custom CSS file to customize the style <br/>:warning: Requires `compiiile-pro` |
|
|
214
216
|
|
|
215
217
|
You can use these parameters in 2 ways:
|
|
216
218
|
|
package/bin/config.js
CHANGED
|
@@ -94,6 +94,9 @@ const argv = yargs(hideBin(process.argv))
|
|
|
94
94
|
.option("vite.server.fs.allow", {
|
|
95
95
|
describe: "Add local paths to vite's server fs allow list"
|
|
96
96
|
})
|
|
97
|
+
.option("printReady", {
|
|
98
|
+
describe: "Add a /print page to display a full ready-to-print content (uses @compiiile/compiiile-print)"
|
|
99
|
+
})
|
|
97
100
|
.help()
|
|
98
101
|
.version(packageJSON.version).argv
|
|
99
102
|
|
|
@@ -161,6 +164,13 @@ if (packageDir) {
|
|
|
161
164
|
viteServerFsAllowList.push(packageDir)
|
|
162
165
|
}
|
|
163
166
|
|
|
167
|
+
const localIntegrations = []
|
|
168
|
+
|
|
169
|
+
if(/true/i.test(argv.printReady)){
|
|
170
|
+
const compiiilePrintIntegration = (await import("@compiiile/compiiile-print")).default
|
|
171
|
+
localIntegrations.push(compiiilePrintIntegration())
|
|
172
|
+
}
|
|
173
|
+
|
|
164
174
|
const astroConfig = {
|
|
165
175
|
server: {
|
|
166
176
|
host: argv.host,
|
|
@@ -173,6 +183,7 @@ const astroConfig = {
|
|
|
173
183
|
integrations: [
|
|
174
184
|
vue({ appEntrypoint: "/src/app.js" }),
|
|
175
185
|
...(configFromFile.integrations ?? []),
|
|
186
|
+
...(localIntegrations ?? []),
|
|
176
187
|
mdx(),
|
|
177
188
|
...(process.env.VITE_COMPIIILE_SITE_URL ? [sitemap()] : []),
|
|
178
189
|
{
|
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.16.1",
|
|
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",
|
|
@@ -22,19 +22,20 @@
|
|
|
22
22
|
"url": "git+https://github.com/compiiile/compiiile.git"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@astrojs/mdx": "^4.0.
|
|
25
|
+
"@astrojs/mdx": "^4.0.8",
|
|
26
26
|
"@astrojs/sitemap": "^3.2.1",
|
|
27
|
-
"@astrojs/vue": "^5.0.
|
|
27
|
+
"@astrojs/vue": "^5.0.6",
|
|
28
28
|
"@babel/core": "^7.26.0",
|
|
29
29
|
"@babel/eslint-parser": "^7.25.9",
|
|
30
30
|
"@babel/parser": "^7.26.3",
|
|
31
|
-
"@compiiile/compiiile-
|
|
31
|
+
"@compiiile/compiiile-print": "^1.0.6",
|
|
32
|
+
"@compiiile/compiiile-pro": "^1.2.0",
|
|
32
33
|
"@eslint/compat": "^1.2.4",
|
|
33
34
|
"@eslint/js": "^9.16.0",
|
|
34
35
|
"@fontsource-variable/archivo": "^5.1.0",
|
|
35
36
|
"@fontsource-variable/dm-sans": "^5.1.0",
|
|
36
37
|
"@fontsource-variable/jetbrains-mono": "^5.1.1",
|
|
37
|
-
"astro": "^5.
|
|
38
|
+
"astro": "^5.2.5",
|
|
38
39
|
"astro-seo": "^0.8.4",
|
|
39
40
|
"c12": "^2.0.1",
|
|
40
41
|
"entities": "^5.0.0",
|
|
@@ -58,7 +59,7 @@
|
|
|
58
59
|
"typescript": "^5.7.2",
|
|
59
60
|
"uuid": "^11.0.3",
|
|
60
61
|
"vfile-matter": "^5.0.0",
|
|
61
|
-
"vite": "^6.0
|
|
62
|
+
"vite": "^6.1.0",
|
|
62
63
|
"vue": "^3.5.13",
|
|
63
64
|
"yargs": "^17.7.2",
|
|
64
65
|
"zod": "^3.23.8"
|