astro-theme-popular 0.14.2 → 0.14.3

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": "astro-theme-popular",
3
- "version": "0.14.2",
3
+ "version": "0.14.3",
4
4
  "description": "Popular: a warm, community-first Astro theme for meetups, clubs and fan communities. Ships as an Astro integration.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -33,7 +33,12 @@ interface Props {
33
33
  }
34
34
  const { title, description, image, article, imageAlt, noindex } = Astro.props;
35
35
  const ogLocale = SITE.locale.replace('-', '_');
36
- const pageTitle = title ? `${title} · ${SITE.title}` : `${SITE.title}, ${SITE.tagline}`;
36
+ /* The home title joins whichever of title and tagline are set, so a missing
37
+ one never leaves a stray separator (", Tagline" or "Title, undefined").
38
+ The Hugo twin does the same in partials/head.html. */
39
+ const pageTitle = title
40
+ ? [title, SITE.title].filter(Boolean).join(' · ')
41
+ : [SITE.title, SITE.tagline].filter(Boolean).join(', ');
37
42
  const desc = description ?? SITE.description;
38
43
  const ogImage = image ?? SITE.ogImage;
39
44
  /* Astro.url.pathname already carries the base; Astro.site does not, hence
@@ -96,9 +101,12 @@ const brandCss = `html:root{${vars.join(';')}}`;
96
101
  <meta name="generator" content={Astro.generator} />
97
102
  <title>{pageTitle}</title>
98
103
  <meta name="description" content={desc} />
99
- <meta property="og:site_name" content={SITE.title} />
104
+ {/* With no site title, og:site_name is left out rather than written
105
+ empty, and the home og:title falls back to the tagline, the same way
106
+ the home <title> does. The Hugo twin does the same in seo.html. */}
107
+ {SITE.title && <meta property="og:site_name" content={SITE.title} />}
100
108
  <meta property="og:locale" content={ogLocale} />
101
- <meta property="og:title" content={title ?? SITE.title} />
109
+ <meta property="og:title" content={title ?? (SITE.title || SITE.tagline)} />
102
110
  <meta property="og:description" content={desc} />
103
111
  <meta property="og:url" content={canonical} />
104
112
  <link rel="canonical" href={canonical} />