Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
When SpaceDock has a planned downtime, it's a struggle to notify users ahead of time. The only place that all SpaceDock users go is SpaceDock itself (unless you count CKAN users who don't even do that), but currently it has no ability to display such notifications.
Changes
Now a new "Global announcement at top of all pages" checkbox appears when creating or editing a blog post. If checked, a new
BlogPost.announcement
column is set to true. All blog posts with that column set to true are pulled in to (Markdown-enabled) banners across the top of every page. To make sure this is fast, the new column is indexed.To remove an announcement, the admin can edit the blog post and uncheck the checkbox.
This pull request also attempts to make the blog somewhat usable.
BlogPost.query.filter(BlogPost.id == id).first()
to load a recordBlogPost.query.get(id)
insteaddisqus_id
in config.ini, Disqus functionality is enabled. If you don't set it, the links are still there but they don't work.disqus_id
setting isn't set, the Disqus functionality is not shown (including the "leave a comment, etc" blurb). This fixes #241.