-
Notifications
You must be signed in to change notification settings - Fork 191
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
Feature/694 Content Hub Functionality #695
base: develop
Are you sure you want to change the base?
Conversation
…es and option to sort posts
Add: pinned_posts property to BlogCategory
Add: CategoryListView only starts with top-level categories Fix: settings.py
Fix: Only categories with a not None priority are shown in the CategoryListView
Codecov Report
@@ Coverage Diff @@
## develop #695 +/- ##
===========================================
- Coverage 94.51% 87.31% -7.20%
===========================================
Files 21 29 +8
Lines 1112 1845 +733
Branches 138 302 +164
===========================================
+ Hits 1051 1611 +560
- Misses 23 175 +152
- Partials 38 59 +21
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@fsbraun Hi Fabian, sorry for the long delay in reviewing this. It looks pretty solid and interesting feature to have: bit by bit we are turning djangocms-blog in a CMS in itself 😅 I have high in my priority list for the next days to make the testsuite work again to be able to merge the code that has been waiting for too much time and to update djangocms-blog to the current django CMS ecosystem. For now I gave a cursory look at your proposal and I like it. I am going to take some days to understand the side effects of urlconf configurability and its implications, but other than that it look good to me. Once I have the tests running again I will provide some suggestions about the part of this that will require some tests. Thanks a lot again for the great work, and I will get back to you really soon. |
36e5e25
to
5220d47
Compare
Description
A content hub is a centralized online destination that contains curated content
around a specific topic. There are potentially significant SEO benefits to creating
a content hub.
While a traditional blog shows posts ordered by time of publication, posts in a content
hub are organized around categories and their priority is curated by the editors. Content
is updated more often and does not get hidden by pagination. See, e.g., https://backlinko.com/hub/seo
This PR implements content hubs for
djangocms_blog
using categories. `This PR extends the
BlogCategory
model and allows for apphook-specific configurationBlogCategory
model adding a description field and a priority fieldPost
model by apinned
field allowing to "pin" posts to the front of the list and giving pinned posts an orderAdditionally, as requested by #696 both the
Post
slug and theBlogCategory
slug are now consistently set either to allow for unicode characters or not. This is controlled by a new settingBLOG_ALLOW_UNICODE_SLUGS
which defaults toTrue
.Any feedback to this PR is highly welcome.
Issues
Testing seems to be not working since test requirements cannot be resolved. I will gladly add test cases if I can manage to run them. Hints on getting tests to run are welcome.
References
This PR provides the ideas given in #694
Fix #694
Fix #696
Checklist
inv lint
changes
file included (see docs)