-
-
Notifications
You must be signed in to change notification settings - Fork 323
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
Fix URLs in CSV exports #205
Conversation
This includes the instance's hostname in calls to export a CSV file and PublicPost.CanonicalURL(). It also fixes a panic in that method during CSV export caused by draft posts.
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.
found a few issues with templates after this change, I have a fix to push already
the change to take a hostname in Post.CanonicalURL broke a few template using that function. This adds a Hostname string to the Post being passed to templates and passes it to calls to Post.CanonicalURL
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.
with the change to post templates this looks good now, and confirmed working exports of csv urls.
tested reader, collection*posts, pinned and posts templates
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.
Ah thanks, great catch. Just one comment
ok all set |
Perfect 👍 Thanks for the review! Merging now. |
This fixes a template rendering issue caused by bad references to $.Host in pinned posts links on single-user instances. Closes #207
Fix collection template issues introduced in #205
This includes the instance's hostname in calls to export a CSV file and
PublicPost.CanonicalURL()
.It also fixes a panic in that method during CSV export caused by draft posts.