Skip to content
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

Add custom atom.xml template to hide public draft news articles #1162

Merged

Conversation

TrialDragon
Copy link
Member

Fixes #1103

Adds an atom.xml template file that hides pages which are public draft from the news feeds, primary line of code relevant being Line 23. Note, this doesn't modify the last updated date, so that is still tracking the latest file regardless of public draft, but that is a minor issue that I think is irrelevant to our situation so far.

@TrialDragon TrialDragon added C-Bug A problem with the code that runs the site A-News labels May 14, 2024
Copy link
Contributor

@doup doup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I've poked around with Zola trying to find a workaround[0] but it looks like until this issue in Zola this is the best option.

Approved 👍.

0: Zola docs state Only pages with a date will be available.… but I couldn't make posts disappear while keeping the public draft preview. There is a zola build --drafts flag, but it comes with it's own issues.

<updated>{{ last_updated | date(format="%+") }}</updated>
<id>{{ feed_url | safe }}</id>
{%- for page in pages %}
{%- if not page.extra.public_draft %}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: For the next reviewer, this PR just adds lines 23 and 53. Original file.

@TrialDragon TrialDragon added the S-Ready-For-Final-Review Ready for a maintainer to consider for merging label May 14, 2024
@alice-i-cecile alice-i-cecile added this pull request to the merge queue May 14, 2024
Merged via the queue into bevyengine:main with commit ce17604 May 14, 2024
10 checks passed
@alice-i-cecile alice-i-cecile mentioned this pull request May 14, 2024
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-News C-Bug A problem with the code that runs the site S-Ready-For-Final-Review Ready for a maintainer to consider for merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hide public draft news pages from atom news feed
4 participants