@eventcatalog/core 2.0.25 → 2.0.27

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @eventcatalog/core
2
2
 
3
+ ## 2.0.27
4
+
5
+ ### Patch Changes
6
+
7
+ - c6da224: feat(core): added ability to configure landing page
8
+
9
+ ## 2.0.26
10
+
11
+ ### Patch Changes
12
+
13
+ - 3dc05d8: fix(core): fixed search, now set output path on build
14
+
3
15
  ## 2.0.25
4
16
 
5
17
  ### Patch Changes
package/astro.config.mjs CHANGED
@@ -4,16 +4,21 @@ import mdx from '@astrojs/mdx';
4
4
  import react from '@astrojs/react';
5
5
  import pagefind from "astro-pagefind";
6
6
  import { mermaid } from "./src/remark-plugins/mermaid"
7
+ import { join } from 'node:path';
7
8
 
8
9
  /** @type {import('bin/eventcatalog.config').Config} */
9
10
  import config from './eventcatalog.config';
10
11
  import expressiveCode from 'astro-expressive-code';
11
12
 
13
+ const coreDirectory = process.env.CATALOG_DIR || process.cwd();
14
+
12
15
  // https://astro.build/config
13
16
  export default defineConfig({
14
17
  base: config.base || '/',
15
18
  server: { port: config.port || 3000 },
16
19
 
20
+ outDir: join(coreDirectory, 'dist'),
21
+
17
22
  // https://docs.astro.build/en/reference/configuration-reference/#site
18
23
  site: config.homepageLink || 'https://eventcatalog.dev/',
19
24
 
@@ -38,6 +43,6 @@ export default defineConfig({
38
43
  pagefind(),
39
44
  ],
40
45
  redirects: {
41
- "/": "/docs"
46
+ "/": config.landingPage || '/docs',
42
47
  }
43
48
  });
@@ -7,6 +7,7 @@ interface Config {
7
7
  organizationName: string;
8
8
  homepageLink: string;
9
9
  editUrl: string;
10
+ landingPage?: string;
10
11
  base?: string;
11
12
  port?: string;
12
13
  trailingSlash?: boolean;
@@ -7,6 +7,7 @@ interface Config {
7
7
  organizationName: string;
8
8
  homepageLink: string;
9
9
  editUrl: string;
10
+ landingPage?: string;
10
11
  base?: string;
11
12
  port?: string;
12
13
  trailingSlash?: boolean;
@@ -8,6 +8,7 @@ export interface Config {
8
8
  organizationName: string;
9
9
  homepageLink: string;
10
10
  editUrl: string;
11
+ landingPage?: string;
11
12
  base?: string;
12
13
  port?: string;
13
14
  trailingSlash?: boolean;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@eventcatalog/core",
3
3
  "type": "module",
4
- "version": "2.0.25",
4
+ "version": "2.0.27",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -1,6 +1,5 @@
1
1
  ---
2
2
  import catalog from '@eventcatalog';
3
- // import Search from 'astro-pagefind/components/Search';
4
3
  import Search from '@components/Search.astro';
5
4
  import { buildUrl } from '@utils/url-builder';
6
5
 
@@ -31,7 +30,7 @@ const logo = {
31
30
  <nav class="md:fixed top-0 w-full z-20 bg-white border-b border-gray-200 py-4 font-bold text-xl max-w-[70em]">
32
31
  <div class="flex justify-between items-center">
33
32
  <div class="w-1/3 flex space-x-2 items-center">
34
- <a href={buildUrl('/docs')} class="flex space-x-2 items-center">
33
+ <a href={buildUrl(catalog.landingPage || '/docs')} class="flex space-x-2 items-center">
35
34
  {logo.src && <img alt={logo.alt} src={buildUrl(logo.src, true)} class="w-8" />}
36
35
  {logo.text && <span class="hidden sm:inline-block text-[1em]">{logo.text}</span>}
37
36
  </a>