π This repository stores the news articles that are pulled into the MARC website during deployment.
If your pull request is merged here, the website workflow will clone this repository into the website build, and your news article can appear on the live site.
marc_news/
βββ articles/ β one Markdown file per news article
β βββ 2026-03-10-example-news.md
β βββ cover_photos/ β cover images and article photos
βββ scripts/validate-news.mjs
Markdown files outside articles/ are not picked up by the website, and the validator reports them. Image paths in the front matter stay relative to the Markdown file, e.g. ./cover_photos/example_news.jpg.
News articles are not linked to profiles or projects, but two things still act as keys:
- The file name is the article's address (
2026-03-10-example-news.mdβ/news/2026-03-10-example-news/). Don't rename a file after the article has been shared; fix thetitleinstead. - Image paths (
coverand images in the text) must match the photo files exactly, including upper and lower case.
Everything else (title, date, summary, text, vacancy fields) is safe to change at any time.
Full guide: pdnmarc.github.io/docs/news
There are two different ways to add news to the MARC website:
- Markdown news articles in this repository
- Social feed items through the Google Sheet used by the website sync script
Use Markdown articles when you want a full news page with a title, summary, optional cover photo, and full article body.
No GitHub account? Use the news form instead (ask a maintainer for the link). Every night at 00:00 Sri Lanka time, new responses become pull requests here with the article and its photos, ready for review. It can also post vacancies and correct published articles. Setup and review: google-form/README.md.
Use the Google Sheet when you want a shorter social/news update that links to an external post such as Facebook, LinkedIn, a website article, or Twitter.
You will usually add:
- one Markdown file for your news article
- optionally one cover image inside
articles/cover_photos/
A typical news file looks like this:
---
title: "Example News Title"
date: 2026-03-10
cover: ./cover_photos/example_news.jpg
short: >
A short summary of the news item that will appear on the news card
and near the top of the article page.
---
Write the full news article here in Markdown.The text below the front matter becomes the full article page on the website.
The website currently validates each Markdown news entry with these fields:
title: stringdate: datecover: optional image pathshort: short summary string
Required fields:
titledateshort
Optional field:
cover
A vacancy, internship, volunteer call or any other "apply by" announcement is a normal news article with up to three extra fields:
vacancy: true # also list it on the website's Vacancies page
deadline: 2026-11-30 # optional: last day to apply (YYYY-MM-DD)
apply: https://forms.gle/xxxx # optional: application link (https://β¦ or mailto:β¦)- The article appears in News as usual, tagged "Vacancy".
- It is listed on the Vacancies page (
/vacancies) until the end of itsdeadlineday (Sri Lanka time), then drops off by itself. Its article page then shows "Applications closed". - Without a
deadline, it stays on the Vacancies page until you removevacancy: true. deadlineandapplyare only allowed together withvacancy: true.- Put the details (role, eligibility, how to apply) in the article body.
You should have:
- a GitHub account
- basic familiarity with editing files and committing changes
- the article title, date, summary, and full article text ready
- optionally a cover image ready
The block between the top --- line and the next --- line is YAML front matter.
This is where the website reads your news metadata.
A few YAML gotchas to watch for:
- every field name must be followed by a colon, like
title: - do not use tabs for indentation
- if a value contains special characters, a colon, or you just want to be safe, wrap it in quotes
- do not forget the closing
---line before your normal Markdown article starts - the
coverpath must match the actual file name exactly - avoid extra spaces inside file paths
- the
dateshould use the exact formatYYYY-MM-DD
Good example:
title: "Example News Title"
date: 2026-03-10
cover: ./cover_photos/example_news.jpg
short: >
This is a short summary for the article card.Safe quoted example:
title: "MARC Wins National Award"The short field often reads well as a folded YAML block using > when the summary is more than one short line.
Use the date format exactly like this:
2026-03-10
This is YYYY-MM-DD.
Examples:
2026-01-052026-03-10
Avoid formats like these:
10-03-202603/10/2026March 10, 2026
Everything below the closing --- line is normal Markdown content.
For news articles, this is the full article body. You can include:
- plain paragraphs
- section headings
- bullet lists
- links
- emphasis such as bold or italic text
- images using Markdown syntax
Example:
---
title: "Example News Title"
date: 2026-03-10
cover: ./cover_photos/example_news.jpg
short: >
A short summary of the article.
---
This article announces a new MARC milestone.
## Highlights
- Strong collaboration
- New research impact
- Recognition at national level
Read more here: [Example link](https://example.com).
Here is an inline image:
If you include an image in the content section, put it in articles/cover_photos/ and use a path relative to your article, such as ./cover_photos/example_news_2.jpg.
Keep it reasonably simple and readable. Plain paragraphs are completely fine.
If you want a cover image:
- Put the image file inside the
articles/cover_photos/folder. - Reference it in the
coverfield.
Example:
cover: ./cover_photos/example_news.jpgNotes:
- Common formats such as
.jpg,.jpeg, and.pngare appropriate. - The cover image is optional in the current website schema.
- If you do not add a
cover, the article can still appear on the site.
The website also has a separate social_news collection. Unlike the Markdown articles above, this is not edited directly in this repository.
Instead, it is generated from this Google Sheet:
https://docs.google.com/spreadsheets/d/1vhvcqlhc_bTdGScX3iYQ4T9HTD2uLbKD22rsrI_qA8U/edit?usp=sharing
The website's Python sync script reads the sheet, converts the news tab to JSON, and writes it into the website as social_news.json during the build/update process.
These social feed items appear in the Latest Activity section of the News page and link out to the original external post or page.
Use the Google Sheet when:
- you want to link to a Facebook, LinkedIn, Twitter, or web post
- you do not need a full Markdown article page on the website
- the update is better represented as a short social/news feed item
The sync script and website expect these fields for social news items:
TitleDateSourceURLThumbnailoptionalEmbedoptional
From the website validation:
Sourceshould be exactly one ofFacebook,LinkedIn,Web, orTwitterURLshould be a valid full URLDateshould use theYYYY-MM-DDformat
From the current sync script:
- rows missing
Title,Date, orURLare dropped - empty optional fields are allowed
- the sheet columns are converted to lowercase JSON keys during sync
- Open the Google Sheet.
- Go to the news/social tab used for website updates.
- Add a new row.
- Fill in the row with the relevant details.
Recommended column usage:
Title: the text that should appear on the siteDate: useYYYY-MM-DDSource: use exactlyFacebook,LinkedIn,Web, orTwitterURL: the link to the original external post/pageThumbnail: optional image link or path if your workflow uses itEmbed: optional embed code if needed later
Example row values:
Title:MARC team wins national competitionDate:2026-03-10Source:LinkedInURL:https://www.linkedin.com/posts/exampleThumbnail: leave blank if not neededEmbed: leave blank if not needed
Sourcecapitalization matters. Use the values exactly as listed above.Dateformat matters. UseYYYY-MM-DD.URLshould be a full link, includinghttps://.- If you want a full article page on the website, the Google Sheet is not enough. Use a Markdown article in this repository instead.
This is the easiest option if you do not want to use Git locally.
- Open
pdnMARC/marc_newson GitHub. - Click
Fork. - Create the fork under your own GitHub account.
- Open your fork on GitHub.
- Open the
articles/folder, then clickAdd file. - Choose
Create new file. - Name the file something clear, for example:
2026-03-example-news.md
- Paste your article content.
Example:
---
title: "Example News Title"
date: 2026-03-10
cover: ./cover_photos/example_news.jpg
short: >
A short summary of the article.
---
Write the full article here.If you want a cover image:
- Open the
articles/cover_photos/folder in your fork. - Click
Add file. - Choose
Upload files. - Upload your image.
- Make sure the
coverfield matches the uploaded file name exactly.
Example:
cover: ./cover_photos/example_news.jpgIf you already have an article and just want to update it:
- Open the existing
.mdfile in your fork. - Click the pencil icon to edit it.
- Update the front matter or article content.
- If needed, upload a new image to
articles/cover_photos/. - Scroll down and commit the change to a new branch.
- Open a pull request.
You can manage both new articles and later updates entirely from the GitHub website this way.
When editing in the browser:
- Scroll to the commit section below the editor.
- Enter a short commit message such as
Add news article for example event. - Choose
Create a new branch for this commit and start a pull requestif GitHub offers it. - Click
Propose changesorCommit changes.
- GitHub will usually guide you to a pull request page.
- Open a pull request from your fork to
pdnMARC/marc_news:main. - Briefly say that you are adding or updating a news article.
Use this option if you prefer working on your own machine.
- Open the
pdnMARC/marc_newsrepository on GitHub. - Click
Fork. - Create the fork under your own GitHub account.
git clone https://github.com/<your-github-username>/marc_news.git
cd marc_newsgit checkout -b add-news-articleUse any clear branch name such as add-example-news.
Create a new Markdown file inside the articles/ folder.
Example:
2026-03-example-news.md
Add front matter at the top of the file.
Example:
---
title: "Example News Title"
date: 2026-03-10
cover: ./cover_photos/example_news.jpg
short: >
A short summary of the article.
---
Write the full article here.After the front matter, write the full article in Markdown.
Plain paragraphs are enough.
If you want a cover image:
- Put the image file inside the
articles/cover_photos/folder. - Reference it in the
coverfield.
Example:
cover: ./cover_photos/example_news.jpggit add .
git commit -m "Add news article for example event"
git push origin add-news-article- Go to your fork on GitHub.
- Open a pull request from your branch to
pdnMARC/marc_news:main. - In the pull request description, briefly state that you are adding or updating a news article.
The MARC website GitHub Actions workflow clones pdnMARC/marc_news into the website build as the news collection.
That is why news changes belong in this repository rather than directly in the website repository.
In practice, the flow is:
- You update
marc_news. - Your pull request is merged.
- The website workflow pulls this repository during deployment.
- Your Markdown article becomes part of the website build.
Social feed items follow a different path:
- You update the Google Sheet.
- The website sync script reads that sheet.
- The script updates
social_news.jsonin the website build/update flow. - The item appears in the News page social feed.
- Your Markdown file is in the
articles/folder. - Your front matter includes
title,date, andshort. - Your
dateuses the exactYYYY-MM-DDformat. - Your
coverpath is correct if you added an image. - Your cover image file is inside
articles/cover_photos/if you used one. - Your article content is below the closing
---line.