academicpages / academicpages.github.io

Github Pages template for academic personal websites, forked from mmistakes/minimal-mistakes
https://academicpages.github.io
MIT License
11.22k stars 40.51k forks source link

Issue with date display in teaching post on Jekyll site #2244

Open ManeeshaAmpagouni opened 3 weeks ago

ManeeshaAmpagouni commented 3 weeks ago

Describe the bug I am experiencing an issue where the date and venue fields are still showing on my teaching post (as ' , , 1900') even after I removed them from the markdown file and attempted to adjust the archive-single.html template.

To Reproduce Steps to reproduce the behavior:

  1. Fork the academicpages.github.io repository.
  2. Create a teaching post markdown file without the date and venue fields.
  3. Modify the archive-single.html template to exclude date and venue display.
  4. Deploy the site and navigate to the teaching post.

Expected behavior I expect the date and venue fields not to be displayed at all on the teaching post.

Actual behavior Despite removing the fields and modifying the template, the teaching post still shows ' , , 1900'.

Screenshots The following are the teaching and the teaching post pages.

Teaching Page Teaching Post - Date Bug Screenshot

Desktop:

Additional context I've tried the following steps to resolve the issue:

  1. Removed date and venue fields from the markdown file.
  2. Modified archive-single.html as follows: {% if post.collection == 'teaching' %}

    {% if post.type %}{{ post.type }}{% endif %} {% if post.venue %} {% if post.type %}, {% endif %} {{ post.venue }} {% endif %} {% if post.date %} {% if post.type or post.venue %}, {% endif %} {{ post.date | date: "%Y" }} {% endif %}

    {% endif %}

  3. I also tried removing these lines entirely from the code and the issue still persisted.
rjzupkoii commented 3 weeks ago

The template is written in such a way that it expects there to always be a date associated with teaching, which is why there is always output present. This is also needed for the sorting of the entries that take place. However, it should be possible to disable dates for the teaching assignments - how would you anticipate this working if you had a couple more teaching assignments to include?

ManeeshaAmpagouni commented 3 weeks ago

Thank you for your prompt response.

I would like to organize my teaching assignments based on the date, as it is useful for sorting entries. You make a great point! However, moving forward, for future teaching assignments, I would like to include the details of the quarter or semester during which the course is taught. Therefore, instead of displaying a specific year, I would like to display the particular quarter or semester in which I teach. I realize now, I could do that just by modifying the venue by adding a comma.

Thank you for your assistance.