This commit is contained in:
parent
670d90cb15
commit
f85aca7d58
43 changed files with 202 additions and 97 deletions
File diff suppressed because one or more lines are too long
|
|
@ -27,4 +27,4 @@ tags:
|
||||||
<p>15 Min Break</p>
|
<p>15 Min Break</p>
|
||||||
<p><strong>3:00pm -3:45pm Intro to <a href="https://alphausa.org/the-marriage-course">The Marriage Course</a></strong></p>
|
<p><strong>3:00pm -3:45pm Intro to <a href="https://alphausa.org/the-marriage-course">The Marriage Course</a></strong></p>
|
||||||
<p>Families and guests are welcome to join and celebrate your marriage with you. We’ll be able to put on a movie and have someone available to watch and entertain any younger kids during the program.</p>
|
<p>Families and guests are welcome to join and celebrate your marriage with you. We’ll be able to put on a movie and have someone available to watch and entertain any younger kids during the program.</p>
|
||||||
<p>Spaces are limited so please<a href="/register.html"> register today</a> to be part of this special celebration.</p>
|
<p>Spaces are limited so please<a href="/register"> register today</a> to be part of this special celebration.</p>
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import path from "node:path";
|
||||||
const repoRoot = process.cwd();
|
const repoRoot = process.cwd();
|
||||||
const distRoot = path.join(repoRoot, "dist");
|
const distRoot = path.join(repoRoot, "dist");
|
||||||
const htmlAttributes = ["href", "src", "poster", "action"];
|
const htmlAttributes = ["href", "src", "poster", "action"];
|
||||||
|
const internalHosts = new Set(["familyfed.ie", "www.familyfed.ie", "familyfed.bcgen.ie"]);
|
||||||
const assetExtensions = new Set([
|
const assetExtensions = new Set([
|
||||||
".avif",
|
".avif",
|
||||||
".css",
|
".css",
|
||||||
|
|
@ -98,6 +99,15 @@ function listFiles(dir) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkReference({ sourceFile, rawReference, sourceKind }) {
|
function checkReference({ sourceFile, rawReference, sourceKind }) {
|
||||||
|
if ((sourceKind === "href" || sourceKind === "action") && isInternalHtmlPageReference(rawReference)) {
|
||||||
|
problems.push({
|
||||||
|
sourceFile,
|
||||||
|
sourceKind,
|
||||||
|
rawReference,
|
||||||
|
reason: "internal page links should omit the .html extension",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
const reference = normalizeReference(rawReference);
|
const reference = normalizeReference(rawReference);
|
||||||
|
|
||||||
if (!reference) {
|
if (!reference) {
|
||||||
|
|
@ -140,6 +150,33 @@ function checkReference({ sourceFile, rawReference, sourceKind }) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function isInternalHtmlPageReference(rawReference) {
|
||||||
|
const trimmed = rawReference.trim();
|
||||||
|
if (
|
||||||
|
trimmed === "" ||
|
||||||
|
trimmed.startsWith("#") ||
|
||||||
|
trimmed.startsWith("data:") ||
|
||||||
|
trimmed.startsWith("blob:") ||
|
||||||
|
trimmed.startsWith("//") ||
|
||||||
|
trimmed.startsWith("?")
|
||||||
|
) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
const absoluteMatch = trimmed.match(/^https?:\/\/([^/?#]+)([^?#]*)(?:[?#].*)?$/i);
|
||||||
|
if (absoluteMatch) {
|
||||||
|
const [, host, pathname] = absoluteMatch;
|
||||||
|
return internalHosts.has(host.toLowerCase()) && pathname.toLowerCase().endsWith(".html");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ignoredProtocols.test(trimmed)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
const pathname = trimmed.split("#")[0].split("?")[0];
|
||||||
|
return pathname.toLowerCase().endsWith(".html");
|
||||||
|
}
|
||||||
|
|
||||||
function normalizeReference(rawReference) {
|
function normalizeReference(rawReference) {
|
||||||
if (!rawReference) {
|
if (!rawReference) {
|
||||||
return "";
|
return "";
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,36 @@ function copyDir(source, destination) {
|
||||||
fs.cpSync(source, destination, { recursive: true });
|
fs.cpSync(source, destination, { recursive: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function listHtmlFiles(dir) {
|
||||||
|
return fs.readdirSync(dir, { withFileTypes: true }).flatMap((entry) => {
|
||||||
|
const fullPath = path.join(dir, entry.name);
|
||||||
|
if (entry.isDirectory()) {
|
||||||
|
return listHtmlFiles(fullPath);
|
||||||
|
}
|
||||||
|
return entry.isFile() && entry.name.endsWith(".html") ? [fullPath] : [];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function materializeExtensionlessHtmlRoutes() {
|
||||||
|
let routes = 0;
|
||||||
|
|
||||||
|
for (const filePath of listHtmlFiles(distRoot)) {
|
||||||
|
const relativePath = path.relative(distRoot, filePath);
|
||||||
|
const extensionlessPath = relativePath.replace(/\.html$/, "");
|
||||||
|
const destination = path.join(distRoot, extensionlessPath, "index.html");
|
||||||
|
|
||||||
|
if (path.resolve(destination) === path.resolve(filePath)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
fs.mkdirSync(path.dirname(destination), { recursive: true });
|
||||||
|
fs.copyFileSync(filePath, destination);
|
||||||
|
routes += 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return routes;
|
||||||
|
}
|
||||||
|
|
||||||
for (const dir of staticDirs) {
|
for (const dir of staticDirs) {
|
||||||
copyDir(path.join(repoRoot, dir), path.join(distRoot, dir));
|
copyDir(path.join(repoRoot, dir), path.join(distRoot, dir));
|
||||||
}
|
}
|
||||||
|
|
@ -30,4 +60,7 @@ if (fs.existsSync(adminIndexSource)) {
|
||||||
fs.copyFileSync(adminIndexSource, adminIndexDestination);
|
fs.copyFileSync(adminIndexSource, adminIndexDestination);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const extensionlessRoutes = materializeExtensionlessHtmlRoutes();
|
||||||
|
|
||||||
console.log(`Copied ${staticDirs.join(", ")} into dist/.`);
|
console.log(`Copied ${staticDirs.join(", ")} into dist/.`);
|
||||||
|
console.log(`Materialized ${extensionlessRoutes} extensionless HTML route aliases.`);
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
import SiteLayout from "./SiteLayout.astro";
|
import SiteLayout from "./SiteLayout.astro";
|
||||||
import SiteSidebar from "./SiteSidebar.astro";
|
import SiteSidebar from "./SiteSidebar.astro";
|
||||||
import { categoryHref, excerptFromBody, formatDate, slugify, tagHref } from "../lib/archive";
|
import { categoryHref, excerptFromBody, formatDate, slugify, tagHref } from "../lib/archive";
|
||||||
|
import { stripHtmlExtensionFromInternalUrl } from "../lib/urls";
|
||||||
|
|
||||||
const {
|
const {
|
||||||
title,
|
title,
|
||||||
|
|
@ -39,20 +40,21 @@ const {
|
||||||
const tags = entry.data.tags ?? [];
|
const tags = entry.data.tags ?? [];
|
||||||
const title = entry.data.title ?? "Untitled";
|
const title = entry.data.title ?? "Untitled";
|
||||||
const publishedDate = formatDate(entry.data.published);
|
const publishedDate = formatDate(entry.data.published);
|
||||||
|
const entryHref = stripHtmlExtensionFromInternalUrl(entry.data.source);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<article class:list={["post", "type-post", "status-publish", "format-standard", "hentry", categories.map((category) => `category-${slugify(category)}`)]}>
|
<article class:list={["post", "type-post", "status-publish", "format-standard", "hentry", categories.map((category) => `category-${slugify(category)}`)]}>
|
||||||
<h2 class="entry-title">
|
<h2 class="entry-title">
|
||||||
<a href={entry.data.source}>{title}</a>
|
<a href={entryHref}>{title}</a>
|
||||||
</h2>
|
</h2>
|
||||||
<div class="entry-meta">
|
<div class="entry-meta">
|
||||||
<span class="author vcard">By <a class="url fn n" rel="author" href="#" title="View all posts by Fami1yfed">Fami1yfed</a></span>
|
<span class="author vcard">By <a class="url fn n" rel="author" href="#" title="View all posts by Fami1yfed">Fami1yfed</a></span>
|
||||||
{
|
{
|
||||||
publishedDate && entry.data.source && (
|
publishedDate && entryHref && (
|
||||||
<span>
|
<span>
|
||||||
<time class="onDate date published" datetime={entry.data.published}>
|
<time class="onDate date published" datetime={entry.data.published}>
|
||||||
{" "}
|
{" "}
|
||||||
<a href={entry.data.source} rel="bookmark">{publishedDate}</a>
|
<a href={entryHref} rel="bookmark">{publishedDate}</a>
|
||||||
{" "}
|
{" "}
|
||||||
</time>
|
</time>
|
||||||
</span>
|
</span>
|
||||||
|
|
@ -118,4 +120,3 @@ const {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</SiteLayout>
|
</SiteLayout>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
---
|
---
|
||||||
import SiteFooter from "./SiteFooter.astro";
|
import SiteFooter from "./SiteFooter.astro";
|
||||||
import SiteNav from "./SiteNav.astro";
|
import SiteNav from "./SiteNav.astro";
|
||||||
|
import { stripHtmlExtensionFromInternalUrl } from "../lib/urls";
|
||||||
|
|
||||||
const {
|
const {
|
||||||
title,
|
title,
|
||||||
|
|
@ -16,7 +17,7 @@ const {
|
||||||
const parabolaSettingsScript = `var parabola_settings = ${JSON.stringify(parabolaSettings)};`;
|
const parabolaSettingsScript = `var parabola_settings = ${JSON.stringify(parabolaSettings)};`;
|
||||||
const siteOrigin = Astro.site?.origin ?? "https://familyfed.ie";
|
const siteOrigin = Astro.site?.origin ?? "https://familyfed.ie";
|
||||||
const absoluteUrl = (value) => value ? new URL(value, siteOrigin).toString() : undefined;
|
const absoluteUrl = (value) => value ? new URL(value, siteOrigin).toString() : undefined;
|
||||||
const canonicalUrl = absoluteUrl(canonical ?? pathname);
|
const canonicalUrl = absoluteUrl(stripHtmlExtensionFromInternalUrl(canonical ?? pathname));
|
||||||
const imageUrl = absoluteUrl(image);
|
const imageUrl = absoluteUrl(image);
|
||||||
const plausibleDomain = import.meta.env.PUBLIC_PLAUSIBLE_DOMAIN ?? "";
|
const plausibleDomain = import.meta.env.PUBLIC_PLAUSIBLE_DOMAIN ?? "";
|
||||||
const plausibleScriptSrc = import.meta.env.PUBLIC_PLAUSIBLE_SCRIPT_SRC ?? "https://plausible.io/js/script.js";
|
const plausibleScriptSrc = import.meta.env.PUBLIC_PLAUSIBLE_SCRIPT_SRC ?? "https://plausible.io/js/script.js";
|
||||||
|
|
@ -67,7 +68,7 @@ const metaTitle = title
|
||||||
<div id="branding" role="banner">
|
<div id="branding" role="banner">
|
||||||
<img id="bg_image" alt="Family Federation for World Peace and Unification Ireland" src="/assets/uploads/2013/10/BannerFamilyFed_23_10c1.jpg" />
|
<img id="bg_image" alt="Family Federation for World Peace and Unification Ireland" src="/assets/uploads/2013/10/BannerFamilyFed_23_10c1.jpg" />
|
||||||
<div id="header-container">
|
<div id="header-container">
|
||||||
<a href="/index.html" id="linky" aria-label="FFWPU Ireland home page"></a>
|
<a href="/index" id="linky" aria-label="FFWPU Ireland home page"></a>
|
||||||
</div>
|
</div>
|
||||||
<div style="clear:both;"></div>
|
<div style="clear:both;"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -2,25 +2,25 @@
|
||||||
const { pathname = "/" } = Astro.props;
|
const { pathname = "/" } = Astro.props;
|
||||||
|
|
||||||
const navItems = [
|
const navItems = [
|
||||||
{ href: "/index.html", label: "Home", match: ["/index.html", "/"] },
|
{ href: "/index", label: "Home", match: ["/index", "/"] },
|
||||||
{
|
{
|
||||||
href: "/about.html",
|
href: "/about",
|
||||||
label: "About Us",
|
label: "About Us",
|
||||||
match: ["/about.html", "/the-founders.html", "/about-us-organizations.html"],
|
match: ["/about", "/the-founders", "/about-us-organizations"],
|
||||||
children: [
|
children: [
|
||||||
{ href: "/the-founders.html", label: "The Founders" },
|
{ href: "/the-founders", label: "The Founders" },
|
||||||
{ href: "/about-us-organizations.html", label: "Organizations" },
|
{ href: "/about-us-organizations", label: "Organizations" },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{ href: "/videos.html", label: "Videos", match: ["/videos.html"] },
|
{ href: "/videos", label: "Videos", match: ["/videos"] },
|
||||||
{
|
{
|
||||||
href: "/events.html",
|
href: "/events",
|
||||||
label: "Events",
|
label: "Events",
|
||||||
match: ["/events.html", "/services.html"],
|
match: ["/events", "/services"],
|
||||||
children: [{ href: "/services.html", label: "Sunday Services" }],
|
children: [{ href: "/services", label: "Sunday Services" }],
|
||||||
},
|
},
|
||||||
{ href: "/speeches/", label: "Speeches", match: ["/speeches/"] },
|
{ href: "/speeches/", label: "Speeches", match: ["/speeches/"] },
|
||||||
{ href: "/contact.html", label: "Contact", match: ["/contact.html"] },
|
{ href: "/contact", label: "Contact", match: ["/contact"] },
|
||||||
];
|
];
|
||||||
|
|
||||||
function isCurrent(item) {
|
function isCurrent(item) {
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
---
|
---
|
||||||
const sidebarItems = [
|
const sidebarItems = [
|
||||||
{ href: "/the-founders.html", label: "The Founders" },
|
{ href: "/the-founders", label: "The Founders" },
|
||||||
{ href: "/services.html", label: "Sunday Services" },
|
{ href: "/services", label: "Sunday Services" },
|
||||||
{ href: "/contact.html", label: "Contact" },
|
{ href: "/contact", label: "Contact" },
|
||||||
{ href: "/speeches/", label: "Speeches" },
|
{ href: "/speeches/", label: "Speeches" },
|
||||||
];
|
];
|
||||||
---
|
---
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
---
|
---
|
||||||
import SiteSidebar from "./SiteSidebar.astro";
|
import SiteSidebar from "./SiteSidebar.astro";
|
||||||
|
import { normalizeInternalHtmlLinks } from "../lib/urls";
|
||||||
|
|
||||||
const { articleHtml } = Astro.props;
|
const { articleHtml } = Astro.props;
|
||||||
|
const normalizedArticleHtml = normalizeInternalHtmlLinks(articleHtml);
|
||||||
---
|
---
|
||||||
|
|
||||||
<div id="main">
|
<div id="main">
|
||||||
|
|
@ -10,7 +12,7 @@ const { articleHtml } = Astro.props;
|
||||||
|
|
||||||
<section id="container" class="two-columns-right">
|
<section id="container" class="two-columns-right">
|
||||||
<div id="content" role="main">
|
<div id="content" role="main">
|
||||||
<Fragment set:html={articleHtml} />
|
<Fragment set:html={normalizedArticleHtml} />
|
||||||
</div>
|
</div>
|
||||||
<SiteSidebar />
|
<SiteSidebar />
|
||||||
</section>
|
</section>
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ export const recurringCalendarEvents: RecurringCalendarEvent[] = [
|
||||||
endTime: "12:00",
|
endTime: "12:00",
|
||||||
location: "19 North Great Georges St., Dublin 1, Ireland",
|
location: "19 North Great Georges St., Dublin 1, Ireland",
|
||||||
details: "Weekly Sunday Service video upload and community worship.",
|
details: "Weekly Sunday Service video upload and community worship.",
|
||||||
url: "/services.html",
|
url: "/services",
|
||||||
weekday: 0,
|
weekday: 0,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -122,13 +122,12 @@ export function speechCategorySlug(category: string): string {
|
||||||
|
|
||||||
export function categoryHref(entry: ArchiveEntry, category: string): string {
|
export function categoryHref(entry: ArchiveEntry, category: string): string {
|
||||||
if (entry.data.type === "speech") {
|
if (entry.data.type === "speech") {
|
||||||
return `/speeches/categories/${speechCategorySlug(category)}.html`;
|
return `/speeches/categories/${speechCategorySlug(category)}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
return `/blog/categories/${blogCategorySlug(category)}.html`;
|
return `/blog/categories/${blogCategorySlug(category)}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function tagHref(tag: string): string {
|
export function tagHref(tag: string): string {
|
||||||
return `/blog/tags/${blogTagSlug(tag)}.html`;
|
return `/blog/tags/${blogTagSlug(tag)}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
import fs from "node:fs";
|
import fs from "node:fs";
|
||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
|
import { stripHtmlExtensionFromInternalUrl } from "./urls";
|
||||||
|
|
||||||
const repoRoot = process.cwd();
|
const repoRoot = process.cwd();
|
||||||
const speechesRoot = path.join(repoRoot, "content", "speeches");
|
const speechesRoot = path.join(repoRoot, "content", "speeches");
|
||||||
|
|
@ -190,7 +191,7 @@ function itemFromFile(filePath: string): SpeechArchiveItem {
|
||||||
return {
|
return {
|
||||||
id: relativePath.replace(/\.md$/, ""),
|
id: relativePath.replace(/\.md$/, ""),
|
||||||
title,
|
title,
|
||||||
url: frontmatter.source ?? "#",
|
url: stripHtmlExtensionFromInternalUrl(frontmatter.source) ?? "#",
|
||||||
year,
|
year,
|
||||||
speaker,
|
speaker,
|
||||||
category,
|
category,
|
||||||
|
|
|
||||||
39
src/lib/urls.ts
Normal file
39
src/lib/urls.ts
Normal file
|
|
@ -0,0 +1,39 @@
|
||||||
|
const internalHosts = new Set(["familyfed.ie", "www.familyfed.ie", "familyfed.bcgen.ie"]);
|
||||||
|
const ignoredProtocolPattern = /^(?:mailto|tel|javascript|data|blob):/i;
|
||||||
|
|
||||||
|
function splitSuffix(value: string): { pathname: string; suffix: string } {
|
||||||
|
const match = value.match(/^([^?#]*)([?#].*)?$/);
|
||||||
|
return {
|
||||||
|
pathname: match?.[1] ?? value,
|
||||||
|
suffix: match?.[2] ?? "",
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function stripHtmlPath(pathname: string): string {
|
||||||
|
return pathname.replace(/\.html$/i, "");
|
||||||
|
}
|
||||||
|
|
||||||
|
export function stripHtmlExtensionFromInternalUrl<T extends string | undefined>(value: T): T {
|
||||||
|
if (!value || value.startsWith("#") || value.startsWith("?") || value.startsWith("//") || ignoredProtocolPattern.test(value)) {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
const absoluteMatch = value.match(/^(https?:\/\/([^/?#]+))([^?#]*)([?#].*)?$/i);
|
||||||
|
if (absoluteMatch) {
|
||||||
|
const [, origin, host, pathname = "", suffix = ""] = absoluteMatch;
|
||||||
|
if (!internalHosts.has(host.toLowerCase())) {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
return `${origin}${stripHtmlPath(pathname)}${suffix}` as T;
|
||||||
|
}
|
||||||
|
|
||||||
|
const { pathname, suffix } = splitSuffix(value);
|
||||||
|
return `${stripHtmlPath(pathname)}${suffix}` as T;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function normalizeInternalHtmlLinks(html = ""): string {
|
||||||
|
return html.replace(/\b(href|action)=(["'])(.*?)\2/gis, (_match, attr, quote, value) => {
|
||||||
|
return `${attr}=${quote}${stripHtmlExtensionFromInternalUrl(value)}${quote}`;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
@ -2,5 +2,4 @@
|
||||||
import LegacyRedirectPage from "../components/LegacyRedirectPage.astro";
|
import LegacyRedirectPage from "../components/LegacyRedirectPage.astro";
|
||||||
---
|
---
|
||||||
|
|
||||||
<LegacyRedirectPage title="2013 Sunday Services Archive - FFWPU Ireland" target="/archive-sunday-services-2013.html" />
|
<LegacyRedirectPage title="2013 Sunday Services Archive - FFWPU Ireland" target="/archive-sunday-services-2013" />
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,5 +2,4 @@
|
||||||
import LegacyRedirectPage from "../components/LegacyRedirectPage.astro";
|
import LegacyRedirectPage from "../components/LegacyRedirectPage.astro";
|
||||||
---
|
---
|
||||||
|
|
||||||
<LegacyRedirectPage title="2014 Sunday Services Archive - FFWPU Ireland" target="/archive-sunday-services-2014.html" />
|
<LegacyRedirectPage title="2014 Sunday Services Archive - FFWPU Ireland" target="/archive-sunday-services-2014" />
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,5 +2,4 @@
|
||||||
import LegacyRedirectPage from "../components/LegacyRedirectPage.astro";
|
import LegacyRedirectPage from "../components/LegacyRedirectPage.astro";
|
||||||
---
|
---
|
||||||
|
|
||||||
<LegacyRedirectPage title="2015 Sunday Services Archive - FFWPU Ireland" target="/archive-sunday-services-2015.html" />
|
<LegacyRedirectPage title="2015 Sunday Services Archive - FFWPU Ireland" target="/archive-sunday-services-2015" />
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,5 +2,4 @@
|
||||||
import LegacyRedirectPage from "../components/LegacyRedirectPage.astro";
|
import LegacyRedirectPage from "../components/LegacyRedirectPage.astro";
|
||||||
---
|
---
|
||||||
|
|
||||||
<LegacyRedirectPage title="2016 Sunday Services Archive - FFWPU Ireland" target="/archive-sunday-services-2016.html" />
|
<LegacyRedirectPage title="2016 Sunday Services Archive - FFWPU Ireland" target="/archive-sunday-services-2016" />
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,5 +2,4 @@
|
||||||
import LegacyRedirectPage from "../components/LegacyRedirectPage.astro";
|
import LegacyRedirectPage from "../components/LegacyRedirectPage.astro";
|
||||||
---
|
---
|
||||||
|
|
||||||
<LegacyRedirectPage title="2017 Sunday Services Archive - FFWPU Ireland" target="/archive-sunday-services-2017.html" />
|
<LegacyRedirectPage title="2017 Sunday Services Archive - FFWPU Ireland" target="/archive-sunday-services-2017" />
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,5 +2,4 @@
|
||||||
import LegacyRedirectPage from "../components/LegacyRedirectPage.astro";
|
import LegacyRedirectPage from "../components/LegacyRedirectPage.astro";
|
||||||
---
|
---
|
||||||
|
|
||||||
<LegacyRedirectPage title="2018 Sunday Services Archive - FFWPU Ireland" target="/archive-sunday-services-2018.html" />
|
<LegacyRedirectPage title="2018 Sunday Services Archive - FFWPU Ireland" target="/archive-sunday-services-2018" />
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
import fs from "node:fs/promises";
|
import fs from "node:fs/promises";
|
||||||
import { contentSourceRoutes } from "../lib/content-routes";
|
import { contentSourceRoutes } from "../lib/content-routes";
|
||||||
import { isMigratedHtmlPage, relativeWebsitePath, routeFromRelativePath, sourcePathFromRoute, walkHtmlFiles } from "../lib/static-pages";
|
import { isMigratedHtmlPage, relativeWebsitePath, routeFromRelativePath, sourcePathFromRoute, walkHtmlFiles } from "../lib/static-pages";
|
||||||
|
import { normalizeInternalHtmlLinks } from "../lib/urls";
|
||||||
|
|
||||||
export async function getStaticPaths() {
|
export async function getStaticPaths() {
|
||||||
const markdownRoutes = await contentSourceRoutes();
|
const markdownRoutes = await contentSourceRoutes();
|
||||||
|
|
@ -16,7 +17,7 @@ export async function getStaticPaths() {
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function GET({ params }: { params: { route?: string } }) {
|
export async function GET({ params }: { params: { route?: string } }) {
|
||||||
const html = await fs.readFile(sourcePathFromRoute(params.route), "utf8");
|
const html = normalizeInternalHtmlLinks(await fs.readFile(sourcePathFromRoute(params.route), "utf8"));
|
||||||
|
|
||||||
return new Response(html, {
|
return new Response(html, {
|
||||||
headers: {
|
headers: {
|
||||||
|
|
|
||||||
|
|
@ -10,9 +10,8 @@ const articleHtml = legacyPageArticle("about-us-organizations.html");
|
||||||
title="Organizations – FFWPU Ireland"
|
title="Organizations – FFWPU Ireland"
|
||||||
description="Explore organizations connected with Rev. Sun Myung Moon and Dr. Hak Ja Han Moon, including UPF, WFWP, IRFF, and the Unification Church."
|
description="Explore organizations connected with Rev. Sun Myung Moon and Dr. Hak Ja Han Moon, including UPF, WFWP, IRFF, and the Unification Church."
|
||||||
bodyClass="page-template page-template-templates page-template-template-twocolumns-right page-template-templatestemplate-twocolumns-right-php page page-id-124 page-child parent-pageid-29 custom-background tribe-no-js metaslider-plugin parabola-image-three caption-light meta-light parabola_triagles parabola-menu-left"
|
bodyClass="page-template page-template-templates page-template-template-twocolumns-right page-template-templatestemplate-twocolumns-right-php page page-id-124 page-child parent-pageid-29 custom-background tribe-no-js metaslider-plugin parabola-image-three caption-light meta-light parabola_triagles parabola-menu-left"
|
||||||
pathname="/about-us-organizations.html"
|
pathname="/about-us-organizations"
|
||||||
canonical="/about-us-organizations.html"
|
canonical="/about-us-organizations"
|
||||||
>
|
>
|
||||||
<TwoColumnPage articleHtml={articleHtml} />
|
<TwoColumnPage articleHtml={articleHtml} />
|
||||||
</SiteLayout>
|
</SiteLayout>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,8 @@ import articleHtml from "../content/pages/about.html?raw";
|
||||||
title="About Us – FFWPU Ireland"
|
title="About Us – FFWPU Ireland"
|
||||||
description="Learn about the Family Federation for World Peace and Unification in Ireland, its teachings, and its focus on God-centered families."
|
description="Learn about the Family Federation for World Peace and Unification in Ireland, its teachings, and its focus on God-centered families."
|
||||||
bodyClass="page-template page-template-templates page-template-template-twocolumns-right page-template-templatestemplate-twocolumns-right-php page page-id-29 page-parent custom-background tribe-no-js metaslider-plugin parabola-image-three caption-light meta-light parabola_triagles parabola-menu-left"
|
bodyClass="page-template page-template-templates page-template-template-twocolumns-right page-template-templatestemplate-twocolumns-right-php page page-id-29 page-parent custom-background tribe-no-js metaslider-plugin parabola-image-three caption-light meta-light parabola_triagles parabola-menu-left"
|
||||||
pathname="/about.html"
|
pathname="/about"
|
||||||
canonical="/about.html"
|
canonical="/about"
|
||||||
>
|
>
|
||||||
<TwoColumnPage articleHtml={articleHtml} />
|
<TwoColumnPage articleHtml={articleHtml} />
|
||||||
</SiteLayout>
|
</SiteLayout>
|
||||||
|
|
|
||||||
|
|
@ -837,7 +837,7 @@ const adminConfig = {
|
||||||
</div>
|
</div>
|
||||||
<div class="admin-field">
|
<div class="admin-field">
|
||||||
<label for="event-url">Details URL</label>
|
<label for="event-url">Details URL</label>
|
||||||
<input id="event-url" name="url" placeholder="/events.html" inputmode="url" />
|
<input id="event-url" name="url" placeholder="/events" inputmode="url" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="admin-field">
|
<div class="admin-field">
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ import { legacyPageArticle } from "../lib/legacy-page";
|
||||||
const articleHtml = legacyPageArticle("archive-sunday-services-2013.html");
|
const articleHtml = legacyPageArticle("archive-sunday-services-2013.html");
|
||||||
---
|
---
|
||||||
|
|
||||||
<SiteLayout title="2013 Sunday Service Archive – FFWPU Ireland" description="Archived FFWPU Ireland Sunday service videos from 2013." bodyClass="page-template-default page page-id-405 custom-background tribe-no-js metaslider-plugin parabola-image-three caption-light meta-light parabola_triagles parabola-menu-left" pathname="/archive-sunday-services-2013.html" canonical="/archive-sunday-services-2013.html">
|
<SiteLayout title="2013 Sunday Service Archive – FFWPU Ireland" description="Archived FFWPU Ireland Sunday service videos from 2013." bodyClass="page-template-default page page-id-405 custom-background tribe-no-js metaslider-plugin parabola-image-three caption-light meta-light parabola_triagles parabola-menu-left" pathname="/archive-sunday-services-2013" canonical="/archive-sunday-services-2013">
|
||||||
<TwoColumnPage articleHtml={articleHtml} />
|
<TwoColumnPage articleHtml={articleHtml} />
|
||||||
</SiteLayout>
|
</SiteLayout>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ import { legacyPageArticle } from "../lib/legacy-page";
|
||||||
const articleHtml = legacyPageArticle("archive-sunday-services-2014.html");
|
const articleHtml = legacyPageArticle("archive-sunday-services-2014.html");
|
||||||
---
|
---
|
||||||
|
|
||||||
<SiteLayout title="2014 Sunday Services – FFWPU Ireland" description="Archived FFWPU Ireland Sunday service videos from 2014." bodyClass="page-template-default page page-id-403 custom-background tribe-no-js metaslider-plugin parabola-image-three caption-light meta-light parabola_triagles parabola-menu-left" pathname="/archive-sunday-services-2014.html" canonical="/archive-sunday-services-2014.html">
|
<SiteLayout title="2014 Sunday Services – FFWPU Ireland" description="Archived FFWPU Ireland Sunday service videos from 2014." bodyClass="page-template-default page page-id-403 custom-background tribe-no-js metaslider-plugin parabola-image-three caption-light meta-light parabola_triagles parabola-menu-left" pathname="/archive-sunday-services-2014" canonical="/archive-sunday-services-2014">
|
||||||
<TwoColumnPage articleHtml={articleHtml} />
|
<TwoColumnPage articleHtml={articleHtml} />
|
||||||
</SiteLayout>
|
</SiteLayout>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ import { legacyPageArticle } from "../lib/legacy-page";
|
||||||
const articleHtml = legacyPageArticle("archive-sunday-services-2015.html");
|
const articleHtml = legacyPageArticle("archive-sunday-services-2015.html");
|
||||||
---
|
---
|
||||||
|
|
||||||
<SiteLayout title="2015 Sunday Services Archive – FFWPU Ireland" description="Archived FFWPU Ireland Sunday service videos from 2015." bodyClass="page-template-default page page-id-398 custom-background tribe-no-js metaslider-plugin parabola-image-three caption-light meta-light parabola_triagles parabola-menu-left" pathname="/archive-sunday-services-2015.html" canonical="/archive-sunday-services-2015.html">
|
<SiteLayout title="2015 Sunday Services Archive – FFWPU Ireland" description="Archived FFWPU Ireland Sunday service videos from 2015." bodyClass="page-template-default page page-id-398 custom-background tribe-no-js metaslider-plugin parabola-image-three caption-light meta-light parabola_triagles parabola-menu-left" pathname="/archive-sunday-services-2015" canonical="/archive-sunday-services-2015">
|
||||||
<TwoColumnPage articleHtml={articleHtml} />
|
<TwoColumnPage articleHtml={articleHtml} />
|
||||||
</SiteLayout>
|
</SiteLayout>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ import { legacyPageArticle } from "../lib/legacy-page";
|
||||||
const articleHtml = legacyPageArticle("archive-sunday-services-2016.html");
|
const articleHtml = legacyPageArticle("archive-sunday-services-2016.html");
|
||||||
---
|
---
|
||||||
|
|
||||||
<SiteLayout title="2016 Sunday Service Archive – FFWPU Ireland" description="Archived FFWPU Ireland Sunday service videos from 2016." bodyClass="page-template-default page page-id-396 custom-background tribe-no-js metaslider-plugin parabola-image-three caption-light meta-light parabola_triagles parabola-menu-left" pathname="/archive-sunday-services-2016.html" canonical="/archive-sunday-services-2016.html">
|
<SiteLayout title="2016 Sunday Service Archive – FFWPU Ireland" description="Archived FFWPU Ireland Sunday service videos from 2016." bodyClass="page-template-default page page-id-396 custom-background tribe-no-js metaslider-plugin parabola-image-three caption-light meta-light parabola_triagles parabola-menu-left" pathname="/archive-sunday-services-2016" canonical="/archive-sunday-services-2016">
|
||||||
<TwoColumnPage articleHtml={articleHtml} />
|
<TwoColumnPage articleHtml={articleHtml} />
|
||||||
</SiteLayout>
|
</SiteLayout>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ import { legacyPageArticle } from "../lib/legacy-page";
|
||||||
const articleHtml = legacyPageArticle("archive-sunday-services-2017.html");
|
const articleHtml = legacyPageArticle("archive-sunday-services-2017.html");
|
||||||
---
|
---
|
||||||
|
|
||||||
<SiteLayout title="2017 Sunday Service Archive – FFWPU Ireland" description="Archived FFWPU Ireland Sunday service videos from 2017." bodyClass="page-template-default page page-id-394 custom-background tribe-no-js metaslider-plugin parabola-image-three caption-light meta-light parabola_triagles parabola-menu-left" pathname="/archive-sunday-services-2017.html" canonical="/archive-sunday-services-2017.html">
|
<SiteLayout title="2017 Sunday Service Archive – FFWPU Ireland" description="Archived FFWPU Ireland Sunday service videos from 2017." bodyClass="page-template-default page page-id-394 custom-background tribe-no-js metaslider-plugin parabola-image-three caption-light meta-light parabola_triagles parabola-menu-left" pathname="/archive-sunday-services-2017" canonical="/archive-sunday-services-2017">
|
||||||
<TwoColumnPage articleHtml={articleHtml} />
|
<TwoColumnPage articleHtml={articleHtml} />
|
||||||
</SiteLayout>
|
</SiteLayout>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ import { legacyPageArticle } from "../lib/legacy-page";
|
||||||
const articleHtml = legacyPageArticle("archive-sunday-services-2018.html");
|
const articleHtml = legacyPageArticle("archive-sunday-services-2018.html");
|
||||||
---
|
---
|
||||||
|
|
||||||
<SiteLayout title="2018 Sunday Service Archive – FFWPU Ireland" description="Archived FFWPU Ireland Sunday service videos from 2018." bodyClass="page-template-default page page-id-390 custom-background tribe-no-js metaslider-plugin parabola-image-three caption-light meta-light parabola_triagles parabola-menu-left" pathname="/archive-sunday-services-2018.html" canonical="/archive-sunday-services-2018.html">
|
<SiteLayout title="2018 Sunday Service Archive – FFWPU Ireland" description="Archived FFWPU Ireland Sunday service videos from 2018." bodyClass="page-template-default page page-id-390 custom-background tribe-no-js metaslider-plugin parabola-image-three caption-light meta-light parabola_triagles parabola-menu-left" pathname="/archive-sunday-services-2018" canonical="/archive-sunday-services-2018">
|
||||||
<TwoColumnPage articleHtml={articleHtml} />
|
<TwoColumnPage articleHtml={articleHtml} />
|
||||||
</SiteLayout>
|
</SiteLayout>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,4 +13,4 @@ export function getStaticPaths() {
|
||||||
const { year } = Astro.props;
|
const { year } = Astro.props;
|
||||||
---
|
---
|
||||||
|
|
||||||
<LegacyRedirectPage title={`${year} Sunday Services Archive - FFWPU Ireland`} target={`/archive-sunday-services-${year}.html`} />
|
<LegacyRedirectPage title={`${year} Sunday Services Archive - FFWPU Ireland`} target={`/archive-sunday-services-${year}`} />
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ import { getCollection, render } from "astro:content";
|
||||||
import SiteLayout from "../../../../../components/SiteLayout.astro";
|
import SiteLayout from "../../../../../components/SiteLayout.astro";
|
||||||
import SiteSidebar from "../../../../../components/SiteSidebar.astro";
|
import SiteSidebar from "../../../../../components/SiteSidebar.astro";
|
||||||
import { parseBlogSource } from "../../../../../lib/content-routes";
|
import { parseBlogSource } from "../../../../../lib/content-routes";
|
||||||
|
import { stripHtmlExtensionFromInternalUrl } from "../../../../../lib/urls";
|
||||||
|
|
||||||
const bodyClass =
|
const bodyClass =
|
||||||
"post-template-default single single-post single-format-standard custom-background tribe-no-js metaslider-plugin parabola-image-three caption-light meta-light parabola_triagles parabola-menu-left";
|
"post-template-default single single-post single-format-standard custom-background tribe-no-js metaslider-plugin parabola-image-three caption-light meta-light parabola_triagles parabola-menu-left";
|
||||||
|
|
@ -59,18 +60,18 @@ function descriptionFromHtml(value: string, fallbackTitle: string): string {
|
||||||
function categoryHref(entry, category: string): string {
|
function categoryHref(entry, category: string): string {
|
||||||
if (entry.data.type === "speech") {
|
if (entry.data.type === "speech") {
|
||||||
if (entry.data.speechCollection === "mrs-hak-ja-han-moon" || category.includes("Mrs. Hak Ja Han Moon")) {
|
if (entry.data.speechCollection === "mrs-hak-ja-han-moon" || category.includes("Mrs. Hak Ja Han Moon")) {
|
||||||
return "/speeches/categories/mrs-hak-ja-han-moon.html";
|
return "/speeches/categories/mrs-hak-ja-han-moon";
|
||||||
}
|
}
|
||||||
|
|
||||||
const year = entry.data.speechYear ?? category.match(/(\d{4})$/)?.[1];
|
const year = entry.data.speechYear ?? category.match(/(\d{4})$/)?.[1];
|
||||||
if (year === "1956") {
|
if (year === "1956") {
|
||||||
return "/speeches/categories/rev-sun-myung-moon.html";
|
return "/speeches/categories/rev-sun-myung-moon";
|
||||||
}
|
}
|
||||||
|
|
||||||
return year ? `/speeches/categories/rev-sun-myung-moon-${year}.html` : "/speeches/categories/rev-sun-myung-moon.html";
|
return year ? `/speeches/categories/rev-sun-myung-moon-${year}` : "/speeches/categories/rev-sun-myung-moon";
|
||||||
}
|
}
|
||||||
|
|
||||||
return `/blog/categories/${slugify(category)}.html`;
|
return `/blog/categories/${slugify(category)}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getStaticPaths() {
|
export async function getStaticPaths() {
|
||||||
|
|
@ -114,7 +115,7 @@ const publishedDate = formatDate(entry.data.published);
|
||||||
const updatedDate = formatDate(entry.data.updated);
|
const updatedDate = formatDate(entry.data.updated);
|
||||||
const categories = entry.data.categories ?? [];
|
const categories = entry.data.categories ?? [];
|
||||||
const tags = entry.data.tags ?? [];
|
const tags = entry.data.tags ?? [];
|
||||||
const canonical = entry.data.source;
|
const canonical = stripHtmlExtensionFromInternalUrl(entry.data.source);
|
||||||
const pdfHref = canonical ? `${canonical}?print=pdf` : undefined;
|
const pdfHref = canonical ? `${canonical}?print=pdf` : undefined;
|
||||||
const description = descriptionFromHtml(entry.body ?? "", title);
|
const description = descriptionFromHtml(entry.body ?? "", title);
|
||||||
---
|
---
|
||||||
|
|
@ -184,7 +185,7 @@ const description = descriptionFromHtml(entry.body ?? "", title);
|
||||||
<span class="bl_posted">Tagged</span> {" "}
|
<span class="bl_posted">Tagged</span> {" "}
|
||||||
{tags.map((tag, index) => (
|
{tags.map((tag, index) => (
|
||||||
<>
|
<>
|
||||||
<a href={`/blog/tags/${slugify(tag)}.html`} rel="tag">{tag}</a>
|
<a href={`/blog/tags/${slugify(tag)}`} rel="tag">{tag}</a>
|
||||||
{index < tags.length - 1 ? ", " : "."}
|
{index < tags.length - 1 ? ", " : "."}
|
||||||
</>
|
</>
|
||||||
))}
|
))}
|
||||||
|
|
@ -204,14 +205,14 @@ const description = descriptionFromHtml(entry.body ?? "", title);
|
||||||
<div id="nav-below" class="navigation">
|
<div id="nav-below" class="navigation">
|
||||||
{previous?.entry.data.source && (
|
{previous?.entry.data.source && (
|
||||||
<div class="nav-previous">
|
<div class="nav-previous">
|
||||||
<a href={previous.entry.data.source} rel="prev">
|
<a href={stripHtmlExtensionFromInternalUrl(previous.entry.data.source)} rel="prev">
|
||||||
<span class="meta-nav">«</span> {previous.entry.data.title ?? "Previous"}
|
<span class="meta-nav">«</span> {previous.entry.data.title ?? "Previous"}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{next?.entry.data.source && (
|
{next?.entry.data.source && (
|
||||||
<div class="nav-next">
|
<div class="nav-next">
|
||||||
<a href={next.entry.data.source} rel="next">
|
<a href={stripHtmlExtensionFromInternalUrl(next.entry.data.source)} rel="next">
|
||||||
{next.entry.data.title ?? "Next"} <span class="meta-nav">»</span>
|
{next.entry.data.title ?? "Next"} <span class="meta-nav">»</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,6 @@ const { category, entries } = Astro.props;
|
||||||
title={`Category: ${category}`}
|
title={`Category: ${category}`}
|
||||||
heading={`Category: <span>${category}</span>`}
|
heading={`Category: <span>${category}</span>`}
|
||||||
description={`Browse FFWPU Ireland blog posts in the ${category} category.`}
|
description={`Browse FFWPU Ireland blog posts in the ${category} category.`}
|
||||||
pathname={`/blog/categories/${blogCategorySlug(category)}.html`}
|
pathname={`/blog/categories/${blogCategorySlug(category)}`}
|
||||||
entries={entries}
|
entries={entries}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,6 @@ const entries = await getArchiveEntries("blog");
|
||||||
title="Blog"
|
title="Blog"
|
||||||
heading="Blog"
|
heading="Blog"
|
||||||
description="Browse FFWPU Ireland blog posts, announcements, event notes, and news."
|
description="Browse FFWPU Ireland blog posts, announcements, event notes, and news."
|
||||||
pathname="/blog.html"
|
pathname="/blog"
|
||||||
entries={entries}
|
entries={entries}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,6 @@ const { tag, entries } = Astro.props;
|
||||||
title={`Tag: ${tag}`}
|
title={`Tag: ${tag}`}
|
||||||
heading={`Tag: <span>${tag}</span>`}
|
heading={`Tag: <span>${tag}</span>`}
|
||||||
description={`Browse FFWPU Ireland blog posts tagged ${tag}.`}
|
description={`Browse FFWPU Ireland blog posts tagged ${tag}.`}
|
||||||
pathname={`/blog/tags/${blogTagSlug(tag)}.html`}
|
pathname={`/blog/tags/${blogTagSlug(tag)}`}
|
||||||
entries={entries}
|
entries={entries}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,8 +31,8 @@ const contactArticleHtml = articleHtml
|
||||||
title="Contact – FFWPU Ireland"
|
title="Contact – FFWPU Ireland"
|
||||||
description="Contact FFWPU Ireland at Unity House in Dublin city centre or email the community with questions, appointments, and event enquiries."
|
description="Contact FFWPU Ireland at Unity House in Dublin city centre or email the community with questions, appointments, and event enquiries."
|
||||||
bodyClass="page-template-default page page-id-63 custom-background tribe-no-js metaslider-plugin parabola-image-three caption-light meta-light parabola_triagles parabola-menu-left"
|
bodyClass="page-template-default page page-id-63 custom-background tribe-no-js metaslider-plugin parabola-image-three caption-light meta-light parabola_triagles parabola-menu-left"
|
||||||
pathname="/contact.html"
|
pathname="/contact"
|
||||||
canonical="/contact.html"
|
canonical="/contact"
|
||||||
>
|
>
|
||||||
<TwoColumnPage articleHtml={contactArticleHtml} />
|
<TwoColumnPage articleHtml={contactArticleHtml} />
|
||||||
<script is:inline slot="scripts" define:vars={{ contactFormConfig }}>
|
<script is:inline slot="scripts" define:vars={{ contactFormConfig }}>
|
||||||
|
|
|
||||||
|
|
@ -2,16 +2,19 @@
|
||||||
import SiteLayout from "../components/SiteLayout.astro";
|
import SiteLayout from "../components/SiteLayout.astro";
|
||||||
import mainHtml from "../content/pages/events.html?raw";
|
import mainHtml from "../content/pages/events.html?raw";
|
||||||
import { calendarEvents, recurringCalendarEvents } from "../data/events";
|
import { calendarEvents, recurringCalendarEvents } from "../data/events";
|
||||||
|
import { normalizeInternalHtmlLinks } from "../lib/urls";
|
||||||
|
|
||||||
|
const normalizedMainHtml = normalizeInternalHtmlLinks(mainHtml);
|
||||||
---
|
---
|
||||||
|
|
||||||
<SiteLayout
|
<SiteLayout
|
||||||
title="Upcoming Events – FFWPU Ireland"
|
title="Upcoming Events – FFWPU Ireland"
|
||||||
description="See upcoming FFWPU Ireland community events and calendar listings."
|
description="See upcoming FFWPU Ireland community events and calendar listings."
|
||||||
bodyClass="archive post-type-archive post-type-archive-tribe_events custom-background metaslider-plugin parabola-image-three caption-light meta-light parabola_triagles parabola-menu-left"
|
bodyClass="archive post-type-archive post-type-archive-tribe_events custom-background metaslider-plugin parabola-image-three caption-light meta-light parabola_triagles parabola-menu-left"
|
||||||
pathname="/events.html"
|
pathname="/events"
|
||||||
canonical="/events.html"
|
canonical="/events"
|
||||||
>
|
>
|
||||||
<Fragment set:html={mainHtml} />
|
<Fragment set:html={normalizedMainHtml} />
|
||||||
<script is:inline slot="scripts" define:vars={{ calendarEvents, recurringCalendarEvents }}>
|
<script is:inline slot="scripts" define:vars={{ calendarEvents, recurringCalendarEvents }}>
|
||||||
(() => {
|
(() => {
|
||||||
const calendar = document.querySelector("[data-calendar]");
|
const calendar = document.querySelector("[data-calendar]");
|
||||||
|
|
@ -224,7 +227,7 @@ import { calendarEvents, recurringCalendarEvents } from "../data/events";
|
||||||
details.textContent = event.details;
|
details.textContent = event.details;
|
||||||
|
|
||||||
const link = document.createElement("a");
|
const link = document.createElement("a");
|
||||||
link.href = event.url || "/events.html";
|
link.href = event.url || "/events";
|
||||||
link.textContent = event.url ? "More details" : "Events";
|
link.textContent = event.url ? "More details" : "Events";
|
||||||
|
|
||||||
item.append(date, heading, time, location, details, link);
|
item.append(date, heading, time, location, details, link);
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,21 @@
|
||||||
---
|
---
|
||||||
import SiteLayout from "../components/SiteLayout.astro";
|
import SiteLayout from "../components/SiteLayout.astro";
|
||||||
import mainHtml from "../content/pages/index.html?raw";
|
import mainHtml from "../content/pages/index.html?raw";
|
||||||
|
import { normalizeInternalHtmlLinks } from "../lib/urls";
|
||||||
|
|
||||||
|
const normalizedMainHtml = normalizeInternalHtmlLinks(mainHtml);
|
||||||
---
|
---
|
||||||
|
|
||||||
<SiteLayout
|
<SiteLayout
|
||||||
title="FFWPU Ireland – Official website of FFWPU Ireland"
|
title="FFWPU Ireland – Official website of FFWPU Ireland"
|
||||||
description="Official website of FFWPU Ireland, sharing teachings, activities, videos, Sunday services, and resources for families in Ireland."
|
description="Official website of FFWPU Ireland, sharing teachings, activities, videos, Sunday services, and resources for families in Ireland."
|
||||||
bodyClass="home blog custom-background tribe-no-js metaslider-plugin parabola-image-three caption-light meta-light parabola_triagles magazine-layout parabola-menu-left"
|
bodyClass="home blog custom-background tribe-no-js metaslider-plugin parabola-image-three caption-light meta-light parabola_triagles magazine-layout parabola-menu-left"
|
||||||
pathname="/index.html"
|
pathname="/index"
|
||||||
canonical="/index.html"
|
canonical="/index"
|
||||||
parabolaSettings={{ masonry: "1", magazine: "1", mobile: "1", fitvids: "1" }}
|
parabolaSettings={{ masonry: "1", magazine: "1", mobile: "1", fitvids: "1" }}
|
||||||
>
|
>
|
||||||
<script is:inline slot="head" type="text/javascript" src="/assets/theme/parabola/js/nivo-slider.js?ver=2.4.1" id="parabola-nivoSlider-js"></script>
|
<script is:inline slot="head" type="text/javascript" src="/assets/theme/parabola/js/nivo-slider.js?ver=2.4.1" id="parabola-nivoSlider-js"></script>
|
||||||
<Fragment set:html={mainHtml} />
|
<Fragment set:html={normalizedMainHtml} />
|
||||||
<Fragment slot="scripts">
|
<Fragment slot="scripts">
|
||||||
<script is:inline type="text/javascript" src="/assets/vendor/imagesloaded.min.js?ver=5.0.0" id="imagesloaded-js"></script>
|
<script is:inline type="text/javascript" src="/assets/vendor/imagesloaded.min.js?ver=5.0.0" id="imagesloaded-js"></script>
|
||||||
<script is:inline type="text/javascript" src="/assets/vendor/masonry.min.js?ver=4.2.2" id="masonry-js"></script>
|
<script is:inline type="text/javascript" src="/assets/vendor/masonry.min.js?ver=4.2.2" id="masonry-js"></script>
|
||||||
|
|
|
||||||
|
|
@ -10,11 +10,10 @@ const articleHtml = legacyPageArticle("register.html");
|
||||||
title="Marriage Blessing Celebration – FFWPU Ireland"
|
title="Marriage Blessing Celebration – FFWPU Ireland"
|
||||||
description="Marriage Blessing Celebration event details and registration information from FFWPU Ireland."
|
description="Marriage Blessing Celebration event details and registration information from FFWPU Ireland."
|
||||||
bodyClass="page-template-default page page-id-2522 custom-background tribe-no-js metaslider-plugin parabola-image-three caption-light meta-light parabola_triagles parabola-menu-left"
|
bodyClass="page-template-default page page-id-2522 custom-background tribe-no-js metaslider-plugin parabola-image-three caption-light meta-light parabola_triagles parabola-menu-left"
|
||||||
pathname="/register.html"
|
pathname="/register"
|
||||||
canonical="/register.html"
|
canonical="/register"
|
||||||
>
|
>
|
||||||
<link slot="head" rel="stylesheet" href="/assets/vendor/forms/public/assets/css/visual-form-builder.min.css?ver=3.0.9" type="text/css" media="all" />
|
<link slot="head" rel="stylesheet" href="/assets/vendor/forms/public/assets/css/visual-form-builder.min.css?ver=3.0.9" type="text/css" media="all" />
|
||||||
<link slot="head" rel="stylesheet" href="/assets/vendor/forms/public/assets/css/smoothness/jquery-ui-1.10.3.min.css?ver=3.0.9" type="text/css" media="all" />
|
<link slot="head" rel="stylesheet" href="/assets/vendor/forms/public/assets/css/smoothness/jquery-ui-1.10.3.min.css?ver=3.0.9" type="text/css" media="all" />
|
||||||
<TwoColumnPage articleHtml={articleHtml} />
|
<TwoColumnPage articleHtml={articleHtml} />
|
||||||
</SiteLayout>
|
</SiteLayout>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,8 @@ import articleHtml from "../content/pages/services.html?raw";
|
||||||
title="Sunday Services – FFWPU Ireland"
|
title="Sunday Services – FFWPU Ireland"
|
||||||
description="Find FFWPU Ireland Sunday service videos and archived Sunday service messages from the Dublin community."
|
description="Find FFWPU Ireland Sunday service videos and archived Sunday service messages from the Dublin community."
|
||||||
bodyClass="page-template-default page page-id-33 custom-background tribe-no-js metaslider-plugin parabola-image-three caption-light meta-light parabola_triagles parabola-menu-left"
|
bodyClass="page-template-default page page-id-33 custom-background tribe-no-js metaslider-plugin parabola-image-three caption-light meta-light parabola_triagles parabola-menu-left"
|
||||||
pathname="/services.html"
|
pathname="/services"
|
||||||
canonical="/services.html"
|
canonical="/services"
|
||||||
>
|
>
|
||||||
<TwoColumnPage articleHtml={articleHtml} />
|
<TwoColumnPage articleHtml={articleHtml} />
|
||||||
</SiteLayout>
|
</SiteLayout>
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ function pageSlug(baseSlug, page) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function pageHref(baseSlug) {
|
function pageHref(baseSlug) {
|
||||||
return (page) => `/speeches/categories/${pageSlug(baseSlug, page)}.html`;
|
return (page) => `/speeches/categories/${pageSlug(baseSlug, page)}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getStaticPaths() {
|
export async function getStaticPaths() {
|
||||||
|
|
@ -45,7 +45,7 @@ const title = `Category: ${category}`;
|
||||||
title={title}
|
title={title}
|
||||||
heading={`Category: <span>${category}</span>`}
|
heading={`Category: <span>${category}</span>`}
|
||||||
description={`Browse FFWPU Ireland speeches in ${category}.`}
|
description={`Browse FFWPU Ireland speeches in ${category}.`}
|
||||||
pathname={`/speeches/categories/${pageSlug(baseSlug, currentPage)}.html`}
|
pathname={`/speeches/categories/${pageSlug(baseSlug, currentPage)}`}
|
||||||
entries={entries}
|
entries={entries}
|
||||||
currentPage={currentPage}
|
currentPage={currentPage}
|
||||||
totalPages={totalPages}
|
totalPages={totalPages}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
---
|
---
|
||||||
import SiteLayout from "../../../components/SiteLayout.astro";
|
import SiteLayout from "../../../components/SiteLayout.astro";
|
||||||
import { excerptFromBody, getArchiveEntries, uniqueSorted } from "../../../lib/archive";
|
import { excerptFromBody, getArchiveEntries, uniqueSorted } from "../../../lib/archive";
|
||||||
|
import { stripHtmlExtensionFromInternalUrl } from "../../../lib/urls";
|
||||||
|
|
||||||
export async function getStaticPaths() {
|
export async function getStaticPaths() {
|
||||||
const entries = await getArchiveEntries("speech");
|
const entries = await getArchiveEntries("speech");
|
||||||
|
|
@ -22,8 +23,8 @@ const { year, entries } = Astro.props;
|
||||||
title={`Speeches by Rev. Dr. Sun Myung Moon ${year} – FFWPU Ireland`}
|
title={`Speeches by Rev. Dr. Sun Myung Moon ${year} – FFWPU Ireland`}
|
||||||
description={`Browse FFWPU Ireland speech archive entries from ${year}.`}
|
description={`Browse FFWPU Ireland speech archive entries from ${year}.`}
|
||||||
bodyClass="page-template-default page custom-background tribe-no-js metaslider-plugin parabola-image-three caption-light meta-light parabola_triagles parabola-menu-left"
|
bodyClass="page-template-default page custom-background tribe-no-js metaslider-plugin parabola-image-three caption-light meta-light parabola_triagles parabola-menu-left"
|
||||||
pathname={`/speeches/rev-dr-sun-myung-moon/${year}.html`}
|
pathname={`/speeches/rev-dr-sun-myung-moon/${year}`}
|
||||||
canonical={`/speeches/rev-dr-sun-myung-moon/${year}.html`}
|
canonical={`/speeches/rev-dr-sun-myung-moon/${year}`}
|
||||||
>
|
>
|
||||||
<div id="main">
|
<div id="main">
|
||||||
<div id="forbottom">
|
<div id="forbottom">
|
||||||
|
|
@ -38,7 +39,7 @@ const { year, entries } = Astro.props;
|
||||||
{
|
{
|
||||||
entries.map((entry) => (
|
entries.map((entry) => (
|
||||||
<li>
|
<li>
|
||||||
<a href={entry.data.source}>{entry.data.title ?? "Untitled"}</a>
|
<a href={stripHtmlExtensionFromInternalUrl(entry.data.source)}>{entry.data.title ?? "Untitled"}</a>
|
||||||
<div class="post-excerpt">{excerptFromBody(entry.body, 150)}</div>
|
<div class="post-excerpt">{excerptFromBody(entry.body, 150)}</div>
|
||||||
</li>
|
</li>
|
||||||
))
|
))
|
||||||
|
|
@ -53,4 +54,3 @@ const { year, entries } = Astro.props;
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</SiteLayout>
|
</SiteLayout>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,8 @@ import articleHtml from "../content/pages/the-founders.html?raw";
|
||||||
title="The Founders – FFWPU Ireland"
|
title="The Founders – FFWPU Ireland"
|
||||||
description="Read about Rev. Sun Myung Moon and Dr. Hak Ja Han Moon, the founders of the Family Federation for World Peace and Unification."
|
description="Read about Rev. Sun Myung Moon and Dr. Hak Ja Han Moon, the founders of the Family Federation for World Peace and Unification."
|
||||||
bodyClass="page-template-default page page-id-71 custom-background tribe-no-js metaslider-plugin parabola-image-three caption-light meta-light parabola_triagles parabola-menu-left"
|
bodyClass="page-template-default page page-id-71 custom-background tribe-no-js metaslider-plugin parabola-image-three caption-light meta-light parabola_triagles parabola-menu-left"
|
||||||
pathname="/the-founders.html"
|
pathname="/the-founders"
|
||||||
canonical="/the-founders.html"
|
canonical="/the-founders"
|
||||||
>
|
>
|
||||||
<link slot="head" rel="stylesheet" id="su-shortcodes-css" href="/assets/vendor/shortcodes/includes/css/shortcodes.css?ver=7.3.1" type="text/css" media="all" />
|
<link slot="head" rel="stylesheet" id="su-shortcodes-css" href="/assets/vendor/shortcodes/includes/css/shortcodes.css?ver=7.3.1" type="text/css" media="all" />
|
||||||
<TwoColumnPage articleHtml={articleHtml} />
|
<TwoColumnPage articleHtml={articleHtml} />
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,8 @@ import articleHtml from "../content/pages/videos.html?raw";
|
||||||
title="Videos – FFWPU Ireland"
|
title="Videos – FFWPU Ireland"
|
||||||
description="Watch FFWPU Ireland videos on faith, family, the Divine Principle, Rev. Sun Myung Moon, and inspirational teaching resources."
|
description="Watch FFWPU Ireland videos on faith, family, the Divine Principle, Rev. Sun Myung Moon, and inspirational teaching resources."
|
||||||
bodyClass="page-template-default page page-id-44 custom-background tribe-no-js metaslider-plugin parabola-image-three caption-light meta-light parabola_triagles parabola-menu-left"
|
bodyClass="page-template-default page page-id-44 custom-background tribe-no-js metaslider-plugin parabola-image-three caption-light meta-light parabola_triagles parabola-menu-left"
|
||||||
pathname="/videos.html"
|
pathname="/videos"
|
||||||
canonical="/videos.html"
|
canonical="/videos"
|
||||||
>
|
>
|
||||||
<TwoColumnPage articleHtml={articleHtml} />
|
<TwoColumnPage articleHtml={articleHtml} />
|
||||||
</SiteLayout>
|
</SiteLayout>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue