diff --git a/tools/rss-entries.js b/tools/rss-entries.js index 3956a45..59d3b02 100644 --- a/tools/rss-entries.js +++ b/tools/rss-entries.js @@ -1,4 +1,4 @@ -export const feed = [[ +const feed = [[ '2021-10-02', 'https://oddsquat.org/1', 'Second Item Title', @@ -9,3 +9,5 @@ export const feed = [[ 'First Item Title', 'Use this for the content. It can include html.' ]] + +module.exports = { feed } diff --git a/tools/rss.js b/tools/rss.js index 312b0a6..1c905b0 100644 --- a/tools/rss.js +++ b/tools/rss.js @@ -1,5 +1,6 @@ -import rss from 'rss-generator' -import { feed } from './rss-entries.js' +const rss = require('rss-generator') +const { feed } = require('./rss-entries.js') +const { writeFile } = require('fs') const url = 'https://oddsquat.org' const rssFeed = new rss({ @@ -13,7 +14,6 @@ const rssFeed = new rss({ feed.forEach(([date, url, title, description]) => rssFeed.item({date, url, title, description})) -import { writeFile } from 'fs' const RSS_FILEPATH = './src/assets/rss.xml'