From 4198946a852aafb6356d37a6684e56a961efef2e Mon Sep 17 00:00:00 2001 From: ionous Date: Sun, 15 Jun 2025 18:04:38 -0700 Subject: [PATCH] bare bones news source ( includes two fake news items ) - add a directory of "news" content to hugo, with a layout that renders the content to html ( with no other page header /footer /etc. ), and a json index file which generates a list of all the pages in the directory - add a news source feed to the spa - add a vue template that can render a simple news item - simplify "uid" slightly so it only has to be unique within a given source feed --- cal/src/CalList.vue | 6 ++-- cal/src/NewsItem.vue | 43 ++++++++++++++++++++++++++++ cal/src/calMain.js | 5 ++-- cal/src/sources/eventSource.js | 2 +- cal/src/sources/newsSource.js | 32 +++++++++++++++++++++ cal/src/sources/sourcePool.js | 2 +- site/content/news/_index.md | 5 ++++ site/content/news/bridge-closure.md | 7 +++++ site/content/news/testing.md | 7 +++++ site/layouts/_default/list.json.json | 11 +++++++ site/layouts/_default/news.html | 1 + 11 files changed, 115 insertions(+), 6 deletions(-) create mode 100644 cal/src/NewsItem.vue create mode 100644 cal/src/sources/newsSource.js create mode 100644 site/content/news/_index.md create mode 100644 site/content/news/bridge-closure.md create mode 100644 site/content/news/testing.md create mode 100644 site/layouts/_default/list.json.json create mode 100644 site/layouts/_default/news.html diff --git a/cal/src/CalList.vue b/cal/src/CalList.vue index 391111db..82027788 100644 --- a/cal/src/CalList.vue +++ b/cal/src/CalList.vue @@ -8,13 +8,14 @@ import dayjs from 'dayjs' // components: import EventSummary from './EventSummary.vue' import DateDivider from './DateDivider.vue' +import NewsItem from './NewsItem.vue' // support: import { fetchRange } from './calList.js' import helpers from './calHelpers.js' import siteConfig from './siteConfig.js' export default { - components: { EventSummary, DateDivider }, + components: { EventSummary, DateDivider, NewsItem }, emits: [ 'pageLoaded' ], // called before the component is fully created // ( doesnt have access to `this` ) @@ -70,7 +71,7 @@ export default { class="c-day" :data-date="day.date"> -