All Projects → django-fluent → django-fluent-blogs

django-fluent / django-fluent-blogs

Licence: Apache-2.0 license
A blog engine with flexible block contents (based on django-fluent-contents)

Programming Languages

python
139335 projects - #7 most used programming language
HTML
75241 projects
CSS
56736 projects

Projects that are alternatives of or similar to django-fluent-blogs

sweetroll2
A powerful micro/blogging engine with IndieWeb features (abandoned)
Stars: ✭ 27 (-25%)
Mutual labels:  blogging, blog-engine
Vertigo
Blog engine in Go (golang)
Stars: ✭ 266 (+638.89%)
Mutual labels:  blogging, blog-engine
agouti
A platform for collective blogs and social media platform, forum, question and answer service. Catalog of sites (programs), site navigation and directories - facets. A community based on the PHP HLEB micro-framework.
Stars: ✭ 36 (+0%)
Mutual labels:  blogging, blog-engine
gisture
A minimal and flexible blog generator based on GitHub Gist.
Stars: ✭ 24 (-33.33%)
Mutual labels:  blogging, blog-engine
Blogetc
Easily add a full Laravel blog (with built in admin panel and public views) to your laravel project with this simple package.
Stars: ✭ 198 (+450%)
Mutual labels:  blogging, blog-engine
Leafpub
Simple, beautiful, open source publishing.
Stars: ✭ 645 (+1691.67%)
Mutual labels:  blogging, blog-engine
smallblog
Flat file markdown blogging system with filesystem watch and extended markdown support
Stars: ✭ 23 (-36.11%)
Mutual labels:  blogging, blog-engine
Lazyblorg
Blogging with Org-mode for very lazy people
Stars: ✭ 226 (+527.78%)
Mutual labels:  blogging, blog-engine
Elefant
Elefant, the refreshingly simple PHP CMS and web framework.
Stars: ✭ 188 (+422.22%)
Mutual labels:  blogging, blog-engine
Statiq.web
Statiq Web is a flexible static site generator written in .NET.
Stars: ✭ 1,358 (+3672.22%)
Mutual labels:  blogging, blog-engine
Slimcms
SlimCMS - lightweight CMS based on slim 3 framework
Stars: ✭ 201 (+458.33%)
Mutual labels:  blogging, blog-engine
Gistlog
GistLog - simple, easy blogging based on GitHub gists
Stars: ✭ 237 (+558.33%)
Mutual labels:  blogging, blog-engine
simonwillisonblog
The source code behind my blog
Stars: ✭ 64 (+77.78%)
Mutual labels:  blogging
shaai
Shaai's mono-repo library
Stars: ✭ 23 (-36.11%)
Mutual labels:  blogging
Wave
A podcast/blog theme for Ghost
Stars: ✭ 60 (+66.67%)
Mutual labels:  blogging
Blog.Core
Simple ASP.NET Core static blog engine
Stars: ✭ 15 (-58.33%)
Mutual labels:  blog-engine
awesome-dev.to
[UNMAINTAINED] A collection of awesome blog series on DEV.to
Stars: ✭ 18 (-50%)
Mutual labels:  blogging
template-mundana-bootstrap-html
Free blogging template by Sal (@wowthemesnet). Beautifully crafted with the latest technologies, SASS & Bootstrap 4.1.3, Mundana is the perfect design for your professional blog.
Stars: ✭ 39 (+8.33%)
Mutual labels:  blogging
writefreely
A clean, Markdown-based publishing platform made for writers. Write together and build a community.
Stars: ✭ 2,866 (+7861.11%)
Mutual labels:  blogging
subsocial-node
NOTE: Development continues in https://github.com/dappforce/subsocial-parachain repo. Subsocial full node with Substrate/Polkadot pallets for decentralized communities: blogs, posts, comments, likes, reputation.
Stars: ✭ 73 (+102.78%)
Mutual labels:  blog-engine

django-fluent-blogs

https://github.com/django-fluent/django-fluent-blogs/actions/workflows/tests.yaml/badge.svg?branch=master

