Skip to content

Commit

Permalink
rss feed for blog!
Browse files Browse the repository at this point in the history
  • Loading branch information
ninjamuffin99 committed Nov 19, 2024
1 parent 6d43c7d commit 3cf6564
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@ import path from "path";
import hljs from "highlight.js";
import markdownIt from "markdown-it";
import markdownAnchor from "markdown-it-anchor";
import { feedPlugin } from "@11ty/eleventy-plugin-rss";


const __dirname = path.resolve();


export default function (eleventyConfig) {
let options = {
html: true,
Expand Down Expand Up @@ -92,6 +96,25 @@ export default function (eleventyConfig) {
return Image.generateHTML(metadata, imageAttributes);
});

eleventyConfig.addPlugin(feedPlugin, {
type: "atom", // or "rss", "json"
outputPath: "/feed.xml",
collection: {
name: "blogpost", // iterate over `collections.posts`
limit: 0, // 0 means no limit
},
metadata: {
language: "en",
title: "HaxeFlixel Blog",
subtitle: "News and writings from the HaxeFlixel maintainers",
base: "https://haxeflixel.com/",
author: {
name: "HaxeFlixel Team",
email: "", // Optional
}
}
});

// gets folders for documentation collections, except for the images folder!
let docPath = path.join(__dirname, "content/documentation/flixel-docs/documentation");
let dirs = fs
Expand Down
2 changes: 2 additions & 0 deletions content/_scss/flixel-colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,7 @@ $flixel-colors: (

$link-color: $flixel-dark-blue;
$link-color-dark: $flixel-light-blue;
$link-hover-color: $flixel-light-blue;
$link-hover-color-dark: $flixel-dark-blue;

$theme-colors: map-merge($theme-colors, $flixel-colors);
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"url": "https://github.com/HaxeFlixel/haxeflixel.com.git"
},
"dependencies": {
"@11ty/eleventy-plugin-rss": "^2.0.2",
"bootstrap": "^5.3.3",
"highlight.js": "^11.9.0",
"markdown-it": "^14.1.0",
Expand Down

0 comments on commit 3cf6564

Please sign in to comment.