nuxt-ignis 0.4.0-rc.1 → 0.4.0-rc.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.
@@ -1 +1 @@
1
- {"id":"dev","timestamp":1752942566845}
1
+ {"id":"dev","timestamp":1753016433982}
@@ -1 +1 @@
1
- {"id":"dev","timestamp":1752942566845,"matcher":{"static":{"/__nuxt_content/content/sql_dump.txt":{"prerender":true}},"wildcard":{},"dynamic":{}},"prerendered":[]}
1
+ {"id":"dev","timestamp":1753016433982,"matcher":{"static":{"/__nuxt_content/content/sql_dump.txt":{"prerender":true}},"wildcard":{},"dynamic":{}},"prerendered":[]}
package/.nuxt/nitro.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "date": "2025-07-19T16:29:53.198Z",
2
+ "date": "2025-07-20T13:01:23.814Z",
3
3
  "preset": "nitro-dev",
4
4
  "framework": {
5
5
  "name": "nuxt",
@@ -9,9 +9,9 @@
9
9
  "nitro": "2.12.3"
10
10
  },
11
11
  "dev": {
12
- "pid": 6580,
12
+ "pid": 51984,
13
13
  "workerAddress": {
14
- "socketPath": "\\\\.\\pipe\\nitro-worker-6580-3-2-5426.sock"
14
+ "socketPath": "\\\\.\\pipe\\nitro-worker-51984-3-2-7913.sock"
15
15
  }
16
16
  }
17
17
  }
package/.nuxt/nuxt.d.ts CHANGED
@@ -4,21 +4,21 @@
4
4
  /// <reference types="@nuxt/fonts" />
5
5
  /// <reference types="@nuxt/scripts" />
6
6
  /// <reference types="@nuxt/image" />
7
- /// <reference types="nuxt-security" />
8
- /// <reference types="@nuxt/ui" />
9
7
  /// <reference types="@pinia/nuxt" />
8
+ /// <reference types="@nuxt/ui" />
10
9
  /// <reference types="nuxt-neon" />
11
- /// <reference types="nuxt-auth-utils" />
12
- /// <reference types="@nuxt/content" />
13
10
  /// <reference types="@nuxtjs/i18n" />
14
11
  /// <reference types="@vueform/nuxt" />
12
+ /// <reference types="@nuxtjs/seo" />
13
+ /// <reference types="@nuxt/content" />
14
+ /// <reference types="nuxt-security" />
15
15
  /// <reference types="nuxt-charts" />
16
16
  /// <reference types="@nuxt/eslint" />
17
- /// <reference types="@nuxt/telemetry" />
18
- /// <reference types="@nuxt/test-utils" />
19
17
  /// <reference types="@nuxt/devtools" />
18
+ /// <reference types="nuxt-auth-utils" />
20
19
  /// <reference types="@maas/vue-equipment" />
21
- /// <reference types="@nuxtjs/seo" />
20
+ /// <reference types="@nuxt/test-utils" />
21
+ /// <reference types="@nuxt/telemetry" />
22
22
  /// <reference path="types/builder-env.d.ts" />
23
23
  /// <reference types="nuxt" />
24
24
  /// <reference path="types/app-defaults.d.ts" />
@@ -8,9 +8,11 @@
8
8
 
9
9
  <template>
10
10
  <div style="text-align: center; font-size: 0.8em;">
11
- Current time with <NuxtLink to="https://nuxt.com/docs/api/components/nuxt-time">NuxtTime</NuxtLink>:
11
+ Current datetime with <NuxtLink to="https://nuxt.com/docs/api/components/nuxt-time">NuxtTime</NuxtLink>:
12
12
  <NuxtTime
13
13
  :datetime="currentDate"
14
+ hour-cycle="h24"
15
+ locale="en-CA"
14
16
  year="numeric"
15
17
  month="2-digit"
16
18
  day="2-digit"
@@ -1,14 +1,12 @@
1
1
  <template>
2
2
  <div style="margin: 0 auto; max-width: 800px;">
3
- <h1 style="text-align: center;">
3
+ <h1 class="ignis-config-header">
4
4
  Configuration Overview
5
5
  </h1>
6
- <div style="text-align: center;">
6
+ <div class="ignis-config-subheader">
7
7
  {{ useIgnisT('config.header') }}
8
8
  </div>
9
- <pre>
10
- {{ ignisConfig || error }}
11
- </pre>
9
+ <pre class="ignis-config">{{ ignisConfig || error }};</pre>
12
10
  </div>
