Skip to content

Commit

Permalink
application-template.md: Make GSoC application template dynamic
Browse files Browse the repository at this point in the history
Have the year on the GSoC application template on the FAQ page change based on the month. If it's past the month set in the config (set to June), the page will show the next year, otherwise it will show the current year.

Closes coala#671
  • Loading branch information
samuelpiltch committed Oct 28, 2018
1 parent 0b69583 commit ca8a58f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ baseurl: "" # the subpath of your site, e.g. /blog
url: "" # the base hostname & protocol for your site
githuburl: "https://github.com/coala/projects"

gsoc_switch_month: 6

plugins:
- jekyll-netlify

Expand Down
8 changes: 6 additions & 2 deletions _faq/application-template.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
---
question: "Do you have an application template?"
---
coala 2018 Application Template
===============================
{% assign month = "now" | date: "%-m" | plus: 0 %}
{% if month >= site.gsoc_switch_month %}
# coala {{ "now" | date: "%Y" | plus: 1 }} Application Template
{% else %}
# coala {{ "now" | date: "%Y" }} Application Template
{% endif %}

```
Student Info
Expand Down

0 comments on commit ca8a58f

Please sign in to comment.