@compiiile/compiiile 2.17.0 → 2.17.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/README.md +28 -22
- package/bin/loadConfig.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -99,11 +99,16 @@ To make yourself an idea and quickly get started using Compiiile, here are some
|
|
|
99
99
|
terminal to get Compiiile running with a couple of markdown files as tests:
|
|
100
100
|
|
|
101
101
|
```bash
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
102
|
+
# creating a new folder and go into this folder
|
|
103
|
+
mkdir test-compiiile && cd test-compiiile
|
|
104
|
+
# installing compiiile as global dependency using npm
|
|
105
|
+
npm i -g @compiiile/compiiile
|
|
106
|
+
# a first test file
|
|
107
|
+
echo '# Test Compiiile\n\n> Here is a blockquote for you\n\n## Your markdown awaits below' > README.md
|
|
108
|
+
# a second test file as slides
|
|
109
|
+
echo '---\nasSlides: true\n---\n\n# Slide 1\n\n---\n\n# And this is slide 2' > slides.md
|
|
110
|
+
# running Compiiile for these 2 files
|
|
111
|
+
compiiile --title="📚 Compiiile"
|
|
107
112
|
```
|
|
108
113
|
|
|
109
114
|
Et voilà , you should be able to preview your files in your browser :tada:.
|
|
@@ -196,23 +201,24 @@ The home page of Compiiile (`/`) points to a `README.md` file located at the roo
|
|
|
196
201
|
|
|
197
202
|
Here is the list of parameters that you can set to customize Compiiile (none are required):
|
|
198
203
|
|
|
199
|
-
| Parameter | Type | Description
|
|
200
|
-
|
|
201
|
-
| `title` | `string` | The title to display on the top-left of the User Interface
|
|
202
|
-
| `description` | `string` | The description that is rendered by default for the SEO
|
|
203
|
-
| `logo` | `string` | The relative path of the logo to display in the TopBar and as favicon
|
|
204
|
-
| `logoUrl` | `string` | The url to go to when clicking on the logo, defaults to the home page if not set
|
|
205
|
-
| `dest` | `string` | The folder in which to build files, defaults to `./.compiiile/dist`
|
|
206
|
-
| `siteUrl` | `string` | The url of the website in production (without trailing slash), used for the SEO tag `og:image`
|
|
207
|
-
| `astroConfig` | `Object` | Override [default Astro config](https://docs.astro.build/en/reference/configuration-reference/)
|
|
208
|
-
| `data` | `Object` | An object with data to use in MDX files (check use case below)
|
|
209
|
-
| `theme` | `string` | The website theme, value can be : `auto` (default value: adapts to system preferences) \| `light` \| `dark`
|
|
210
|
-
| `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`
|
|
211
|
-
| `noIndex` | `Boolean` | If set to `true`, the `robots.txt` file will disallow all routes, preventing indexation. Defaults to `false`
|
|
212
|
-
| `publicDir` | `string` | The folder name in which you can serve public files, defaults to `public`
|
|
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`
|
|
204
|
+
| Parameter | Type | Description |
|
|
205
|
+
|------------------------| ---------- |-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
206
|
+
| `title` | `string` | The title to display on the top-left of the User Interface |
|
|
207
|
+
| `description` | `string` | The description that is rendered by default for the SEO |
|
|
208
|
+
| `logo` | `string` | The relative path of the logo to display in the TopBar and as favicon |
|
|
209
|
+
| `logoUrl` | `string` | The url to go to when clicking on the logo, defaults to the home page if not set |
|
|
210
|
+
| `dest` | `string` | The folder in which to build files, defaults to `./.compiiile/dist` |
|
|
211
|
+
| `siteUrl` | `string` | The url of the website in production (without trailing slash), used for the SEO tag `og:image` |
|
|
212
|
+
| `astroConfig` | `Object` | Override [default Astro config](https://docs.astro.build/en/reference/configuration-reference/) |
|
|
213
|
+
| `data` | `Object` | An object with data to use in MDX files (check use case below) |
|
|
214
|
+
| `theme` | `string` | The website theme, value can be : `auto` (default value: adapts to system preferences) \| `light` \| `dark` |
|
|
215
|
+
| `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` |
|
|
216
|
+
| `noIndex` | `Boolean` | If set to `true`, the `robots.txt` file will disallow all routes, preventing indexation. Defaults to `false` |
|
|
217
|
+
| `publicDir` | `string` | The folder name in which you can serve public files, defaults to `public` |
|
|
218
|
+
| `vite.server.fs.allow` | `string[]` | Add local paths to vite's server fs allow list |
|
|
219
|
+
| `printReady` | `Boolean` | Add a `/print` page to display a full ready-to-print content (uses `@compiiile/compiiile-print`) |
|
|
220
|
+
| `css` | `string` | A relative path to a custom CSS file to customize the style <br/>:warning: Requires `compiiile-pro` |
|
|
221
|
+
| `integrations` | `AstroIntegration[]` | An array of Astro Integrations for [custom Astro hooks implementations](https://docs.astro.build/en/reference/integrations-reference/#astroconfigsetup): injecting CSS, javascript, etc |
|
|
216
222
|
|
|
217
223
|
You can use these parameters in 2 ways:
|
|
218
224
|
|
package/bin/loadConfig.js
CHANGED
|
@@ -25,7 +25,7 @@ export const loadConfig = async () => {
|
|
|
25
25
|
name: process.env.COMPIIILE_TEMP_CONFIG_NAME || "compiiile",
|
|
26
26
|
cwd: process.env.COMPIIILE_TEMP_DIR || source
|
|
27
27
|
})
|
|
28
|
-
configFromFile =
|
|
28
|
+
configFromFile = {...compiiileConfig.config}
|
|
29
29
|
if (!process.env.COMPIIILE_CONFIG_FILE) {
|
|
30
30
|
process.env.COMPIIILE_CONFIG_FILE = compiiileConfig.configFile
|
|
31
31
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@compiiile/compiiile",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "2.17.
|
|
4
|
+
"version": "2.17.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",
|