diff --git a/.eleventy.js b/.eleventy.js index 9d572ff..b5a9a07 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -1,4 +1,5 @@ const path = require('path') +const fs = require('fs') const yaml = require('js-yaml') const { DateTime } = require('luxon') const readingTime = require('reading-time') @@ -30,6 +31,25 @@ module.exports = function (eleventyConfig) { ) ) + function includeMarkdown(filePath) { + filePath = String(filePath) + const fullPath = path.resolve(process.cwd(), filePath) + let mdContent + try { + mdContent = fs.readFileSync(fullPath, "utf8") + } catch (err) { + console.error(`Error reading file at: ${fullPath}`, err) + return `
Error reading file at: ${fullPath}
` + } + return markdown.render(mdContent) + } + + // Register as a shortcode for content files + eleventyConfig.addShortcode("includeMarkdown", includeMarkdown) + // Also register as a Nunjucks global so includes have access to it + eleventyConfig.addNunjucksGlobal("includeMarkdown", includeMarkdown) + + eleventyConfig.addPlugin(gitBuildPlugin, { repos: [ { name: 'blog' }, diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..dd1fc0a --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,13 @@ +version: '3.8' +services: + app: + build: + context: . + dockerfile: Dockerfile + ports: + - "8080:80" + volumes: + - .:/app + - /app/node_modules + environment: + - NODE_ENV=production diff --git a/eleventy/parsers/markdown.js b/eleventy/parsers/markdown.js index b1d10e1..a9f79b2 100644 --- a/eleventy/parsers/markdown.js +++ b/eleventy/parsers/markdown.js @@ -7,7 +7,7 @@ const slugify = require('../filters/slugify') const md = markdownIt({ html: true, - breaks: true, + breaks: false, linkify: true, typographer: true, }) diff --git a/src/_data/site.yml b/src/_data/site.yml index 68066ab..cf32fe3 100644 --- a/src/_data/site.yml +++ b/src/_data/site.yml @@ -42,6 +42,7 @@ navigation: text: Discord link: https://discord.redbrick.dcu.ie drawer: navigation + home: hero: title: @@ -55,6 +56,11 @@ home: secondary: text: Discord link: https://discord.redbrick.dcu.ie + tertiary: + text: Learn More! + link: "#about" + events: + api: https://clubsandsocs.jakefarrell.ie/dcuclubsandsocs.ie/society/redbrick graphic: image1: image: https://img.redbrick.dcu.ie/150x150/https://cdn.redbrick.dcu.ie/atlas/static/img/newsletter-snap.webp @@ -75,6 +81,7 @@ home: alt: Discord emote image7: alt: Redbrick logo + cta: title: Don't Miss Out body: Redbrick hosts events for everything tech related - from computer programming tutorials to workshops with multinational tech companies. @@ -91,6 +98,7 @@ home: r3c1: https://img.redbrick.dcu.ie/1000x500/https://cdn.redbrick.dcu.ie/atlas/static/img/hecker.jpg r3c2: https://img.redbrick.dcu.ie/1000x500/https://cdn.redbrick.dcu.ie/atlas/static/img/cmt-24-25.jpg r3c3: https://img.redbrick.dcu.ie/1000x500/https://cdn.redbrick.dcu.ie/atlas/static/img/CSBallCmt24.jpg + committee: imageURL: https://img.redbrick.dcu.ie/150x275,fit/https://cdn.redbrick.dcu.ie/atlas/ year: cmt25-26 @@ -146,3 +154,5 @@ home: - name: Pearse Cope position: 🥇 First Year Rep. username: pearse + about: + heading: About Us! \ No newline at end of file diff --git a/src/_includes/home/sections/about.md b/src/_includes/home/sections/about.md new file mode 100644 index 0000000..b158478 --- /dev/null +++ b/src/_includes/home/sections/about.md @@ -0,0 +1,27 @@ +*"What is Redbrick?"* - this is the age-old query which has plagued the DCU Networking Society for years. +Redbrick +is such a diverse society that a million monkeys working on a million typewriters for a million years might +reproduce the works of Shakespeare, but they'll never come up with a concise explanation as to what Redbrick is. + + +Simply put, Redbrick is a rather big social society with a slant on computers and technology. We host a plethora +of techy events designed to entertain and educate anyone and everyone, including cinema trips, pub nights and +tutorials and workshops on programming, web design and graphic design. Expect to see the return of the annual +RedBrick Freshers' Ball *(booze! booze! booze!)* and the table quiz. + +Redbrick isn't just about events though; we are lucky enough to own our own servers on which we host the +services used daily by our members: Redbrick Discord Server *(our most popular service, as it's great for +putting off assignments until the last minute, waffling about whatever's on your mind and meeting new +people)*,webspace *(host your own website with massive amounts of storage space)*, forums/message +boards, the photo gallery and your own `@redbrick.dcu.ie` e-mail address. We also have our own [**wiki site**](https://wiki.redbrick.dcu.ie), +where all members can create/edit/~~vandalise~~ pages on whatever you feel like. You can access all of these +services from any computer connected to the Internet. + + +Networking societies are to be found all over the country, and Redbrick - as part of the Intersocs network - is +often found mingling with other nerds from Trinity, NUI Maynooth and University of Limerick, both at +Intersocs events and in the Discord channels. + + +So, if you want to make new friends, talk about anything that's on your mind, or just get twisted because you +have nothing better to do with your time, RedBrick has something to offer you! diff --git a/src/_includes/home/sections/about.njk b/src/_includes/home/sections/about.njk new file mode 100644 index 0000000..86b24f0 --- /dev/null +++ b/src/_includes/home/sections/about.njk @@ -0,0 +1,14 @@ +
+
+ + Redbrick hosts a variety of events throughout the year, from LAN parties to workshops and talks... +
+