Coder Social home page Coder Social logo

wagtail_blog's Introduction

wagtail_blog

A WordPress-like blog app implemented in Wagtail.

Build Status

What is it

After reimplimenting WordPress-like blogs over and over again in Wagtail I decided to just make this. Feel free to use as is or copy it as a starting point. It's based on the Wagtail demo blog but is closer to a standard WordPress blog style.

Features

  • Categories and tags with views
  • RSS
  • Basic starter templates with pagination
  • Comments
  • WordPress importer

Work in progress?

  • Disqus comments

Installation

  1. pip install wagtail-blog
  2. Add blog to INSTALLED_APPS
  3. Add url(r'^blog/', include('blog.urls', namespace="blog")), to urls.py
  4. python manage.py migrate
  5. Override templates as needed.

Settings

  • BLOG_PAGINATION_PER_PAGE (Default 10) Set to change the number of blogs per page. Set to None to disable (useful if using your own pagination implementation).
  • BLOG_LIMIT_AUTHOR_CHOICES_GROUP Optionally set this to limit the author field choices based on this Django Group. Otherwise it defaults to check if user is_staff.

Import from WordPress

  1. Enable WordPress JSON API
  2. Create a Blog index page and note the title. Let's pretend my blog index page title is "blog"
  3. Run ./manage.py wordpress_to_wagtail http://myblog.com blog username password the username is your WordPress username with full access to the API. Without this you can't access all blog posts.

This works by getting the json data for your posts and making Wagtail pages for them. It then downloads any images it finds and replaces urls to use your site instead of an external site. Blog authors will become Django users. This is a complex process and is prone to error. You should plan to review the import code and fix some issues. Pull requests welcome to improve this feature.

Comments

django-comments-xtd comments work out of the box. Just install it as directed here. Customizing the xtd comment templates should be all you need - but feel free to review this app's templates which you may want to override.

Out of box Disqus coming someday - but it's pretty easy to add manually following the Disqus documentation and overriding templates.

Feel free to contribute other comment implimentations.

Hacking

The included docker-compose file should make it easy to get up and running.

  1. Install docker and docker-compose
  2. docker-compose up
  3. docker-compose run --rm web ./manage.py migrate
  4. docker-compose run --rm web ./manage.py createsuperuser
  5. Log in and create a blog index page with blog pages to see a very basic implementation.

wagtail_blog's People

Contributors

bufke avatar fromageball avatar dimiro1 avatar tomdyson avatar tomtom5152 avatar

Watchers

Sangmin Ahn avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.