This template system makes it easy to update the Shared RDM newsletter yearly by separating content from design.
newsletter-config.json- Contains all the content that changes yearly (text, links, dates, etc.)index-original.html- The original newsletter template (DO NOT EDIT)build-simple.js- The build script that generates the newsletterindex.html- The generated newsletter (automatically created)images/- Folder containing all newsletter images
- Update Content: Edit
newsletter-config.jsonwith new information - Update Images: Replace images in the
images/folder (or update paths in config) - Build Newsletter: Run
node build-simple.js - Done! Your updated newsletter is now in
index.html
You can also use the predefined scripts:
# Build the newsletter
npm run build
# Build and open in browser (macOS)
npm run devEdit these fields in newsletter-config.json:
{
"newsletter": {
"title": "Newsletter Shared RDM #3", // Update number
"subtitle": "Welcome to the third edition...", // Update description
"year": "2025", // Update year
"projectPageUrl": "https://...", // Project website
"clusterUrl": "https://..." // Cluster website
}
}Update institution deployments:
{
"useCases": {
"title": "Use Cases Development",
"description": "In 2025, we deployed...",
"institutions": [
"New institution 1",
"New institution 2",
// Add more as needed
],
"toolsLink": "https://new-link-to-tools.pdf"
}
}Update community information and links:
{
"communities": {
"eln": {
"title": "ELN Community",
"description": "Updated description...",
"contactEmail": "new-email@example.com"
},
// Update other communities similarly
}
}Update events, webinars, and activities:
{
"dissemination": {
"webinars": {
"title": "Webinar series 2025",
"description": "This year we conducted...",
"topics": [
"New Topic 1 (Date)",
"New Topic 2 (Date)"
],
"repositoryUrl": "https://updated-repository-link"
},
"projectMeeting": {
"title": "Project Meeting 2025",
"description": "The meeting took place...",
"learnMoreUrl": "https://new-meeting-link"
}
// Update other activities
}
}Update if contact details change:
{
"contact": {
"email": "new-contact@example.com",
"subscribeUrl": "https://new-subscription-link",
"address": {
"street": "New Address",
"city": "New City"
}
}
}Keep the same filenames and just replace the image files in the images/ folder:
SharedRDM-orange.pngcluster-logo.pngWebinar-series.pngProject-meeting.jpg- etc.
- Add new images to the
images/folder - Update the paths in
newsletter-config.json:
{
"images": {
"webinarImage": "images/new-webinar-2025.png",
"projectMeetingImage": "images/meeting-2025.jpg"
}
}If you need to add entirely new sections to the newsletter:
- Add the content to
newsletter-config.json - Edit
build-simple.jsto include replacement rules for the new content - If needed, modify
index-original.htmlto include placeholder text
The build-simple.js script uses simple string replacement. To add new replacements:
// Add new replacement
html = html.replace('OLD_TEXT', config.your.new.content);