Build Blog With Wagtail CMS
Minimum price
Suggested price

Build Blog With Wagtail CMS

About the Book

This book was considered one of the first and top learning resources for the Wagtail CMS framework. The book will be updated to keep up the changes of Wagtail CMS.

When I tried to build a CMS system using Wagtail CMS, I found out that there is no good resources for me to learn, all I can get is some simple blog posts or some Github projects which have no doc. So I decide to help people who are new to Wagtail CMS as well as those who want to add new feature to existing Wagtail project.

This book will teach you to create a standard blog step by step using Wagtail CMS from scratch!

To help people focus on the key part of the Wagtail, in this book I only paste part of the source code instead of the whole file. But all the source code can be check out from Github, so you can get it in your local env directly, debug or run.

By the end of this book, you will be able to create CMS sytem using Wagtail CMS and have a good understanding about it.

Who is this book for:

This book is for anyone interested in building a CMS using Python.

Basic Python knowledge is required, it would be better if you are familiar with Django.

About the Author


Michael Yin is a full stack developer from China, and he loves to write high-quality tutorial about programming.

He has published two books on Leanpub.

Build Blog With Wagtail CMS

Ultimate Guide To Scrapy

He is also the founder of a Digital Agency AccordBox and available for remote job.

Table of Contents

  • Preface
    • Why I wrote this book
    • Who is this book for
    • What you should know before reading
    • What if you have problem or suggestions
  • Wagtail Tutorials #1: Create Wagtail Project
    • Introduction
    • Step 1: Install Wagtail
    • Step 2: Project structure
    • Step 3: Start to play with templates
    • Conclusion
  • Wagtail Tutorials #2: Create Page Model
    • Introduction
    • Step 1: Start to play with the page model
    • Step 2: Hierarchical tree
    • Step 3: Create templates to show the content
    • Conclusion
  • Wagtail Tutorials #3: Category And Tag Support
    • Introduction
    • Categories
    • Tags
    • Show tags and categories in templates
    • Conclusion
  • Wagtail Tutorials #4: Routable Page
    • Introduction
    • Router
    • Customizing context
    • Reversing route urls
    • Conclusion
  • Wagtail Tutorials #5: Customize Blog Post URL
    • Introduction
    • Add date info into blog post url
    • Reversing post urls
    • Conclusion
  • Wagtail Tutorials #6: Import Bootstrap Theme Into Wagtail Blog
    • Introduction
    • Import bootstrap theme
    • Modify template
    • Template tags
    • Use Django-el-pagination to provide pagination in wagtail
    • Conclusion
  • Wagtail Tutorials #7: Add Search Function In Wagtail Blog
    • Introduction
    • Basic search function
    • Add search form to template
    • How to search multiple fields at one time?
    • Some notes about search backend in Wagtail
    • If you are also using Haystack
    • Conclusion
  • Wagtail Tutorials #8: Add Markdown Support In Wagtail Blog
    • Introduction
    • Import new MarkdownField and MarkdownPanel
    • SimpleMDE-Markdown-Editor
    • Render Markdown
    • Other Wagtail markdown resources
    • Conclusion
  • Wagtail Tutorials #9: Add LaTeX Support & Code Highlight In Wagtail
    • Introduction
    • Add code highlight support
    • Add LaTeX support
    • Conclusion
  • Wagtail Tutorials #10: Add Comment Support In Wagtail Blog
    • Introduction
    • Should I build new comment system or integrate 3 party comment service
    • Create new Disqus account and config
    • Integrate Disqus to Wagtail blog
    • Important notes:
    • Conclusion
  • Wagtail Tutorial #11: How to use StreamField in Wagtail
    • Introduction
    • What is the difference between RichText, Markdown, and StreamField
    • Basic concepts you should know
    • Get started
    • Custom Block
    • Create page using streamfield
    • Wagtail streamfield resources
    • Conclusion
  • Wagtail Tutorial #12: How to Create and Manage Menus of Wagtail application
    • Introduction
    • Prerequisites
    • Step 1 — Inspect Page object in Wagtail
    • Step 2 — Basic Menu Implementation
    • Step 3 — Change page order in Wagtail menu
    • Step 4 — Install wagtailmenus
    • Step 5 — Render menu using wagtailmenus
    • Conclusion
  • How to do A/B Testing in Wagtail CMS
    • Introduction
    • Step 1: Install wagtail-experiments
    • Step 2: Setup A/B test in Wagtail admin
    • Step 3: Check A/B test to see if it work
    • Step 4: How wagtail experiments work
    • Step 5: How to make js work with wagtail-experiments
    • Step 5: How to a/b test page design
    • Step 6: Something you should know
    • Conclusion
  • How to build form page in Wagtail
    • Introduction
    • Prerequisites
    • Step 1 - Create Model
    • Step2 - Create Template
    • Step3 - Config Email Test Env
    • Step4 - Enjoy Wagtail’s Powerful FormBuilder
    • Step5 - Check Submissions
    • Conclusion
  • How to build a landing page using Wagtail CMS
    • Introduction
    • Step 1 - Analyze the landing page template, build data models
    • Step 2 - Implement custom data models using Streamfield of Wagtail
    • Step 3 - Use Formbuilder of Wagtail to build form
    • Conclusion
  • How to make your Wagtail/Django project have good Python coding style
    • Introduction
    • PEP8
    • flake8
    • Autopep8
    • isort
    • Makefile
    • Check Python coding style in CI job
    • Conclusion
  • How to support multi-language in Wagtail CMS
    • Introduction
    • Preparation
    • Solution 1: Page tree
    • Solution 2: Model Translation
    • Conclusion
  • Wagtail Tip #1: How to replace ParentalManyToManyField with InlinePanel
    • Introduction
    • Step 1 - Add ParentalManyToManyField to your project
    • Step 2 - Find out the problem
    • Step 3 - How to replace ParentalManyToManyField
    • Step 4 - Check again in Wagtail admin
    • Conclusion
  • Wagtail Tip #2: How to Export & Restore Wagtail Site
    • Introduction
    • Step 1: Learn basic concepts
    • Step2: Skip unnecessary models
    • Step3: Dumpdata
    • Step4: How to troubleshoot
    • Conclusion
  • How to use SCSS/SASS in your Django project (Python Way)
    • Introduction
    • What is the difference between CSS, SCSS, SASS
    • What is the benefit when using SCSS
    • What is the SCSS workflow
    • What if you already have some CSS files in my Django project
    • Start using SCSS in Django project
    • Deploy SCSS in Django project
    • Advantages and Disadvantages of django_compressor solution
    • Conclusion
  • How to use SCSS/SASS in your Django project (NPM Way)
    • Introduction
    • Prerequisite
    • Step 1: Directory structure and workflow
    • Step 2: Install NPM dependencies
    • Step 3: Setup NPM command
    • Step 4: SCSS/SASS Auto Compile feature
    • Step 5: How to check code style of your SCSS/SASS
    • Step 6: NPM config
    • Step 7: How to deploy it using Docker
    • Some Tips
    • Pros and Cons of NPM solution
    • Conclusion
  • How to deploy Django project to Heroku using Docker
    • Introduction
    • Heroku Buildpacks and Heroku Container
    • Build manifest and Container Registry
    • Docker Build vs Docker Run
    • Step1: Start to write Dockerfile
    • Step2: Build Docker image
    • Step3: Docker run
    • Step4: Serving static assets on Heroku
    • Step5: Serving media files on Heroku
    • Step6: Remote DB support
    • Step7: heroku.xml
    • Step8: Deploy the Django project to Heroku
    • Step9: Add DB add-on
    • Tips
    • Conclusion
  • How to deploy Django project to Dokku
    • Introduction
    • Install Dokku
    • Config Dokku Server
    • Config Dokku App
    • Config our Django project
    • Deploy project
    • Some Advanced issues
    • Short reviews from Accordbox
    • Conclusion
  • How to deploy Django project to Dokku with Docker
    • Introduction
    • Heroku Buildpacks and Dockerfile
    • Install Dokku
    • Config Dokku Server
    • Config Dokku App
    • Config our Django project
    • Deploy project
    • Some Advanced issues
    • Short reviews from Accordbox
    • Conclusion

Authors have earned$9,656,384writing, publishing and selling on Leanpub, earning 80% royalties while saving up to 25 million pounds of CO2 and up to 46,000 trees.

Learn more about writing on Leanpub

The Leanpub 45-day 100% Happiness Guarantee

Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers), EPUB (for phones and tablets) and MOBI (for Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses! Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks. Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. It really is that easy.

Learn more about writing on Leanpub