diff --git a/adminSiteServer/mockSiteRouter.tsx b/adminSiteServer/mockSiteRouter.tsx index 647c97a3d8..6cf086bf5c 100644 --- a/adminSiteServer/mockSiteRouter.tsx +++ b/adminSiteServer/mockSiteRouter.tsx @@ -70,8 +70,10 @@ import { getPlainRouteNonIdempotentWithRWTransaction, getPlainRouteWithROTransaction, } from "./plainRouterHelpers.js" -import { DEFAULT_LOCAL_BAKE_DIR } from "../site/SiteConstants.js" -import { DATA_INSIGHTS_ATOM_FEED_NAME } from "../site/gdocs/utils.js" +import { + DEFAULT_LOCAL_BAKE_DIR, + DATA_INSIGHTS_ATOM_FEED_NAME, +} from "../site/SiteConstants.js" import { renderMultiDimDataPageBySlug } from "../baker/MultiDimBaker.js" import { KnexReadonlyTransaction, diff --git a/baker/SiteBaker.tsx b/baker/SiteBaker.tsx index e9641a3cfa..6612688ead 100644 --- a/baker/SiteBaker.tsx +++ b/baker/SiteBaker.tsx @@ -109,7 +109,7 @@ import { } from "../db/model/Gdoc/GdocFactory.js" import { getBakePath } from "@ourworldindata/components" import { GdocAuthor, getMinimalAuthors } from "../db/model/Gdoc/GdocAuthor.js" -import { DATA_INSIGHTS_ATOM_FEED_NAME } from "../site/gdocs/utils.js" +import { DATA_INSIGHTS_ATOM_FEED_NAME } from "../site/SiteConstants.js" import { getRedirectsFromDb } from "../db/model/Redirect.js" import { getTombstones } from "../db/model/GdocTombstone.js" import { bakeAllMultiDimDataPages } from "./MultiDimBaker.js" diff --git a/site/DataInsightsIndexPage.tsx b/site/DataInsightsIndexPage.tsx index bc5e3c10ad..1c77a98247 100644 --- a/site/DataInsightsIndexPage.tsx +++ b/site/DataInsightsIndexPage.tsx @@ -11,7 +11,7 @@ import { DataInsightsIndexPageContent, _OWID_DATA_INSIGHTS_INDEX_PAGE_DATA, } from "./DataInsightsIndexPageContent.js" -import { DATA_INSIGHT_ATOM_FEED_PROPS } from "./gdocs/utils.js" +import { DATA_INSIGHT_ATOM_FEED_PROPS } from "./SiteConstants.js" import { DebugProvider } from "./gdocs/DebugContext.js" import { Html } from "./Html.js" diff --git a/site/SiteConstants.ts b/site/SiteConstants.ts index 47dbc3d851..89713063a7 100644 --- a/site/SiteConstants.ts +++ b/site/SiteConstants.ts @@ -1,3 +1,13 @@ +import { faRss } from "@fortawesome/free-solid-svg-icons" +import { + faXTwitter, + faFacebookSquare, + faInstagram, + faThreads, + faLinkedin, + faBluesky, +} from "@fortawesome/free-brands-svg-icons" + // See https://cdnjs.cloudflare.com/polyfill/ for a list of all supported features const polyfillFeatures = [ "es2019", // Array.flat, Array.flatMap, Object.fromEntries, ... @@ -24,8 +34,61 @@ export const SMALL_BREAKPOINT_MEDIA_QUERY = "(max-width: 768px)" export const TOUCH_DEVICE_MEDIA_QUERY = "(hover: none), (pointer: coarse), (pointer: none)" +export const DATA_INSIGHTS_ATOM_FEED_NAME = "atom-data-insights.xml" + +export const DATA_INSIGHT_ATOM_FEED_PROPS = { + title: "Atom feed for Daily Data Insights", + href: `https://ourworldindata.org/${DATA_INSIGHTS_ATOM_FEED_NAME}`, +} + export const DEFAULT_TOMBSTONE_REASON = "Our World in Data is designed to be an evergreen publication. This " + "means that when a page cannot be updated due to outdated data or " + "missing information, we prefer to remove it rather than present " + "incomplete or inaccurate research and data to our readers." + +export const SOCIALS = [ + { + title: "X", + url: "https://x.com/ourworldindata", + icon: faXTwitter, + }, + { + title: "Instagram", + url: "https://www.instagram.com/ourworldindata/", + icon: faInstagram, + }, + { + title: "Threads", + url: "https://www.threads.net/@ourworldindata", + icon: faThreads, + }, + { + title: "Facebook", + url: "https://facebook.com/ourworldindata", + icon: faFacebookSquare, + }, + { + title: "LinkedIn", + url: "https://www.linkedin.com/company/ourworldindata", + icon: faLinkedin, + }, + { + title: "Bluesky", + url: "https://bsky.app/profile/ourworldindata.bsky.social", + icon: faBluesky, + }, +] + +export const RSS_FEEDS = [ + { + title: "Research & Writing RSS Feed", + url: "/atom.xml", + icon: faRss, + }, + { + title: "Daily Data Insights RSS Feed", + url: `/${DATA_INSIGHTS_ATOM_FEED_NAME}`, + icon: faRss, + }, +] diff --git a/site/SiteFooter.tsx b/site/SiteFooter.tsx index 27fd489358..e17488b26a 100644 --- a/site/SiteFooter.tsx +++ b/site/SiteFooter.tsx @@ -4,6 +4,7 @@ import { faAngleRight } from "@fortawesome/free-solid-svg-icons" import { SiteFooterContext } from "@ourworldindata/utils" import { viteAssetsForSite } from "./viteUtils.js" import { ScriptLoadErrorDetector } from "./NoJSDetector.js" +import { RSS_FEEDS, SOCIALS } from "./SiteConstants.js" interface SiteFooterProps { hideDonate?: boolean @@ -132,40 +133,16 @@ export const SiteFooter = (props: SiteFooterProps) => ( Data Catalog - -