astroscrap 0.1.0 → 0.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "astroscrap",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "An Astro integration for building interconnected Markdown notes sites",
5
5
  "keywords": [
6
6
  "astro",
@@ -44,7 +44,7 @@
44
44
  },
45
45
  "dependencies": {
46
46
  "@astrojs/markdown-remark": "^7.3.9",
47
- "@astroscrap/cosense-parser": "workspace:*",
47
+ "@astroscrap/cosense-parser": "^0.1.1",
48
48
  "@types/mdast": "^4.0.4",
49
49
  "@types/node": "^24.19.2",
50
50
  "katex": "^0.19.1",
@@ -14,6 +14,9 @@ const { title } = Astro.props;
14
14
  const notes = (await getNotes()).filter((note) => isSearchableNote(note, import.meta.env.DEV));
15
15
  const base = normalizeBase(import.meta.env.BASE_URL);
16
16
  const icon = site.icon?.startsWith('/') ? `${base}${site.icon.slice(1)}` : site.icon;
17
+ const pageTitle = title ? `${title} | ${site.title}` : site.title;
18
+ const pageUrl = new URL(Astro.url.pathname, Astro.site ?? Astro.url);
19
+ const imageUrl = new URL(`${base}og-image.png`, Astro.site ?? Astro.url).href;
17
20
  ---
18
21
  <!doctype html>
19
22
  <html lang={site.lang}>
@@ -21,7 +24,13 @@ const icon = site.icon?.startsWith('/') ? `${base}${site.icon.slice(1)}` : site.
21
24
  <meta charset="utf-8" />
22
25
  <link rel="icon" type="image/svg+xml" href={`${base}favicon.svg`} />
23
26
  <meta name="viewport" content="width=device-width, initial-scale=1" />
24
- <title>{title ? `${title} | ${site.title}` : site.title}</title>
27
+ <title>{pageTitle}</title>
28
+ <meta property="og:type" content="website" />
29
+ <meta property="og:title" content={pageTitle} />
30
+ <meta property="og:site_name" content={site.title} />
31
+ <meta property="og:url" content={pageUrl.href} />
32
+ <meta property="og:image" content={imageUrl} />
33
+ <meta name="twitter:card" content="summary" />
25
34
  </head>
26
35
  <body>
27
36
  <a class="skip" href="#main">Skip to content</a>