Skip to content

Commit f964a38

Browse files
authored
All 2024 Durham updates (#12)
* 🚜 Refresh data from pretalx * πŸ“… Add Patrick's talk and change the slug of Avindra's * ✏️ Django -> web * πŸ“… Rearrange a few talks to avoid a Monday lunch conflict This is not ideal having afternoon breaks at different times on Monday/Tuesday, but if we have speakers drop due to visa issues, we can rearrange. * πŸ“’ Replace Rachell with Lacey as panel moderator Rachell is organizing, while Lacey is moderating * πŸ“… Adjust Monday afternoon break to later * πŸ“… Shift panel start time back 10 minutes * πŸ–ΌοΈ Add Melanie's photo from 2022 * πŸ“… Add more time for lightning talks Shift every afternoon slot back slightly * πŸ“… Extend lightning talks by 10 minutes * πŸ”§ bring back tracks in manual schedule entries * πŸ•› Adjust break times * blog post annoucing schedule * blog img schedule * ✏️ Update Vince's talk to use the abstract from Pretalx Per his request via email * Update twitter title to use the title of the content. * Use correct date formatting * πŸ“… Remove Patrick's talk from the schedule, per his request * Add Eleventy-based social share * Fix transparency on OG image * Adds organizer social network support * Temporary fix for tutorial social share * Fix canonical * Fix OG url * Remove test data * Remove markdown * Update "Lessons from e2e testing web applications" talk description * add new organizer (#46) * add new organizer * Fixed image extension * Put SixFeetUp back on the site * Set SFU appropriate sponsor level * Show SFU * Sheena O'Connell keynote (#47) * sheena keynote * Grammar updates and fixing the title format to please 11ty * Add the missing L to O'Connell * fixed syntax error added jpg * fixed file name * syntax fix * Wire up Sheena's presenter and talk. * Rename file but retain the permalink for Monday's keynote. * Delete src/_content/posts/2021-07-23-sheena-oconnell.md * Rename sheena-oconnel.jpg to sheena-oconnell.jpg * Correct family name in a few spots. * Add Sheena's keynote abstract * Update src/_content/schedule/talks/2024-09-23-09-15-00-t0-keynote-sheena-oconnell.md Co-authored-by: Drew Winstel <[email protected]> * Update src/_content/posts/introducing-keynote-sheena-oconnell.md --------- Co-authored-by: Tim Schilling <[email protected]> Co-authored-by: Drew Winstel <[email protected]> * Update SFU text * Large SFU logo * Speaker Miguel Sanda Info Update * Fix contrast issues * Moves datetime to start_datetime * Rename SFU logo * Change schedule announcement title (#50) * Change schedule announcement title * Tweaking verbiage based on Nicole's review * ✏️Pre-conference interview blog post * Remove horizontal lines from interview post The application of these lines wasn't consistent, so it's better to remove them all. * Added organizer file and photo for Nathan Zeager * keynote mario munoz (#54) * keynote mario munoz * Apply suggestions from code review Co-authored-by: Drew Winstel <[email protected]> * Add a few more links to Mario's interview * Use the right link for Jacob's talk * Add basic details for Mario's talk and bio. This may change, it's what I found. * Add Mario's details --------- Co-authored-by: Tim Schilling <[email protected]> Co-authored-by: Drew Winstel <[email protected]> * childcare blog post (#52) * childcare blog post * Update src/_content/posts/childcare-during-djangocon.md Co-authored-by: Tim Schilling <[email protected]> * minor update to verbiage childcare-during-djangocon.md * Update date for post --------- Co-authored-by: Tim Schilling <[email protected]> * Fix broken social share * Separate dates * Add note about date formatting * Fix bad sorting on schedule * Adds a skip link for primary content * Move sponsor listing to own file, make logos clickable * Some clean up, adds starting presenters grid and conf phases * Clean up people listings * Adds featured talks to homepage * volunteer opportunties blog post (#51) * volunteer opportunties blog post * add cover img to volunteer opp post * Apply tim's suggestions from review * Remove redundant posts.json * Removes redundant JSON file * Update YAML of post per new standard * Update Tim's talk description Attempting to cover the basics of financial literacy AND health insurance in the US is overly optimistic for a 25 minute talk. * Fix date updates * Clean up nav and add secondary block to archived home * Adds secondary content to archived homepage * Fix min width on session card * Add featured photos * Initial draft of hackathon page and schedule change. (#60) * Initial draft of hackathon page and schedule change. * Registration button added and minor content update! * Make date formats consistent with the locale of the event. * Add blog post announcing hackathon. --------- Co-authored-by: masterSal <[email protected]> Co-authored-by: Drew Winstel <[email protected]> * DjangoCon -> DjangoCon US in the hackathon description I missed this during review but saw it in the slack preview * Add a note to call the venue if they can't book a room (#65) * Add a note to call the venue if they can't book a room Also add the venue's phone number for easy reference * Add group suggestion --------- Co-authored-by: Tim Schilling <[email protected]> * Fix venue alert * Update hackathon event description * keynote interview Natalia Bidart (#62) * keynote interview Natalia Bidart * editorial changes from Natalia * editorial and grammar changes * Add Natalia's talk to the schedule. * Update Natalia's bio as per email. * Update date for Natalia keynote announcement --------- Co-authored-by: tschilling <[email protected]> * Add a "newcomer's guide to America" blog post (#67) * Add a "newcomer's guide to America" blog post Fixes #64 unless we want to convert it to a standalone page * ✏️ Add note about needing ID to purchase alcohol * ✏️ Add updates based on feedback from @VeldaKiara * ✏️ Add info about transportation and rearrange sections H/T @jefftriplett * ✏️ Add a note about paying in USD vs home currency * ✈️ Expand RDU * ✏️ fix typo * ✏️ Add a link to Benedict's blog post --------- * room-sharing page complete & also in the dropdown (#66) * room-sharing page complete & also in the dropdown * committed edits * Added Caktus group to platinum sponsor list * Gold Sponsor JBS Solutions * Bronze Sponsors Scout APM Sentry Testdriven.io * changed date * sal organizer update * πŸ–ΌοΈ Add Keanya to the organizers page * πŸ“… Add Scott Cranfill as a co-presenter with Meagen Bio and pic sent via email * Fix RSS feed published date * Adjust spacing on session cards * Add time tags to schedule * Pulls in changes from timezone branch * Fix JBS website link * Minor design improvements and fleshing out conf pages * Better color on session card * Clean up and empty avatars * Fix Caktus logo, copying of webp files * Adds thank you image to archived page * Adds video and slide support to session page * Adjust sizing, posts should only show available, landing page work * Opportunity Grants sponsors added (#76) * Opportunity Grants sponsors added DSF and PSF * date update * activated button * added reg link * Changed title and description * added valkey to sponsor (#79) * added valkey to sponsor * added larger logo * Remove unnecessary image file --------- Co-authored-by: Tim Schilling <[email protected]> * Switch to shortened URL for registration form * Get active blog post This is a copy of the 2023 blog post with an updated strava link. * Fix get active image (#80) * Add files via upload * Reference actual biking image * Updates with landing page * πŸ“… Drop Richard's talk Regrettably, he had to withdraw but we hope to have him back next year. * πŸ“… Move Vaarun's talk to online * πŸ“… Rearrange schedules for symmetry 1. Monday's break moves to 3:00 2. The 45-minute talks in the Monday evening slot move to 3:30 3. The 25-minute talks that were at 3:00 Monday move to 4:20 4. The 25-minute talks that were at 5:20 Monday move to Tuesday to fill our two gaps * Show the active version of the site. * Update fighting-homelessness-with-django.md * πŸ“… Switch Tim Bell and Adarsh's talks Adarsh has a Tuesday afternoon flight and therefore can't make the time we switched him to yesterday. As a result, let's swap him with Tim Bell. * Hackathon Register button * Starts styleguide * Adds basic colors to guide * Remove social colors * Adds badges and other content to styleguide * Fix buttons. Add forms example. * Move guide into a system of files * Clean up styleguide content, fix MD issues * Update page title for SEO * button color changed text-gray-500 -> bg-light-blue * Adds ordering and updated docs * Fix underline on schedule * Remove redundant h1 * Adds docs for sponsor list * πŸ“… Swap Ron's talk with Michael R's Ron had to switch to online * ✏️ Update hottel listing to add two more options * ✏️ Mark that the room block is closed * ✏️ Minor tweaks for page usage * Revert "πŸ“… Swap Ron's talk with Michael R's" * tutorials blog added! (#75) * tutorials blog added! * Update the blog post to focus more on marketing. --------- Co-authored-by: Tim Schilling <[email protected]> * Adds some basic documentation for a few types. * Adds other documentation * Add better focus indicators * πŸ“… Drop Melanie's tutorial from the schedule Unfortunately, she's withdrawing this year. Hopefully we can bring her back next year! * πŸ“… Add Eric's talk from the waitlist I was unable to find any 25-minute speakers from the online talks who were willing to speak online, so I'm pulling Eric in from the waitlist and moving Ron to the end of the day Monday. * ✏️ Add Eric's github profile Co-authored-by: Tim Schilling <[email protected]> * Add blog post announcing board game night for 2024. (#96) * Add blog post announcing board game night for 2024. * Add year to title --------- Co-authored-by: Drew Winstel <[email protected]> * Panel updates * Update title * Update src/_content/schedule/talks/panel-discussion-details-tba.md Co-authored-by: Drew Winstel <[email protected]> * Rename panel-discussion-details-tba.md to panel-discussion-django-communities.md * Add "Panel" to title * ✏️ Update Carlton's bio Co-authored-by: Carlton Gibson <[email protected]> * ✏️ Add an oxford comma * ✏️ Replace Ron with Velda * Panel Discussion 1st Draft (#97) * Panel Discussion 1st Draft * updated with new information * Apply suggestions from code review --------- Co-authored-by: Tim Schilling <[email protected]> Co-authored-by: Drew Winstel <[email protected]> * Minor updates to get things to build. * Fix the date and title for the panel discussion post. * Update paolo-melchiorre.md Add github social account * Add blog post about contribution sprints for 2024. (#95) * Add blog post about contribution sprints for 2024. * Add google maps link and fix datetime. --------- Co-authored-by: Drew Winstel <[email protected]> * valkey logo changed * πŸ“… Add room names for the tutorials Also rearrange the tracks so that the rooms are in the same tracks across sessions * Fix colors on schedule. Adds colors to safelist. * Black Python Devs leadership summit (#103) * Black Python Devs leadership summit * fixed typos * Fix typo in marc-gibbons.md `joined` not `jointed` πŸ˜‚ * removal of navbar for Venueless iframe (#104) * script working in default.html when placed directly but not getting called properly from script file * Move iframe_compat.js to the assets/js folder. * Swap published with eleventyExcludeFromCollections E11venty doesn't have a published flag. --------- Co-authored-by: Tim Schilling <[email protected]> * venueless welcome page needs stages stages need HLS URL * 🍨 Add catering menus to the site. * Add links to the menu items on the schedule. * Add blog post about what to bring for your first conference. (#94) * Add blog post about what to bring for your first conference. * Update all the things! Thanks Drew! Co-authored-by: Drew Winstel <[email protected]> * Update src/_content/posts/first-time-things-to-bring.md Co-authored-by: Drew Winstel <[email protected]> --------- Co-authored-by: Drew Winstel <[email protected]> * Add the new Scout Monitoring logo Retain the old in case there's a reference to it. * Use emojis on the get active blog post in the text. * updated slack link * Added photo and short bio for adamsc64 * Help page venueless (#105) * page is up * different column number * updating slack link * Consolidate the layout into cards and only use 1 column on smaller viewports. * Update src/venueless-help-page.html * Fix conduct link and clean up errant div. --------- Co-authored-by: Tim Schilling <[email protected]> * updated links * modified welcome message as requested * 🚌 Add note that buses within Durham are free * minor updates to venueless help & welcome * Add email banner for welcome emails * community sponsors add (#115) * community sponsors add - black python devs - postgresql * postgresql sponsor portrait -> landscape * πŸ“† Replace Eric's talk with Lorenzo's * 🏒 Fix room assignments MR1: lactation MR2: quiet MR3: green * πŸ“† Add Velda as tomorrow's opening remarks speaker * ✏️ Add trailing period Co-authored-by: Tim Schilling <[email protected]> * πŸ“† Replace Lisa's talk with Micah's due to illness * Update Micah's info * Call for Volunteers 2025 (#100) * starting post for 2025 call for volunters * removed all 2023 references * Tweak the call for volunteers, include online section. * update venue bullet points * Add Drew's changes and meta data change Co-authored-by: Drew Winstel <[email protected]> * Rework the introduction paragraph to be more recruit-y * Make changes for Rachell and volunteer committee * Add health and safety team for Erin * ✏️ Improve program verbiage Co-authored-by: Tim Schilling <[email protected]> * Update published datetime --------- Co-authored-by: tschilling <[email protected]> Co-authored-by: Peter Grandstaff <[email protected]> Co-authored-by: Drew Winstel <[email protected]> * Add post-conference interviews blog post. (#123) * Add post-conference interviews blog post. * Add image and correct date. * Use the proper name DjangoCon US * Conference wrap up post for 2024. This was largely borrowed from 2019's post. * Apply suggestions from code review Co-authored-by: Drew Winstel <[email protected]> * Mention service providers in order of length of relationship * ⬆️ Update attendee count to watch tito’s numbers * Add note explaining difference in count. * Use an italicized note instead of footnote. e11eventy doesn't support footnotes :( * Draft youtube speaking template. * :nail_polish: Re-adds layout changes * :nail_polish: Adds the presenter name to youtube speaker template * Add youtube_url to each of the talks. Includes a script to make adding youtube_urls to the talk files easier. * ⚠️ Remove embedded videos of the conference (#132) * ⚠ Remove embedded videos of the conference This is temporary until we get Wharton included as a sponsor for the DjangoCon US 2024 sponsors. At that point, the new video_urls should be added and this commit reverted. This didn't change the video_urls to effectively only inject this warning for the talks and not the tutorials. * Update session.html * drop "of business" --------- Co-authored-by: Peter Grandstaff <[email protected]> * Create code-of-conduct-transparency-report.md * Hackathon Recap Post (#134) * Added organizer file and photo for Nathan Zeager * Added blog post and image for hackathon recap * Small grammar tweaks * Add the layout to the metadata * Add some links for various tools and references. --------- Co-authored-by: Tim Schilling <[email protected]> * Update code-of-conduct-transparency-report.md * Remove all prior videos. * Update the talk video urls for the updated videos. * Add notes on potential issue with yt_playlist script. * Remove sponsor mistake message on session pages. * First draft of recap page! * add the 3rd keynote
1 parent 40a2ac0 commit f964a38

File tree

576 files changed

+16489
-1882
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

576 files changed

+16489
-1882
lines changed

β€Ž.github/workflows/deploy-to-ghpages.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ on:
44
push:
55
branches:
66
- main
7-
pull_request:
87

98
jobs:
109
deploy:

β€Ž.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,4 +130,8 @@ dist
130130
.pnp.*
131131

132132
# System fiels
133-
.DS_Store
133+
.DS_Store
134+
135+
# python virtualenv
136+
.venv/
137+
__pycache__/

β€ŽCNAME

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
durham.djangocon.us
1+
2024.djangocon.us

β€ŽCODE_OF_CONDUCT.md

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
# Code of Conduct
2+
3+
DjangoCon US is dedicated to providing a fun harassment-free conference experience for everyone, regardless of gender, gender identity, sexual orientation, disability, physical appearance, body size, race, or religion.
4+
5+
Be kind to others. Do not insult or put down other attendees. Behave professionally.
6+
7+
Remember that harassment and sexist, racist, or exclusionary jokes are not appropriate for DjangoCon US.
8+
9+
Attendees violating these rules may be asked to leave the conference without a refund at the sole discretion of the conference organizers.
10+
11+
Thank you for helping make this a welcoming, friendly event for all.
12+
13+
## Full Code of Conduct
14+
15+
_To make clear what is expected, all delegates/attendees, speakers,
16+
exhibitors, organizers and volunteers at any DjangoCon US event are required
17+
to conform to the following Code of Conduct. Organizers will enforce this code
18+
throughout the event._
19+
20+
### What the conference is
21+
22+
DjangoCon US is a community conference intended for networking and
23+
collaboration in the developer community.
24+
25+
We value the participation of each member of the Django community and want all
26+
attendees to have an enjoyable and fulfilling experience. Accordingly, all
27+
attendees are expected to show respect and courtesy to other attendees
28+
throughout the conference, at all conference events, and in all conference
29+
online spaces (such as Slack), whether officially sponsored by DjangoCon US or
30+
not.
31+
32+
### Be Kind To Others
33+
34+
Do not insult or put down other attendees. Behave professionally. Remember
35+
that harassment and sexist, racist, or exclusionary jokes are not appropriate
36+
for DjangoCon US. Attendees violating these rules may be asked to leave the
37+
conference without a refund at the sole discretion of the conference
38+
organizers.
39+
40+
### Be Respectful
41+
42+
Not all of us will agree all the time, but disagreement is no excuse for poor
43+
behavior and poor manners. We do not tolerate harassment of conference
44+
participants in any form.
45+
46+
Harassment includes: offensive verbal comments related to gender, gender
47+
identity, sexual orientation, disability, physical appearance, body size,
48+
race, religion; sexual images in public spaces; deliberate intimidation,
49+
stalking, or following; harassing photography or recording; sustained
50+
disruption of talks or other events; inappropriate physical contact; and
51+
unwelcome sexual attention.
52+
53+
## Choose Your Words
54+
55+
Be careful in the words that you choose. Remember that sexist, racist, and
56+
other exclusionary jokes can be offensive to those around you. Excessive
57+
swearing and offensive jokes are not appropriate for DjangoCon US. We are all
58+
adults, capable of having adult conversations. Preface your presentation with
59+
appropriate Trigger/Content Warnings, if necessary.
60+
61+
All communication should be appropriate for a professional audience including
62+
people of many different backgrounds. Sexual language and imagery is not
63+
appropriate for any conference venue, including talks.
64+
65+
Participants asked to stop any harassing behavior are expected to comply
66+
immediately.
67+
68+
Exhibitors in the expo hall, sponsor or vendor booths, or similar activities
69+
are also subject to the anti-harassment policy. In particular, exhibitors
70+
should not use sexualized images, activities, or other material. Booth staff
71+
(including volunteers) should not use sexualized clothing/uniforms/costumes,
72+
or otherwise create a sexualized environment.
73+
74+
## Examples of Inappropriate Behavior
75+
76+
- Harassment of any participants in any form
77+
- Deliberate intimidation, stalking, or following
78+
- Logging or taking screenshots of online activity for harassment purposes
79+
- Publishing others’ private information, such as a physical or electronic address, without explicit permission
80+
- Violent threats or language directed against another person
81+
- Incitement of violence or harassment towards any individual, including encouraging a person to commit suicide or to engage in self-harm
82+
- Creating additional online accounts in order to harass another person or circumvent a ban
83+
- Sexual language and imagery in online communities or in any conference venue, including talks
84+
- Insults, put downs, or jokes that are based upon stereotypes, that are exclusionary, or that hold others up for ridicule
85+
- Excessive swearing
86+
- Unwelcome sexual attention or advances
87+
- Unwelcome physical contact, including simulated physical contact (eg, textual descriptions like β€œhug” or β€œbackrub”) without consent or after a request to stop
88+
- Pattern of inappropriate social contact, such as requesting/assuming inappropriate levels of intimacy with others
89+
- Sustained disruption of online community discussions, in-person presentations, or other in-person events
90+
- Continued one-on-one communication after requests to cease
91+
- Other conduct that is inappropriate for a professional audience including people of many different backgrounds
92+
93+
This list is not an exhaustive list of all inappropriate behavior that is unacceptable at DjangoCon US. Community members asked to stop any inappropriate behavior are expected to comply immediately.
94+
95+
## Photography
96+
97+
In order to make DjangoCon US 2023 a great experience for everyone, do not
98+
photograph, video, or audio record anyone at DjangoCon without their express
99+
permission, sought in advance. If someone does not want to be photographed,
100+
video or audio recorded, please respect their wishes.
101+
102+
Crowd shots are permitted, but when only the faces of a few people are
103+
visible, permission should be sought from all of those individuals.
104+
105+
_If a participant engages in behavior that violates this code of conduct, the
106+
conference organizers may take any action they deem appropriate, including
107+
warning the offender or expulsion from the conference with no refund._
108+
109+
## License
110+
111+
This Code of Conduct was forked from the example policy from the [Geek
112+
Feminism wiki](http://geekfeminism.wikia.com/wiki/Conference_anti-harassment/Policy), created by the Ada Initiative and other volunteers, which
113+
is under a Creative Commons Zero license.
114+
115+
This Code of Conduct also incorporates portions from PyCon's Code of Conduct, which is licensed under the [Creative Commons Attribution-ShareAlike 3.0 Unported License](https://creativecommons.org/licenses/by-sa/3.0/).
116+
117+
Conference Code of Conduct by
118+
[2024.djangocon.us/conduct/](https://2024.djangocon.us/conduct/) is licensed under a
119+
[Creative Commons Attribution 3.0 Unported
120+
License](http://creativecommons.org/licenses/by/3.0/).

β€ŽREADME.md

Lines changed: 44 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This project requires Node v20 or greater.
88

99
## Building & Development
1010

11-
This project uses Liquid for templating. As such, you may wish to install syntax highlighting for Liquid in your text editor.
11+
This project uses Liquid for templating (except dates, see below). As such, you may wish to install syntax highlighting for Liquid in your text editor.
1212

1313
* VS Code: [Liquid Language Support](https://marketplace.visualstudio.com/items?itemName=neilding.language-liquid)
1414
* [Liquid documentation](https://liquidjs.com/)
@@ -19,6 +19,47 @@ Build and watch for local changes by running:
1919

2020
This opens a local server at `http://localhost:8080/` and watches for changes to the source files.
2121

22-
# To Dos
22+
## Conference Phases
2323

24-
1. Replace autoprefixer and cssnano with lightningcss
24+
The conference can be in 3 separate phases, controlled under `site.json`:
25+
26+
* `landing`: The conference site consists of a landing page.
27+
* `active`: The conference site is live and registration may occur.
28+
* `archived`: The conference is over.
29+
30+
This impacts the rendering of the homepage and display of content in various locations.
31+
32+
Reference:
33+
34+
* `src/index.html`
35+
* `src/_includes/home/`
36+
37+
## Date Formatting
38+
39+
Dates are formatted with [date-fns](https://date-fns.org/), due to some wonkiness with Eleventy's date formatting. You can use the `formatDateTime` shortcode in your templates to format dates. Note, that this will take into consideration the timezone defined in `site.json`, under `timezone`. Example:
40+
41+
```liquid
42+
{{ post.data.published_datetime | formatDateTime: "MMMM d, yyyy" }}
43+
```
44+
45+
## Social Media Images
46+
47+
1. Presenter images are created at `/presenters/{{ slug }}/`
48+
2. Session images are created at `/{{ talks,tutorials }}/{{ slug }}/social/`
49+
50+
## Considerations when updating content
51+
52+
1. When adding images, if they are below the "fold", consider adding a `loading="lazy"` attribute to the image tag.
53+
2. When adding images, consider adding an `alt` attribute to the image tag.
54+
3. Keep copy short and to the point. The site is most likely scanned, not read.
55+
4. Make sure to keep the styleguide up-to-date with any new components or styles.
56+
57+
## Styleguide
58+
59+
The styleguide lives at `/styleguide/` (respectively `styleguide.html`). The guide is built from content within `src/_content/styleguide/`. Each HTML page represents a section. Sections can be ordered with `order`. Each section can have a `description`.
60+
61+
When using code samples, be sure to use `{% capture code %}` to capture sample and pass it to the `code-snippet.html` include like so:
62+
63+
```liquid
64+
{% include "code-snippet.html", code:code, lang:'html' %}
65+
```

β€ŽROBOTS.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Sitemap: /sitemap.xml
2+
3+
User-agent: *
4+
Disallow:

β€Želeventy.config.js

Lines changed: 38 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,22 @@
11
const path = require('path');
22

33
const Image = require('@11ty/eleventy-img');
4-
const markdownIt = require("markdown-it");
54

6-
module.exports = (config) => {
7-
/*
8-
Setup collections
9-
https://www.11ty.dev/docs/collections/
10-
*/
11-
config.addCollection("posts", function(collectionApi) {
12-
return collectionApi.getFilteredByGlob("src/_content/posts/*.md");
13-
});
14-
15-
config.addCollection("places", function(collectionApi) {
16-
return collectionApi.getFilteredByGlob("src/_content/places/*.md");
17-
});
5+
const setupCollections = require('./lib/collections');
6+
const setupSessions = require('./lib/sessions');
7+
const setupFeed = require('./lib/feed');
8+
const markdown = require('./lib/markdown');
189

19-
config.addCollection("presenters", function(collectionApi) {
20-
return collectionApi.getFilteredByGlob("src/_content/presenters/*.md");
21-
});
10+
const { formatInTimeZone } = require('date-fns-tz');
2211

23-
config.addCollection("organizers", function(collectionApi) {
24-
return collectionApi.getFilteredByGlob("src/_content/organizers/*.md").filter(item => !item.data.hidden);
25-
});
12+
// Read timezone from site.json
13+
const siteConfig = require('./src/_data/site.json');
14+
const timezone = siteConfig.timezone || 'UTC'; // Default to 'UTC' if not specified
2615

27-
config.addCollection("sponsorsByLevel", function(collectionApi) {
28-
const sponsors = collectionApi.getFilteredByGlob("src/_content/sponsors/*.md");
29-
const visibleSponsors = sponsors.filter(sponsor => !sponsor.data.hidden);
30-
const levelOrder = [
31-
"Diamond",
32-
"Platnum",
33-
"Gold",
34-
"Silver",
35-
"Bronze",
36-
"Coffee",
37-
"Opportunity Grant",
38-
"Community",
39-
];
40-
41-
const sponsorsByLevel = visibleSponsors.reduce((acc, sponsor) => {
42-
const level = sponsor.data.level;
43-
if (!acc[level]) {
44-
acc[level] = [];
45-
}
46-
acc[level].push(sponsor);
47-
return acc;
48-
}, {});
49-
50-
// Sort levels based on predefined order
51-
const sortedSponsorsByLevel = {};
52-
levelOrder.forEach(level => {
53-
if (sponsorsByLevel[level]) {
54-
sortedSponsorsByLevel[level] = sponsorsByLevel[level];
55-
}
56-
});
57-
58-
return sortedSponsorsByLevel;
59-
});
16+
module.exports = (config) => {
17+
setupCollections(config);
18+
setupSessions(config);
19+
setupFeed(config);
6020

6121
/*
6222
Setup passthrough file copy
@@ -66,10 +26,12 @@ module.exports = (config) => {
6626
config.addPassthroughCopy("src/assets/js/");
6727
config.addPassthroughCopy("src/assets/favicons/");
6828
config.addPassthroughCopy({
69-
"src/_content/sponsors/*.{png,jpg,jpeg,svg}": "sponsors/",
70-
"src/_content/places/*.{png,jpg,jpeg,webp}": "venue/",
29+
"src/_content/sponsors/*.{png,jpg,jpeg,webp,svg}": "sponsors/",
30+
"src/_content/places/*.{png,jpg,jpeg,webp,svg}": "venue/",
7131
});
7232
config.addPassthroughCopy("CNAME");
33+
config.addPassthroughCopy("ROBOTS.txt");
34+
7335

7436
/*
7537
Setup watch targets
@@ -80,18 +42,16 @@ module.exports = (config) => {
8042
/*
8143
Shortcodes
8244
*/
83-
config.addLiquidShortcode("year", () => `${new Date().getFullYear()}`);
84-
8545
// TODO: Accept widths or support different widths
8646
config.addLiquidShortcode("image", async function(
8747
src,
8848
outputDir,
8949
urlPath,
90-
alt,
50+
alt = "",
9151
sizes,
9252
classes = "") {
9353
let metadata = await Image(src, {
94-
widths: [300, 600],
54+
widths: [180, 300, 600],
9555
formats: ["webp"],
9656
outputDir,
9757
urlPath,
@@ -114,19 +74,30 @@ module.exports = (config) => {
11474
return Image.generateHTML(metadata, imageAttributes);
11575
});
11676

77+
config.addPairedShortcode("markdown", function(content = "") {
78+
return markdown.render(content);
79+
});
80+
11781
/*
11882
Filters
11983
*/
12084
config.addFilter("markdown", function(content = "") {
121-
let markdown = markdownIt({
122-
html: true,
123-
breaks: true,
124-
linkify: true
125-
});
126-
12785
return markdown.render(content);
12886
});
12987

88+
config.addFilter("formatDateTime", function(date, format) {
89+
return formatInTimeZone(date, timezone, format);
90+
});
91+
92+
config.addFilter("find", function find(collection = [], slug = "") {
93+
return collection.find(item => item.fileSlug === slug);
94+
});
95+
96+
/* TODO: Make generic */
97+
config.addFilter("talksByPresenter", function talksByPresenter(collection = [], slug = "") {
98+
return collection.filter(item => item.data.presenter_slugs.includes(slug));
99+
});
100+
130101
/*
131102
Misc configuration
132103
*/
@@ -135,6 +106,8 @@ module.exports = (config) => {
135106
excerpt_separator: "<!-- excerpt -->"
136107
});
137108

109+
config.setLibrary("md", markdown);
110+
138111
return {
139112
dir: {
140113
input: "src",
@@ -144,7 +117,6 @@ module.exports = (config) => {
144117

145118
// Use Liquid for templating
146119
// https://www.11ty.dev/docs/languages/liquid/
147-
htmlTemplateEngine: "liquid",
148-
markdownTemplateEngine: "liquid"
120+
htmlTemplateEngine: "liquid"
149121
}
150122
};

0 commit comments

Comments
Β (0)