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

Public Archive Improvements #1262

Merged
merged 11 commits into from
Apr 8, 2023
Merged

Public Archive Improvements #1262

merged 11 commits into from
Apr 8, 2023

Conversation

justinbeaty
Copy link
Contributor

This PR does two things. I can split into separate PRs if requested.

  1. Adds an example.com/archive/latest page that renders the most recent newsletter.
  2. Adds a <content:encoded> element into the RSS feed. (Fixes Campaign body in RSS feed #1033)

For item 2, perhaps we should add a config option for this? Something like this (mockup):

image

Note: I did have to add complexity to the get-archived-campaigns query, which I think is an acceptable trade off and it makes the function's description more accurate:

// GetArchivedCampaigns retrieves campaigns with a template body.
func (c *Core) GetArchivedCampaigns(offset, limit int) (models.Campaigns, int, error) {

@knadh
Copy link
Owner

knadh commented Mar 26, 2023

This is nice! Thanks @justinbeaty. Related: #1033

Yes, we should have that as a config option. Would you be able to add a commit for that or would you want me to? We've to:

  • Add a DB migration for v2.5.0 for the new config field.
  • Add it to the Vue UI and in settings.go
  • Add it to constants (init.go) for it to be available to the handler to decide.

@knadh knadh added the enhancement New feature or request label Mar 26, 2023
@justinbeaty
Copy link
Contributor Author

We've to:

  • Add a DB migration for v2.5.0 for the new config field.
  • Add it to the Vue UI and in settings.go
  • Add it to constants (init.go) for it to be available to the handler to decide.

Thanks for the list of TODO, I can add the commit.

@justinbeaty
Copy link
Contributor Author

Added the config option with default value true. I guess that's probably okay, but could change it to false if you think that's better.

@justinbeaty
Copy link
Contributor Author

I've pushed this code to production for a few days now and all seems well. I've been testing the public rss feed with inoreader.com.

@knadh
Copy link
Owner

knadh commented Apr 5, 2023

Thanks @justinbeaty. Will review this and merge this in the coming few days.

Add the missing `archive` context in all language strings and
field names related to public archive settings.

- This introduces breaking changes to the database settings key.
  `enable_rss_content` to `enable_public_archive_rss_content`.
- Tweaks i18n strings.
- Adds missing `enable_public_archive_rss_content` key in installation
  schema.
@knadh
Copy link
Owner

knadh commented Apr 6, 2023

Hi @justinbeaty. I've pushed a couple of commits with minor changes. Can you review?

@justinbeaty
Copy link
Contributor Author

Fixed a typo in i18n/en.json ("Show full full e-mail content") and re-ran scripts/refresh-i18n.sh.

I will test this out today. For my own reference, I ran these postgres queries so I can re-run the update process:

update settings set value = '["v1.0.0", "v2.0.0", "v2.1.0", "v2.2.0", "v2.3.0", "v2.4.0"]' where key = 'migrations';
delete from settings where key = 'app.enable_rss_content';

@justinbeaty
Copy link
Contributor Author

justinbeaty commented Apr 6, 2023

@knadh Besides the one comment above about default true/false values, all seems good. I tested locally and everything was working.

@knadh knadh merged commit 476d5be into knadh:master Apr 8, 2023
@knadh
Copy link
Owner

knadh commented Apr 8, 2023

Thank you once again for the excellent PR @justinbeaty!

@Sjors
Copy link

Sjors commented Jul 11, 2023

Thanks for this! Are you planning on tagging a new release in the near future?

@justinbeaty
Copy link
Contributor Author

@Sjors per the comment here it would seem there’s a release coming. Hope you enjoy it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Campaign body in RSS feed
3 participants