From b395a5f335cdfcc0abb63dfe78eda86cae0d487d Mon Sep 17 00:00:00 2001 From: Helen Chong <119173961+helenclx@users.noreply.github.com> Date: Fri, 4 Oct 2024 20:32:02 +0800 Subject: [PATCH] Use sitemeta variables for blog feed metadata --- eleventy.config.js | 16 ++++++++-------- src/_data/sitemeta.js | 8 +------- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/eleventy.config.js b/eleventy.config.js index 43d24beb..8c0feb66 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -13,25 +13,25 @@ import filtersConfig from "./src/_config/filters.js"; import shortCodesConfig from "./src/_config/shortcodes.js"; // Sitemeta -import { } from "./src/_data/sitemeta.js"; +import { siteLang, feedPath, siteAuthor, siteUrl } from "./src/_data/sitemeta.js"; export default function(eleventyConfig) { // Installed Plugins eleventyConfig.addPlugin(feedPlugin, { type: "atom", - outputPath: "/blog/feed.xml", + outputPath: feedPath, collection: { name: "posts", limit: 10, }, metadata: { - language: "en", - title: "Helen Chong's Developer Blog", - subtitle: "Helen Chong talks about tech, coding and development.", - base: "https://helenchong.dev/blog/", + language: siteLang, + title: siteAuthor.name + "'s Developer Blog", + subtitle: siteAuthor.name + " talks about tech, coding and development.", + base: siteUrl + "/blog/", author: { - name: "Helen Chong", - email: "contact@helenchong.dev", + name: siteAuthor.name, + email: siteAuthor.email, } } }); diff --git a/src/_data/sitemeta.js b/src/_data/sitemeta.js index 27198f2d..b89f4cd0 100644 --- a/src/_data/sitemeta.js +++ b/src/_data/sitemeta.js @@ -9,10 +9,4 @@ export const siteAuthor = { export const siteDescription = siteAuthor.name + "'s developer portfolio and blog website."; export const siteLang = "en"; export const siteLocale = "en_MY"; -export const feedPath = "/blog/feed.xml" -export const siteBlog = { - title: siteAuthor.name + "'s Developer Blog", - desc: siteAuthor.name + " talks about tech, coding and development", - url: siteUrl + "/blog", - feedUrl: siteUrl + feedPath -}; +export const feedPath = "/blog/feed.xml" \ No newline at end of file