13
11
  </template>
14
12
 
@@ -21,18 +19,26 @@ const { data: ignisConfig, error } = await useFetch('/_ignis-config.json', {
21
19
  </script>
22
20
 
23
21
  <style scoped lang="css">
24
- h1 {
22
+ .ignis-config-header {
23
+ text-align: center;
24
+ font-family: monospace;
25
25
  font-size: 1.75rem;
26
26
  margin-top: 2rem;
27
27
  margin-bottom: 0.5rem;
28
28
  color: #fbbf24;
29
29
  }
30
30
 
31
- pre {
31
+ .ignis-config-subheader {
32
+ text-align: center;
33
+ }
34
+
35
+ .ignis-config {
32
36
  border: 1px white;
33
37
  background-color: gray;
38
+ color: white;
34
39
  padding: 1rem;
35
40
  margin: 1rem 0;
41
+ text-align: left;
36
42
  white-space: pre-wrap;
37
43
  }
38
44
  </style>
@@ -10,8 +10,10 @@
10
10
  -->
11
11
 
12
12
  <template>
13
- <div style="text-align: center;">
14
- <h1>Features Overview</h1>
13
+ <div style="text-align: center; max-width: 1200px;">
14
+ <h1 class="ignis-feature-header">
15
+ Features Overview
16
+ </h1>
15
17
  <div class="feature-list">
16
18
  <IgnisFeature :text="useIgnisT('features.nuxt')" />
17
19
  <IgnisFeature :text="useIgnisT('features.consola')" />
@@ -85,7 +87,9 @@ const charts = setup.charts
85
87
 
86
88
  /* avoid Tailwind CSS styles here, because Tailwind may not be enabled */
87
89
 
88
- h1 {
90
+ .ignis-feature-header {
91
+ text-align: center;
92
+ font-family: monospace;
89
93
  font-size: 1.75rem;
90
94
  margin-top: 2rem;
91
95
  margin-bottom: 0.5rem;
@@ -100,24 +104,6 @@ h1 {
100
104
  flex-direction: column;
101
105
  }
102
106
 
103
- @media (max-width: 1200px) {
104
- .feature-list {
105
- width: 60%;
106
- }
107
- }
108
-
109
- @media (max-width: 800px) {
110
- .feature-list {
111
- width: 80%;
112
- }
113
- }
114
-
115
- @media (max-width: 600px) {
116
- .feature-list {
117
- width: 100%;
118
- }
119
- }
120
-
121
107
  /* mb-2 */
122
108
  .pages {
123
109
  margin-bottom: 2em;
@@ -1,6 +1,8 @@
1
1
  <template>
2
- <div style="display: flex; flex-direction: column; align-items: center; gap: 0.75rem; padding: 2rem;">
3
- <h1>Welcome to Ignis</h1>
2
+ <div class="ignis-welcome">
3
+ <h1 class="ignis-welcome-header">
4
+ Welcome to Ignis
5
+ </h1>
4
6
  <p>Thank you for choosing Nuxt Ignis! Your awesome website is just a few steps away.</p>
5
7
  <p v-if="pages">
6
8
  Replace <span class="file">/pages/index.vue</span> with your own content to get started. You may also replace <span class="file">/app.vue</span> to adjust site defaults.
@@ -8,8 +10,10 @@
8
10
  <p v-else>
9
11
  Replace <span class="file">/app.vue</span> with your own content to get started.
10
12
  </p>
11
- <h2>Resources</h2>
12
- <div style="display: flex; gap: 0.5rem; flex-wrap: wrap;">
13
+ <h2 class="ignis-welcome-subheader">
14
+ Resources
15
+ </h2>
16
+ <div class="ignis-welcome-resources">
13
17
  <NuxtLink to="/_ignis-info" class="feature">Features Overview</NuxtLink>
14
18
  <NuxtLink to="/_ignis-config" class="feature">Configuration Overview</NuxtLink>
15
19
  <NuxtLink to="https://nuxt-ignis.netlify.app/" class="feature">Documentation &#x1F517;</NuxtLink>
@@ -25,15 +29,35 @@ const pages = useRuntimeConfig().public.ignis.pages
25
29
  </script>
26
30
 
27
31
  <style scoped lang="css">
28
- h1 {
32
+ .ignis-welcome {
33
+ display: flex;
34
+ flex-direction: column;
35
+ align-items: center;
36
+ gap: 0.75rem;
37
+ padding: 2rem;
38
+ }
39
+
40
+ .ignis-welcome-header {
41
+ text-align: center;
42
+ font-family: monospace;
29
43
  font-size: 1.75rem;
30
44
  margin-bottom: 0.5rem;
31
45
  color: #fbbf24;
32
46
  }
33
- h2 {
47
+
48
+ .ignis-welcome-subheader {
49
+ text-align: center;
50
+ font-family: monospace;
34
51
  font-size: 1.5rem;
35
52
  color: #fbbf24;
36
53
  }
54
+
55
+ .ignis-welcome-resources {
56
+ display: flex;
57
+ gap: 0.5rem;
58
+ flex-wrap: wrap;
59
+ }
60
+
37
61
  p {
38
62
  width: 100%;
39
63
  }
package/features.ts CHANGED
@@ -4,6 +4,7 @@ import { defu } from 'defu'
4
4
  import OpenProps from 'open-props'
5
5
  import tailwindcss from '@tailwindcss/vite'
6
6
  import { log } from './utils/consola'
7
+ import { pslo } from './utils/pslo-utils'
7
8
  import { ignisTailwindcssFix } from './utils/tailwind'
8
9
 
9
10
  const currentDir = dirname(fileURLToPath(import.meta.url))
@@ -255,6 +256,21 @@ export function setFeatures() {
255
256
  // elrh-pslo
256
257
  if (process.env.NUXT_PUBLIC_IGNIS_PSLO_ENABLED === 'true') {
257
258
  extras.push('elrh-pslo')
259
+
260
+ // integration with Nuxt Content
261
+ // if enabled, all Nuxt Content page data will be treated with "preventSingleLetterOrphans" function
262
+ if (process.env.NUXT_PUBLIC_IGNIS_CONTENT === 'true' && process.env.NUXT_PUBLIC_IGNIS_PSLO_CONTENT === 'true') {
263
+ nuxtConfig = defu({
264
+ hooks: {
265
+ // TODO can we get type of ctx from Nuxt Content?
266
+ 'content:file:beforeParse'(ctx: { file: { id: string, body: string } }) {
267
+ const { file } = ctx
268
+ file.body = pslo(file.body)
269
+ log.debug(`Nuxt Content file ${file.id} processed with elrh-pslo`)
270
+ },
271
+ },
272
+ }, nuxtConfig)
273
+ }
258
274
  }
259
275
 
260
276
  // magic-regexp
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-ignis",
3
- "version": "0.4.0-rc.1",
3
+ "version": "0.4.0-rc.2",
4
4
  "description": "A ready-to-use setup for your next application in Nuxt",
5
5
  "keywords": [
6
6
  "nuxt",
@@ -46,6 +46,7 @@
46
46
  "schemaOrg": {
47
47
  "enabled": false
48
48
  },
49
+ "hooks": {},
49
50
  "ssr": false,
50
51
  "app": {
51
52
  "head": {
@@ -3,7 +3,8 @@ import { preventSingleLetterOrphans } from 'elrh-pslo'
3
3
  // this util function proxies "preventSingleLetterOrphans" function
4
4
  // it only applies the text transformation if relevant options is set up
5
5
  export function pslo(text: string) {
6
- if (useRuntimeConfig().public.ignis.pslo.enabled) {
6
+ if (process.env.NUXT_PUBLIC_IGNIS_PSLO_ENABLED === 'true') {
7
+ log.warn(`elrh-pslo activated`)
7
8
  return preventSingleLetterOrphans(text)
8
9
  } else {
9
10
  return text
@@ -1,17 +0,0 @@
1
- import { preventSingleLetterOrphans } from 'elrh-pslo'
2
-
3
- // this plugin will auto-treat all Nuxt Content page data
4
- // with "preventSingleLetterOrphans" function
5
- // but only if relevant options are set up
6
- export default defineNitroPlugin((nitroApp) => {
7
- const config = useRuntimeConfig().public.ignis
8
- if (config.content && config.pslo.enabled && config.pslo.content) {
9
- console.log('elrh-pslo plugin initialized')
10
- nitroApp.hooks.hook('content:file:beforeParse', (file) => {
11
- console.log('Treating Markdown with elrh-pslo')
12
- if (file._id.endsWith('.md')) {
13
- file.body = preventSingleLetterOrphans(file.body)
14
- }
15
- })
16
- }
17
- })