-
Notifications
You must be signed in to change notification settings - Fork 283
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 section for announcements and RSS feeds #2744
Conversation
I checked the failing test: It seems that |
That's not ruff, it's a pre-commit hook. We might have to define an exception for the RSS template file. I hope I can look at this PR sometime soon, but I'm still on vacation so it might be a week or two :) |
Yeah, I noticed that it's a call where multiple things are happening at once. I could reproduce the error locally. I hope I can find some time to look into this, but my calendar is pretty full for September. 🙈 |
For the failing "end-of-file-fixer" check, make sure to end the template file with a newline (or just run For the failing "check-xml" check, change the exclude pattern in
(Currently it just excludes the sitemap.xml, with this change, it excludes both sitemap.xml and the RSS template.) The If you can fix the failing checks, I would then suggest we push your changes to a branch within this repo, so that an automatic preview is generated where we can look at the changes directly. :) |
Hey there. 👋 It took me a while to find time for this again. 🙈 Thanks for the detailed instructions on how to fix the checks. 👍 I applied the changes you suggested, and the checks work locally for me now when I run
Good point. I mainly kept it because I thought there might not be a guarantee that the ingestion date is always provided for future ingestions. I disabled the flag in the Makefile, but I think its probably best if I also delete the related code, right? Less dead stuff to maintain. |
@mbollmann Hi. I just wanted to let you know that I have a lot of spare time for private projects this week, so this would be the ideal time for me to wrap this up. Please let me know if I can help with anything regarding the preview that you mentioned. 😃 |
As mentioned in another comment, I found this RSS viewer. It wants to load too many ad-related scripts for my taste, but with a script blocker, it does the job. I would also like to test the new changes with an actual RSS reader such as Feedly. The last preview renders like this:
Good point. I just added it. 👍 |
I'm getting an XML validation error now on the preview due to an unescaped & character in the |
Damn, I totally misinterpreted what After removing the call, the |
* Propagate volume "editor" field to contained papers * Add editor to metadata list on paper pages * Remove AnthologyIndex.verify() Removing `AnthologyIndex.verify()` because it doesn't actually do what it advertises. The comment suggests that it throws an error when a name is used both without and with more than one explicit ID; what it actually checks is if the paper is used more than once with an explicit ID, even if that ID is always the same. The ambiguity check should already be performed in `AnthologyIndex.register()`, so I don't see a reason to keep this function around at all, because all it does right now is raise false positives. * Add CSL file to this repo and adjust it to current ACL bst style
Ah, that's what happened! 😁 If I had more time to look at things right now, I might have noticed. ;) Force-pushed updates to #2859. |
I looked this over and think it's great. There was one question about using What do you think? Would this be too much work to make these adjustments? I'm very sorry that I let this drop—thanks for this work, and the recent prod. I will make it a top priority to get this merged ASAP. |
Done. 😄 I kept the word "news" instead of "posts" in all the visible texts on the page and used the
No problem. I also forgot about this for a while since I had a lot on my plate. Happy to see that there is still interest in this. 😄 |
@mbollmann do you have time to approve? I'd like to get two sign-offs here. If you don't think you can manage this week, I may just go ahead. |
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 also totally forgot about this PR. Looks good to me (although I have not tested it locally).
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.
Yes, looks good to me too!
Thanks for the reviews! Happy to see this feature make it into the website. I just added the RSS feed to my Feedly account. 🤗 🥳 |
Closes #358.
Closes CSchoel#2.
Closes CSchoel#3.
This alters the existing RSS feeds that were generated by Hugo to be sorted by date and limited to 1000 items. The RSS feeds are mentioned in
hugo/layouts/index.html
,hugo/layouts/_default/index_flex.html
, andhugo/content/news/announce_news.md
. For theindex.html
I used a yellow button for the RSS feed (as the RSS logo is orange) and switched the feedback button to green. I also added the RSS feeds as a<link rel="alternate" ...
to the header of each page.For paper release dates, I used the
ingest-date
from the XML data, if available. For unknown ingest dates, I then tried to parse the date from theyear
andmonth
fields of papers. The Python code runs without errors for all existing papers, but could break in the future due to unknown formats for themonth
field. If this happens, you can easily disable this by removing the--replace-date
option in theMakefile
wherepython3 bin/create_hugo_pages.py
is called. I did not add paper abstracts to the RSS feed since that would increase the file size, which is already quite large.Additionally, I added a folder
hugo/content/news
with a first news post and also mentioned that new section inhugo/layouts/index.html
,hugo/layouts/_default/index_flex.html
, andhugo/content/news/announce_news.md
. Hugo automatically creates an RSS feed for this new section, so there was not more to do there. As mentioned in CSchoel#3, please feel free to use or discard the test post however you like.There is only one open question left: I found the
posts
section, which seems to do almost the same as the newnews
section. Was it a conscious choice to abandon the old section? If not, we could use that one instead ofnews
.Please let me know if I should change anything else.