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

Feature/694 Content Hub Functionality #695

Open
wants to merge 27 commits into
base: develop
Choose a base branch
from

Conversation

fsbraun
Copy link
Contributor

@fsbraun fsbraun commented Nov 30, 2021

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

  • Extends the BlogCategory model adding a description field and a priority field
  • Extends the Post model by a pinned field allowing to "pin" posts to the front of the list and giving pinned posts an order
  • Adding the capability to set urlconfs for each apphook independently.
  • Add an example template set for content hub capability

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

  • I have read the contribution guide
  • Code lint checked via inv lint
  • changes file included (see docs)
  • Usage documentation added in case of new features
  • Tests added

@fsbraun fsbraun mentioned this pull request Dec 13, 2021
@codecov
Copy link

codecov bot commented Dec 16, 2021

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%) ⬇️

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%) ⬇️
djangocms_blog/cms_appconfig.py 92.98% <57.14%> (-5.06%) ⬇️
djangocms_blog/forms.py 95.41% <80.00%> (-1.56%) ⬇️
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%) ⬆️
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
Copy link

coveralls commented Dec 16, 2021

Coverage Status

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

@yakky
Copy link
Member

yakky commented Jul 28, 2022

@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.

@yakky
Copy link
Member

yakky commented Jul 28, 2022

Fix #694

Fix #696

@yakky yakky force-pushed the develop branch 2 times, most recently from 36e5e25 to 5220d47 Compare May 8, 2023 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Russian slug to Latin Content hub capability
3 participants