@compiiile/compiiile 2.15.0 → 2.16.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/components.d.ts +23 -0
- package/6-deploy.mdx +42 -0
- package/README.md +2 -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
|
+
}
|
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,7 @@ 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`) |
|
|
214
215
|
|
|
215
216
|
You can use these parameters in 2 ways:
|
|
216
217
|
|
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.0",
|
|
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.1.9",
|
|
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"
|