From 17cb8fdf72244c6f80ef87511a5344212026d7d3 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Thu, 10 Mar 2016 00:11:30 +0100 Subject: [PATCH] Add information on Attaching blog to the home page --- README.rst | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/README.rst b/README.rst index 4443441..b3390d1 100644 --- a/README.rst +++ b/README.rst @@ -235,6 +235,30 @@ like the following in the project settings:: And change ``post/`` with the desired prefix. +Attaching blog to the home page ++++++++++++++++++++++++++++++++ + +If you want to attach the blog to the home page you have to adapt settings a bit otherwise the +"Just slug" permalink will swallow any CMS page you create. + +To avoit this add the following settings to you project:: + + BLOG_PERMALINKS = ( + ('full_date', _('Full date')), + ('short_date', _('Year / Month')), + ('category', _('Category')), + ) + BLOG_PERMALINKS_URLS = { + 'full_date': r'^(?P\d{4})/(?P\d{1,2})/(?P\d{1,2})/(?P\w[-\w]*)/$', + 'short_date': r'^(?P\d{4})/(?P\d{1,2})/(?P\w[-\w]*)/$', + 'category': r'^(?P\w[-\w]*)/(?P\w[-\w]*)/$', + } + +Notice that the last permalink type is no longer present. + +Then, pick any of the three remaining permalink types in the layout section of the apphooks config +linked ot the home page (see http://yoursite.com/admin/djangocms_blog/blogconfig/).' + Menu ++++