This is a basic blogging engine, with the following features:

  • Archive views by date, author, category and tags.
  • Contents filled by django-fluent-contents
  • RSS and Atom feeds
  • Granularity in templates to override layouts.
  • Abstract base model for custom blog models.

Used applications:

TODO:

Installation

First install the module, preferably in a virtual environment:

pip install django-fluent-blogs

# Install the plugins of fluent-contents that you use:
pip install django-fluent-contents[text]

# Optional: to add tagging support + autocomplete use:
pip install django-taggit django-taggit-autocomplete-modified

Configuration

Add the applications to settings.py:

INSTALLED_APPS += (
    # Blog engine
    'fluent_blogs',

    # The content plugins
    'fluent_contents',
    'fluent_contents.plugins.text',

    # Support libs
    'categories_i18n',
    'django_wysiwyg',
    'slug_preview',

    # Optional commenting support
    'django_comments',

    # Optional tagging
    'taggit',
    'taggit_autocomplete_modified',
)

DJANGO_WYSIWYG_FLAVOR = "yui_advanced"

Note that not all applications are required; tagging is optional, and so are the various fluent_contents.plugin.* packages.

Include the apps in urls.py:

urlpatterns += patterns('',
    url(r'^admin/util/taggit_autocomplete_modified/', include('taggit_autocomplete_modified.urls')),
    url(r'^blog/comments/', include('django_comments.urls')),
    url(r'^blog/', include('fluent_blogs.urls')),
)

The database can be created afterwards:

./manage.py migrate

In case additional plugins of django-fluent-contents are used, follow their installation instructions as well. Typically this includes:

  • adding the package name to INSTALLED_APPS.
  • running pip install django-fluent-contents[pluginname]
  • running ./manage.py syncdb

Configuring the templates

To display the blog contents, a fluent_blogs/base.html file needs to be created. This will be used to map the output of the module to your site templates.

The base template needs to have the blocks:

  • content - displays the main content
  • title - the <head> title fragment.
  • link - displays <link> tags for RSS feeds.
  • script - includes additional <script> tags.
  • meta-description - the value of the meta-description tag.
  • meta-keywords - the value for the meta-keywords tag.
  • og-type - the OpenGraph type for Facebook (optional)
  • og-description the OpenGraph description for Facebook (optional)

The fluent_blogs/base.html template could simply remap the block names to the site's base.html template. For example:

{% extends "base.html" %}

{% block headtitle %}{% block title %}{% endblock %}{% endblock %}

