-
Notifications
You must be signed in to change notification settings - Fork 87
make the year dynamic in Hacktoberfest documentation #212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| <a href="https://hacktoberfest.com"> | ||
| <img src="../images/hacktoberfest.png" alt="hacktoberfest 2024 logo" width="80%"/> | ||
| </a> | ||
| {{< hacktoberfest type="image" >}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The alt text looks like this on my local with this line of code @gabek
|
|
||
| - Read the [Hacktoberfest Values](https://hacktoberfest.com/participation/#values). | ||
| - Register for [Hacktoberfest 2024](https://hacktoberfest.com/participation/) starting September 26th. | ||
| - {{< hacktoberfest type="registration" >}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've revised the words to be more generic like this on my local with this line of code so that we do not need to remember to update it yearly @gabek
|
49aaa5c links to owncast/owncast#4483 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR makes the Hacktoberfest documentation year-agnostic by creating a dynamic shortcode that automatically displays the current year instead of requiring manual updates each year.
- Created a new Hugo shortcode that dynamically generates the current year using
now.Year - Replaced hardcoded "2024" references with the new shortcode calls
- Updated a directory URL reference from subdomain to path-based format
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| layouts/shortcodes/hacktoberfest.html | New Hugo shortcode template that dynamically generates current year and Hacktoberfest-related content |
| content/hacktoberfest.md | Updated to use the new shortcode instead of hardcoded year references and fixed directory URL |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
|
||
|
|
Copilot
AI
Oct 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the extra blank lines (lines 3-4) to improve code readability and maintain consistent formatting.
content/hacktoberfest.md
Outdated
| ## Usage Contributions | ||
|
|
||
| If you've been thinking about trying Owncast for the first time but haven't found the right time to be inspired to try it out, **this is your chance**. If you spin up a new public Owncast server and list it on the [Owncast Directory](https://owncast.online/directory) during Hacktoberfest, you'll receive a t-shirt from us. | ||
| If you've been thinking about trying Owncast for the first time but haven't found the right time to be inspired to try it out, **this is your chance**. If you spin up a new public Owncast server and list it on the [Owncast Directory](https://directory.owncast.online) during Hacktoberfest, you'll receive a t-shirt from us. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| If you've been thinking about trying Owncast for the first time but haven't found the right time to be inspired to try it out, **this is your chance**. If you spin up a new public Owncast server and list it on the [Owncast Directory](https://directory.owncast.online) during Hacktoberfest, you'll receive a t-shirt from us. | |
| If you've been thinking about trying Owncast for the first time but haven't found the right time to be inspired to try it out, **this is your chance**. If you spin up a new public Owncast server and list it on the [Owncast Directory](https://owncast.directory) during Hacktoberfest, you'll receive a t-shirt from us. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess if this page is being updated it should be fully updated. We gave up giving out t-shirts the past couple of years, as it made no difference in contributions, and those who contributed never requested one.
Would you mind removing references to them from the doc while you're updating it? Thank you!
|
One thing I want to mention, since I branched the website and started work on it, and the new website is using an entirely different stack, all of these changes won't be reflected in the future when we move off of Hugo, and they'll have to be redone. So for things like Hacktoberfest where it's useful right now to make the changes, it totally makes sense to do this. But for other things it might make sense to work on the new version of the site instead of the old one. Just something to think about. |
|
Thanks for taking care of this! |
It's troublesome to remember to update the text manually. I've updated the code so that the year would always display the current year using
{{ .Now.Year }}