carpentries / workshop-template

The Carpentries Workshop Template
https://carpentries.github.io/workshop-template/
Other
235 stars 521 forks source link

add line for COVID protocols #764

Closed maneesha closed 4 months ago

maneesha commented 2 years ago

This PR adds a variable for information about special COVID protocols. This will display on the rendered page as a section immediately after the Code of Conduct section. @sheraaronhurt let me know if this looks OK to you or if you want it displayed elsewhere instead. image

When setting up the website, Instructors will add it to the website in the same way the add in location, dates, instructor names, etc.

image

netlify[bot] commented 2 years ago

Deploy Preview for zen-ride-08ffd1 ready!

Name Link
Latest commit 5b556710e16ec69300bc345a97d974b4edea72a5
Latest deploy log https://app.netlify.com/sites/zen-ride-08ffd1/deploys/62b9ea3739bcc7000a6b4fba
Deploy Preview https://deploy-preview-764--zen-ride-08ffd1.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

maneesha commented 2 years ago

@zkamvar I was thinking about that. Do you know if there is a way to require a value on one of the fields based on another field? (i.e. covid_protocols is required if address == 'online' or if country != 'W3')

zkamvar commented 2 years ago

@zkamvar I was thinking about that. Do you know if there is a way to require a value on one of the fields based on another field? (i.e. covid_protocols is required if address == 'online' or if country != 'W3')

I belive it would be an unless tag:

https://github.com/carpentries/workshop-template/blob/79c2d3bb91e108538c2e78c5d0b3bfd8b8f2ecbf/index.md?plain=1#L66-L70

for example:

 {% if page.address != "online" %}
 {% unless site.covid_policy %} 
 <div class="alert alert-warning"> 
 It looks like you are setting up an in-person workshop but you haven't specified the COVID policy in the <code>_config.yml</code> file...
 </div> 
 {% endunless %}
COVID POLICY
 <p>{{ page.covid_policy }}</p>
 {% endif %}
sheraaronhurt commented 2 years ago

@maneesha this LGTM. I would agree with @zkamvar and ask that there be some type of requirement if possible.

maneesha commented 4 months ago

Closing this because it is rare that anyone has COVID requirements anymore.