{% block main %}
    {# This area is filled with the blog archive/details:
    {% block content %}{% endblock %}

    {# Add any common layout, e.g. a sidebar here #}
{% endblock %}

When all other block names are already available in the site's base.html template, this example should be sufficient.

The filename of the base template can also be changed by defining the FLUENT_BLOGS_BASE_TEMPLATE setting.

Comments

The commenting support can be based on django-contrib-comments, or any other system of your choice. To integrate django-contrib-comments with your site theme, also create a comments/base.html template that maps the blocks:

Adding pages to the sitemap

Optionally, the blog pages can be included in the sitemap. Add the following in urls.py:

from fluent_blogs.sitemaps import EntrySitemap, CategoryArchiveSitemap, AuthorArchiveSitemap, TagArchiveSitemap

sitemaps = {
    'blog_entries': EntrySitemap,
    'blog_categories': CategoryArchiveSitemap,
    'blog_authors': AuthorArchiveSitemap,
    'blog_tags': TagArchiveSitemap,
}

urlpatterns += patterns('',
    url(r'^sitemap.xml$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps': sitemaps}),
)

Integration with django-fluent-pages:

To integrate with the page types of django-fluent-pages, don't include fluent_blogs.urls in the URLconf:

urlpatterns += patterns('',
    url(r'^admin/util/taggit_autocomplete_modified/', include('taggit_autocomplete_modified.urls')),
    url(r'^blog/comments/', include('django_comments.urls')),   # or fluent_comments.urls
)

Instead, add a page type instead:

INSTALLED_APPS += (
    'fluent_pages',
    'fluent_blogs.pagetypes.blogpage',
)

A "Blog" page can now be created in the page tree of django-fluent-pages at the desired URL path.

Integration with django-fluent-comments:

To use Ajax-based commenting features of django-fluent-comments, include it in settings.py:

INSTALLED_APPS += (
    'fluent_blogs',
    'fluent_comments',      # Before django_comments
    'django_comments',

    ...
)

Include the proper module in urls.py:

urlpatterns += patterns('',
    url(r'^blog/comments/', include('fluent_comments.urls')),

    ...
)

This module will detect the installation, and enable the moderation features and include the required CSS and JavaScript files to have a Ajax-based commenting system.

Integration with other commenting systems

To use a different commenting system instead of django-contrib-comments (e.g. DISQUS or Facebook-comments), override the following templates:

  • fluent_blogs/entry_detail/comments.html

These CSS/JavaScript includes are generated using:

  • fluent_blogs/entry_detail/comments_css.html
  • fluent_blogs/entry_detail/comments_script.html

Overriding the blog layout

To change the layout of the blog , the following templates can be overwritten:

In the archive/list page:

  • fluent_blogs/entry_archive.html - the starting point, which includes all sub templates:
  • fluent_blogs/entry_archive/item.html - a single list item (extends fluent_blogs/entry_contents_base.html).
  • fluent_blogs/entry_archive/empty.html - the default message when there are no entries.
  • fluent_blogs/entry_archive/pagination.html - the pagination at the bottom of the page.

In the detail page:

  • fluent_blogs/entry_detail.html - the starting point, which includes all sub templates:
  • fluent_blogs/entry_detail/contents.html - the entry contents (extends fluent_blogs/entry_contents_base.html).
  • fluent_blogs/entry_detail/widgets.html - space to add Social Media buttons.
  • fluent_blogs/entry_detail/comments.html - the comments.
  • fluent_blogs/entry_detail/navigation.html - the entry navigation links
  • fluent_blogs/entry_detail/page_footer.html - space below the comments to add Social Media buttons.
  • fluent_blogs/entry_detail/comments_css.html
  • fluent_blogs/entry_detail/comments_script.html

Common appearance:

  • fluent_blogs/entry_contents_base.html - the common appearance of entries in the archive and detail page.
  • fluent_blogs/base.html - the base template, e.g. to introduce a common sidebar.

Shared entry layout

When the layout of individual entries is shared with

  • By default, the contents fluent_blogs/entry_archive/item.html and , based on fluent_blogs/entry_archive/item.html by default

Custom entry models

This applications supports the use of custom models for the blog entries. Include the following setting in your project:

FLUENT_BLOGS_ENTRY_MODEL = 'myapp.ModelName'

This application will use the custom model for feeds, views and the sitemap. The model can either inherit from the following classes:

  • fluent_blogs.models.Entry (the default entry)
  • fluent_blogs.base_models.AbstractEntry (the default entry, as abstract model)
  • A mix of fluent_blogs.base_models.AbstractEntryBase combined with:
  • fluent_blogs.base_models.ExcerptEntryMixin
  • fluent_blogs.base_models.ContentsEntryMixin
  • fluent_blogs.base_models.CommentsEntryMixin
  • fluent_blogs.base_models.CategoriesEntryMixin
  • fluent_blogs.base_models.TagsEntryMixin

When a custom model is used, the admin needs to be registered manually. The admin can inherit from either:

  • fluent_blogs.admin.AbstractEntryBaseAdmin
  • fluent_blogs.admin.EntryAdmin

The views are still rendered using the same templates, but you can also override:

  • myapp/modelname_archive_*.html
  • myapp/modelname_detail.html
  • myapp/modelname_feed_description.html

Contributing

This module is designed to be generic, and easy to plug into your site. In case there is anything you didn't like about it, or think it's not flexible enough, please let us know. We'd love to improve it!

If you have any other valuable contribution, suggestion or idea, please let us know as well because we will look into it. Pull requests are welcome too. :-)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].