@turnipxenon/pineapple 4.1.2 → 4.1.4

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.
@@ -20,6 +20,8 @@
20
20
  {/if}
21
21
  {:else if child.type === 'heading'}
22
22
  <ParsnipHeading heading={child} />
23
+ {:else if child.type === 'thematicBreak'}
24
+ <hr>
23
25
  {:else if child.type === 'blockquote'}
24
26
  <!-- todo: do advanced things like callout blocks -->
25
27
  <blockquote>
@@ -12,6 +12,8 @@ export interface SimplifiedEntry {
12
12
  * url of preview image relative to base blog path
13
13
  */
14
14
  preview?: string;
15
+ previewAlt?: string;
16
+ tagline?: string;
15
17
  }
16
18
  export interface ParsnipEntrySummary extends SimplifiedEntry {
17
19
  /**
@@ -16,6 +16,10 @@
16
16
  </strong>
17
17
  {:else if child.type === 'inlineCode'}
18
18
  <code class="inline-code">{child.value}</code>
19
+ {:else if child.type === 'link'}
20
+ <a href={child.url}>
21
+ <Self phrasingChildren={child.children} />
22
+ </a>
19
23
  {:else if child.type === 'embedWikilink'}
20
24
  <ParsnipEmbedWikilink wikilink={child} />
21
25
  {:else if child.type === 'wikilink'}
@@ -17,4 +17,4 @@
17
17
 
18
18
  <!-- todo(turnip): determine appropriate media -->
19
19
  <!-- todo(turnip): add alt text -->
20
- <a href={`${getWebBaseUrl()}/${wikilink.fileAccessor.slug}`}>{wikilink.fileAccessor.target}</a>
20
+ <a href={`${getWebBaseUrl()}/${wikilink.fileAccessor.slug}`} data-sveltekit-reload>{wikilink.fileAccessor.target}</a>
@@ -1,6 +1,7 @@
1
1
  <script lang="ts">
2
2
  import { OverridableMeta } from "../../overrideable_meta/index";
3
3
  import type { PageMeta } from "../../../ui/modules/NavigationMenu/PageMeta";
4
+ import { getCmsBaseUrl } from "../../../util/env-getter";
4
5
  import ParsnipBlockChildren from "../ParsnipBlockChildren.svelte";
5
6
  import type { ParsnipEntry } from "../ParsnipEntry";
6
7
  import BlogTemplate from "../../../ui/templates/blog_template/BlogTemplate.svelte";
@@ -20,8 +21,8 @@
20
21
  <OverridableMeta
21
22
  title={parsnipEntry.basename}
22
23
  ogTitle={parsnipEntry.basename}
23
- ogDescription=""
24
- ogImage={parsnipEntry.preview}
24
+ ogDescription={parsnipEntry.tagline}
25
+ ogImage={`${getCmsBaseUrl()}/${parsnipEntry.preview}`}
25
26
  />
26
27
 
27
28
  <BlogTemplate pageMeta={pageMeta}>
@@ -40,7 +40,7 @@
40
40
  pageSize = $bindable(5),
41
41
  currentIndex = $bindable(0),
42
42
  parsnipOverall = undefined,
43
- parsnipBasePath = '',
43
+ parsnipBasePath = ""
44
44
  }: Props = $props();
45
45
 
46
46
  const fileBasedList = parsePageMeta(fileList, jsonList, imageMap, compareFn);
@@ -51,8 +51,10 @@
51
51
  relativeLink: `${parsnipBasePath}${pf.slug}`,
52
52
  tags: pf.tags,
53
53
  imageUrl: pf.preview ? `${parsnipOverall.baseUrl}/${pf.preview}` : undefined,
54
+ imageAlt: pf.previewAlt,
54
55
  datePublished: pf.stat.ctime ? new Date(pf.stat.ctime).toISOString().split("T")[0] : undefined,
55
- lastUpdated: pf.stat.mtime ? new Date(pf.stat.mtime).toISOString().split("T")[0] : undefined
56
+ lastUpdated: pf.stat.mtime ? new Date(pf.stat.mtime).toISOString().split("T")[0] : undefined,
57
+ description: pf.tagline
56
58
  };
57
59
  return meta;
58
60
  }) ?? [];
@@ -1,2 +1,2 @@
1
- export const getCmsBaseUrl = () => import.meta.env.VITE_PARSNIP_BASE_URL ?? 'https://gitlab.com/turnipxenon-personal/test-obdisian/-/raw/main';
1
+ export const getCmsBaseUrl = () => import.meta.env.VITE_CMS_BASE_URL ?? 'https://gitlab.com/turnipxenon-personal/test-obdisian/-/raw/main';
2
2
  export const getWebBaseUrl = () => import.meta.env.VITE_WEB_BASE_URL ?? '/pineapple';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@turnipxenon/pineapple",
3
3
  "description": "personal package for base styling for other personal projects",
4
- "version": "4.1.2",
4
+ "version": "4.1.4",
5
5
  "scripts": {
6
6
  "dev": "vite dev",
7
7
  "build": "vite build && yarn package",