nephila / djangocms-blog

django CMS blog application - Support for multilingual posts, placeholders, social network meta tags and configurable apphooks
https://djangocms-blog.readthedocs.io
BSD 3-Clause "New" or "Revised" License
392 stars 192 forks source link

Feature/694 Content Hub Functionality #695

Open fsbraun opened 2 years ago

fsbraun commented 2 years ago

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 configuration

Additionally, as requested by #696 both the Post slug and the BlogCategory slug are now consistently set either to allow for unicode characters or not. This is controlled by a new setting BLOG_ALLOW_UNICODE_SLUGS which defaults to True.

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

codecov[bot] commented 2 years ago

Codecov Report

Merging #695 (b181e93) into develop (d183828) will decrease coverage by 7.19%. The diff coverage is 77.33%.

@@             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     
Flag Coverage Δ
unittests 87.31% <77.33%> (-7.20%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
djangocms_blog/urls_hub.py 0.00% <0.00%> (ø)
djangocms_blog/views.py 89.47% <50.00%> (-4.01%) :arrow_down:
djangocms_blog/cms_appconfig.py 92.98% <57.14%> (-5.06%) :arrow_down:
djangocms_blog/forms.py 95.41% <80.00%> (-1.56%) :arrow_down:
djangocms_blog/admin.py 83.40% <88.88%> (ø)
djangocms_blog/models.py 96.47% <91.66%> (ø)
djangocms_blog/cms_apps.py 92.59% <100.00%> (+0.92%) :arrow_up:
djangocms_blog/settings.py 100.00% <100.00%> (ø)
djangocms_blog/urls.py 100.00% <100.00%> (ø)
djangocms_blog/urls_base.py 100.00% <100.00%> (ø)
... and 12 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update d183828...b181e93. Read the comment docs.

coveralls commented 2 years ago

Coverage Status

Coverage decreased (-6.5%) to 90.455% when pulling b181e93df1bcdda1e8a5b9fdac78c21df9d566a4 on fsbraun:feature/694-content-hub into d18382808766548c0ec1b9f0dabe443d5430aebf on nephila:develop.

yakky commented 1 year ago

@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 :sweat_smile:

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.

yakky commented 1 year ago

Fix #694

Fix #696