Skip to content

Commit

Permalink
All 2024 Durham updates (#12)
Browse files Browse the repository at this point in the history
* 🚜 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
  • Loading branch information
sodevious authored Jan 27, 2025
1 parent 40a2ac0 commit f964a38
Show file tree
Hide file tree
Showing 576 changed files with 16,489 additions and 1,882 deletions.
1 change: 0 additions & 1 deletion .github/workflows/deploy-to-ghpages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- main
pull_request:

jobs:
deploy:
Expand Down
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,8 @@ dist
.pnp.*

# System fiels
.DS_Store
.DS_Store

# python virtualenv
.venv/
__pycache__/
2 changes: 1 addition & 1 deletion CNAME
Original file line number Diff line number Diff line change
@@ -1 +1 @@
durham.djangocon.us
2024.djangocon.us
120 changes: 120 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
# Code of Conduct

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.

Be kind to others. Do not insult or put down other attendees. Behave professionally.

Remember that harassment and sexist, racist, or exclusionary jokes are not appropriate for DjangoCon US.

Attendees violating these rules may be asked to leave the conference without a refund at the sole discretion of the conference organizers.

Thank you for helping make this a welcoming, friendly event for all.

## Full Code of Conduct

_To make clear what is expected, all delegates/attendees, speakers,
exhibitors, organizers and volunteers at any DjangoCon US event are required
to conform to the following Code of Conduct. Organizers will enforce this code
throughout the event._

### What the conference is

DjangoCon US is a community conference intended for networking and
collaboration in the developer community.

We value the participation of each member of the Django community and want all
attendees to have an enjoyable and fulfilling experience. Accordingly, all
attendees are expected to show respect and courtesy to other attendees
throughout the conference, at all conference events, and in all conference
online spaces (such as Slack), whether officially sponsored by DjangoCon US or
not.

### Be Kind To Others

Do not insult or put down other attendees. Behave professionally. Remember
that harassment and sexist, racist, or exclusionary jokes are not appropriate
for DjangoCon US. Attendees violating these rules may be asked to leave the
conference without a refund at the sole discretion of the conference
organizers.

### Be Respectful

Not all of us will agree all the time, but disagreement is no excuse for poor
behavior and poor manners. We do not tolerate harassment of conference
participants in any form.

Harassment includes: offensive verbal comments related to gender, gender
identity, sexual orientation, disability, physical appearance, body size,
race, religion; sexual images in public spaces; deliberate intimidation,
stalking, or following; harassing photography or recording; sustained
disruption of talks or other events; inappropriate physical contact; and
unwelcome sexual attention.

## Choose Your Words

Be careful in the words that you choose. Remember that sexist, racist, and
other exclusionary jokes can be offensive to those around you. Excessive
swearing and offensive jokes are not appropriate for DjangoCon US. We are all
adults, capable of having adult conversations. Preface your presentation with
appropriate Trigger/Content Warnings, if necessary.

All communication should be appropriate for a professional audience including
people of many different backgrounds. Sexual language and imagery is not
appropriate for any conference venue, including talks.

Participants asked to stop any harassing behavior are expected to comply
immediately.

Exhibitors in the expo hall, sponsor or vendor booths, or similar activities
are also subject to the anti-harassment policy. In particular, exhibitors
should not use sexualized images, activities, or other material. Booth staff
(including volunteers) should not use sexualized clothing/uniforms/costumes,
or otherwise create a sexualized environment.

## Examples of Inappropriate Behavior

- Harassment of any participants in any form
- Deliberate intimidation, stalking, or following
- Logging or taking screenshots of online activity for harassment purposes
- Publishing others’ private information, such as a physical or electronic address, without explicit permission
- Violent threats or language directed against another person
- Incitement of violence or harassment towards any individual, including encouraging a person to commit suicide or to engage in self-harm
- Creating additional online accounts in order to harass another person or circumvent a ban
- Sexual language and imagery in online communities or in any conference venue, including talks
- Insults, put downs, or jokes that are based upon stereotypes, that are exclusionary, or that hold others up for ridicule
- Excessive swearing
- Unwelcome sexual attention or advances
- Unwelcome physical contact, including simulated physical contact (eg, textual descriptions like β€œhug” or β€œbackrub”) without consent or after a request to stop
- Pattern of inappropriate social contact, such as requesting/assuming inappropriate levels of intimacy with others
- Sustained disruption of online community discussions, in-person presentations, or other in-person events
- Continued one-on-one communication after requests to cease
- Other conduct that is inappropriate for a professional audience including people of many different backgrounds

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.

## Photography

In order to make DjangoCon US 2023 a great experience for everyone, do not
photograph, video, or audio record anyone at DjangoCon without their express
permission, sought in advance. If someone does not want to be photographed,
video or audio recorded, please respect their wishes.

Crowd shots are permitted, but when only the faces of a few people are
visible, permission should be sought from all of those individuals.

_If a participant engages in behavior that violates this code of conduct, the
conference organizers may take any action they deem appropriate, including
warning the offender or expulsion from the conference with no refund._

## License

This Code of Conduct was forked from the example policy from the [Geek
Feminism wiki](http://geekfeminism.wikia.com/wiki/Conference_anti-harassment/Policy), created by the Ada Initiative and other volunteers, which
is under a Creative Commons Zero license.

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/).

Conference Code of Conduct by
[2024.djangocon.us/conduct/](https://2024.djangocon.us/conduct/) is licensed under a
[Creative Commons Attribution 3.0 Unported
License](http://creativecommons.org/licenses/by/3.0/).
47 changes: 44 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This project requires Node v20 or greater.

## Building & Development

This project uses Liquid for templating. As such, you may wish to install syntax highlighting for Liquid in your text editor.
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.

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

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

# To Dos
## Conference Phases

1. Replace autoprefixer and cssnano with lightningcss
The conference can be in 3 separate phases, controlled under `site.json`:

* `landing`: The conference site consists of a landing page.
* `active`: The conference site is live and registration may occur.
* `archived`: The conference is over.

This impacts the rendering of the homepage and display of content in various locations.

Reference:

* `src/index.html`
* `src/_includes/home/`

## Date Formatting

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:

```liquid
{{ post.data.published_datetime | formatDateTime: "MMMM d, yyyy" }}
```

## Social Media Images

1. Presenter images are created at `/presenters/{{ slug }}/`
2. Session images are created at `/{{ talks,tutorials }}/{{ slug }}/social/`

## Considerations when updating content

1. When adding images, if they are below the "fold", consider adding a `loading="lazy"` attribute to the image tag.
2. When adding images, consider adding an `alt` attribute to the image tag.
3. Keep copy short and to the point. The site is most likely scanned, not read.
4. Make sure to keep the styleguide up-to-date with any new components or styles.

## Styleguide

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`.

When using code samples, be sure to use `{% capture code %}` to capture sample and pass it to the `code-snippet.html` include like so:

```liquid
{% include "code-snippet.html", code:code, lang:'html' %}
```
4 changes: 4 additions & 0 deletions ROBOTS.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Sitemap: /sitemap.xml

User-agent: *
Disallow:
104 changes: 38 additions & 66 deletions eleventy.config.js
Original file line number Diff line number Diff line change
@@ -1,62 +1,22 @@
const path = require('path');

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

module.exports = (config) => {
/*
Setup collections
https://www.11ty.dev/docs/collections/
*/
config.addCollection("posts", function(collectionApi) {
return collectionApi.getFilteredByGlob("src/_content/posts/*.md");
});

config.addCollection("places", function(collectionApi) {
return collectionApi.getFilteredByGlob("src/_content/places/*.md");
});
const setupCollections = require('./lib/collections');
const setupSessions = require('./lib/sessions');
const setupFeed = require('./lib/feed');
const markdown = require('./lib/markdown');

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

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

config.addCollection("sponsorsByLevel", function(collectionApi) {
const sponsors = collectionApi.getFilteredByGlob("src/_content/sponsors/*.md");
const visibleSponsors = sponsors.filter(sponsor => !sponsor.data.hidden);
const levelOrder = [
"Diamond",
"Platnum",
"Gold",
"Silver",
"Bronze",
"Coffee",
"Opportunity Grant",
"Community",
];

const sponsorsByLevel = visibleSponsors.reduce((acc, sponsor) => {
const level = sponsor.data.level;
if (!acc[level]) {
acc[level] = [];
}
acc[level].push(sponsor);
return acc;
}, {});

// Sort levels based on predefined order
const sortedSponsorsByLevel = {};
levelOrder.forEach(level => {
if (sponsorsByLevel[level]) {
sortedSponsorsByLevel[level] = sponsorsByLevel[level];
}
});

return sortedSponsorsByLevel;
});
module.exports = (config) => {
setupCollections(config);
setupSessions(config);
setupFeed(config);

/*
Setup passthrough file copy
Expand All @@ -66,10 +26,12 @@ module.exports = (config) => {
config.addPassthroughCopy("src/assets/js/");
config.addPassthroughCopy("src/assets/favicons/");
config.addPassthroughCopy({
"src/_content/sponsors/*.{png,jpg,jpeg,svg}": "sponsors/",
"src/_content/places/*.{png,jpg,jpeg,webp}": "venue/",
"src/_content/sponsors/*.{png,jpg,jpeg,webp,svg}": "sponsors/",
"src/_content/places/*.{png,jpg,jpeg,webp,svg}": "venue/",
});
config.addPassthroughCopy("CNAME");
config.addPassthroughCopy("ROBOTS.txt");


/*
Setup watch targets
Expand All @@ -80,18 +42,16 @@ module.exports = (config) => {
/*
Shortcodes
*/
config.addLiquidShortcode("year", () => `${new Date().getFullYear()}`);

// TODO: Accept widths or support different widths
config.addLiquidShortcode("image", async function(
src,
outputDir,
urlPath,
alt,
alt = "",
sizes,
classes = "") {
let metadata = await Image(src, {
widths: [300, 600],
widths: [180, 300, 600],
formats: ["webp"],
outputDir,
urlPath,
Expand All @@ -114,19 +74,30 @@ module.exports = (config) => {
return Image.generateHTML(metadata, imageAttributes);
});

config.addPairedShortcode("markdown", function(content = "") {
return markdown.render(content);
});

/*
Filters
*/
config.addFilter("markdown", function(content = "") {
let markdown = markdownIt({
html: true,
breaks: true,
linkify: true
});

return markdown.render(content);
});

config.addFilter("formatDateTime", function(date, format) {
return formatInTimeZone(date, timezone, format);
});

config.addFilter("find", function find(collection = [], slug = "") {
return collection.find(item => item.fileSlug === slug);
});

/* TODO: Make generic */
config.addFilter("talksByPresenter", function talksByPresenter(collection = [], slug = "") {
return collection.filter(item => item.data.presenter_slugs.includes(slug));
});

/*
Misc configuration
*/
Expand All @@ -135,6 +106,8 @@ module.exports = (config) => {
excerpt_separator: "<!-- excerpt -->"
});

config.setLibrary("md", markdown);

return {
dir: {
input: "src",
Expand All @@ -144,7 +117,6 @@ module.exports = (config) => {

// Use Liquid for templating
// https://www.11ty.dev/docs/languages/liquid/
htmlTemplateEngine: "liquid",
markdownTemplateEngine: "liquid"
htmlTemplateEngine: "liquid"
}
};
Loading

0 comments on commit f964a38

Please sign in to comment.