@compiiile/compiiile 2.11.1 → 2.13.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.
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "_variables": {
3
- "lastUpdateCheck": 1718726455618
3
+ "lastUpdateCheck": 1722441683265
4
4
  }
5
5
  }
package/README.md CHANGED
@@ -183,6 +183,7 @@ Other frontmatter keys are handled:
183
183
  - `textAlign`: possible values
184
184
  are [CSS text-align values](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align) (`left`, `center`, ...). This
185
185
  changes the default text alignment in slides. The default value is `center`.
186
+ - `ignore` : Boolean value (`true` or `false`) to ignore the current file and exclude it from Compiiile (the file is not ignored by default).
186
187
 
187
188
  > :bulb: You can override slides theme by passing it to a `theme` query parameter in your slide url (for example `/s/slides?theme=light`). See the `theme` config parameter below for valid values.
188
189
 
@@ -239,6 +240,8 @@ export default {
239
240
 
240
241
  > ⚠️ You should bear in mind that script arguments have priority over config file parameters.
241
242
 
243
+ > :bulb: Compiiile uses [c12](https://github.com/unjs/c12) to load the config file, which allows to **extend config values** from other files. See the [dedicated c12 documentation](https://github.com/unjs/c12?tab=readme-ov-file#extending-configuration) for more information.
244
+
242
245
  ## Public files
243
246
 
244
247
  If you want some files to be public, just create a folder named `public` at the root of your Compiiile folder.
package/bin/config.js CHANGED
@@ -10,12 +10,10 @@ import markdownConfig from "./vitePluginCompiiile/markdownConfig.js"
10
10
  import resolvePackagePath from "resolve-package-path"
11
11
  import requireg from "requireg"
12
12
  import sitemap from "@astrojs/sitemap"
13
-
13
+ import {loadConfig} from "c12"
14
14
  const source = process.cwd()
15
15
  process.env.COMPIIILE_SOURCE = source
16
16
 
17
- const CONFIG_FILE = "compiiile.config.js"
18
-
19
17
  import yargs from "yargs/yargs"
20
18
  import { hideBin } from "yargs/helpers"
21
19
 
@@ -30,7 +28,7 @@ const packageJSON = JSON.parse(await readFile(fileURLToPath(new URL("../package.
30
28
  */
31
29
  let configFromFile = {}
32
30
  try {
33
- configFromFile = (await import(path.join(source, CONFIG_FILE))).default
31
+ configFromFile = (await loadConfig({ name: "compiiile"})).config
34
32
  } catch {
35
33
  // This means that no config file was provided: getting parameters from script parameters instead
36
34
  }
@@ -71,7 +71,7 @@ export default class {
71
71
  ".vuepress",
72
72
  ".git",
73
73
  "node_modules",
74
- "compiiile",
74
+ ".compiiile",
75
75
  "bin",
76
76
  ".idea",
77
77
  ".DS_Store",
@@ -122,6 +122,14 @@ export default class {
122
122
 
123
123
  const meta = renderedMarkdown.metadata.frontmatter
124
124
 
125
+ if(meta.ignore){
126
+ const fileIndex = fileArray.findIndex(f => f.uuid === fileListItem.uuid)
127
+ if(fileIndex > -1){
128
+ fileArray.splice(fileIndex, 1)
129
+ }
130
+ continue
131
+ }
132
+
125
133
  let firstHeading = null
126
134
  if (
127
135
  JSON.parse(process.env.VITE_COMPIIILE_USE_AUTO_TITLES) &&
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@compiiile/compiiile",
3
3
  "private": false,
4
- "version": "2.11.1",
4
+ "version": "2.13.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",
@@ -27,12 +27,13 @@
27
27
  "@astrojs/vue": "^4.5.0",
28
28
  "@babel/core": "^7.0.0-0",
29
29
  "@babel/eslint-parser": "^7.22.15",
30
- "@compiiile/compiiile-pro": "^1.1.3",
30
+ "@compiiile/compiiile-pro": "^1.1.5",
31
31
  "@fontsource-variable/archivo": "^5.0.16",
32
32
  "@fontsource-variable/dm-sans": "^5.0.3",
33
33
  "@fontsource-variable/jetbrains-mono": "^5.0.18",
34
- "astro": "^4.11.0",
34
+ "astro": "^4.12.3",
35
35
  "astro-seo": "^0.8.4",
36
+ "c12": "^1.11.1",
36
37
  "eslint": "^8.51.0",
37
38
  "eslint-config-prettier": "^9.0.0",
38
39
  "eslint-plugin-vue": "^9.17.0",
@@ -51,8 +52,8 @@
51
52
  "slugify": "^1.6.6",
52
53
  "uuid": "^9.0.1",
53
54
  "vfile-matter": "^5.0.0",
54
- "vite": "^5.3.1",
55
- "vue": "^3.4.30",
55
+ "vite": "^5.3.5",
56
+ "vue": "^3.4.35",
56
57
  "yargs": "^17.7.2",
57
58
  "zod": "^3.22.3"
58
59
  },