From 14dfff12875106ccd2f7e4b25ae66ea2396aef17 2015-01-27 10:31:41 From: Michael A. Guravage Date: 2015-01-27 10:31:41 Subject: [PATCH] Changes facilitate publication, e.g., SITEURL defined in publishconf.py, URLs suffixes removed and Makefile SSH variable assigned realistic values. Changes to be committed: modified: Makefile new file: content/extras/top-htaccess modified: pelicanconf.py modified: publishconf.py --- diff --git a/projects/cwi/Makefile b/projects/cwi/Makefile index dc640c3c59a95af92dcb771c288bb9a3832e4dba..dbf712b3d65d17684d08e5f0931dec2c7047a422 100644 --- a/projects/cwi/Makefile +++ b/projects/cwi/Makefile @@ -12,10 +12,10 @@ FTP_HOST=localhost FTP_USER=anonymous FTP_TARGET_DIR=/ -SSH_HOST=localhost +SSH_HOST=desktop.cwi.nl SSH_PORT=22 -SSH_USER=root -SSH_TARGET_DIR=/var/www +SSH_USER=$(USER) +SSH_TARGET_DIR=/cwi/www/homepages/cws/ S3_BUCKET=my_s3_bucket diff --git a/projects/cwi/content/extras/top-htaccess b/projects/cwi/content/extras/top-htaccess new file mode 100644 index 0000000000000000000000000000000000000000..1df307e940932c512dc657b01f0ecc8ff215a5bd --- /dev/null +++ b/projects/cwi/content/extras/top-htaccess @@ -0,0 +1 @@ +Options +MultiViews diff --git a/projects/cwi/pelicanconf.py b/projects/cwi/pelicanconf.py index cc10dca9af787e33a4bd6e111326767b22669c78..7979485c0d4f345fa0cd9c71351df0b49984c7df 100644 --- a/projects/cwi/pelicanconf.py +++ b/projects/cwi/pelicanconf.py @@ -3,21 +3,18 @@ from __future__ import unicode_literals AUTHOR = u'M.A. Guravage' +DEFAULT_LANG = u'en' +PATH = 'content' SITENAME = u'CWI Pelican Template' SITEURL = '' - -PATH = 'content' - TIMEZONE = 'Europe/Amsterdam' -DEFAULT_LANG = u'en' - # Feed generation is usually not desired when developing -FEED_ALL_ATOM = None -CATEGORY_FEED_ATOM = None -TRANSLATION_FEED_ATOM = None AUTHOR_FEED_ATOM = None AUTHOR_FEED_RSS = None +CATEGORY_FEED_ATOM = None +FEED_ALL_ATOM = None +TRANSLATION_FEED_ATOM = None # Blogroll LINKS = (('CWI', 'http://www.cwi.nl'), @@ -28,24 +25,47 @@ LINKS = (('CWI', 'http://www.cwi.nl'), SOCIAL = (('twitter', 'https://twitter.com/CWInl'), ('github', 'http://github.com'),) -STATIC_PATHS = ['static', 'images', 'private', 'extras/.htaccess', 'extras/.htpassword', 'extras/favicon.ico'] -PAGE_PATHS = ['pages'] +STATIC_PATHS = ['static', 'images', 'private', + 'extras/.htaccess', 'extras/.htpassword', + 'extras/top-htaccess', 'extras/favicon.ico'] + ARTICLE_PATHS = ['News'] -ARTICLE_URL = 'articles/{slug}.html' -ARTICLE_SAVE_AS = 'articles/{slug}.html' +ARTICLE_URL = 'news/{slug}' +ARTICLE_SAVE_AS = 'news/{slug}.html' + +# AUTHOR_URL = 'speakers/{slug}' +# AUTHOR_SAVE_AS = 'speakers/{slug}.html' +# AUTHORS_URL = 'speakers' +# AUTHORS_SAVE_AS = 'speakers/index.html' + +CATEGORY_URL = 'category/{slug}' +CATEGORY_SAVE_AS = 'category/{slug}.html' + +PAGE_PATHS = ['pages'] +PAGE_URL = 'pages/{slug}' DEFAULT_PAGINATION = 10 -USE_FOLDER_AS_CATEGORY = True DISPLAY_CATEGORIES_ON_MENU = True DISPLAY_PAGES_ON_MENU = True LOAD_CONTENT_CACHE = False +USE_FOLDER_AS_CATEGORY = True EXTRA_PATH_METADATA = { 'extras/.htaccess': {'path': 'private/.htaccess'}, 'extras/.htpassword': {'path': 'private/.htpassword'}, - 'extras/favicon.ico': {'path': 'favicon.ico'} + 'extras/favicon.ico': {'path': 'favicon.ico'}, + 'extras/top-htaccess': {'path': '.htaccess'}, } +# DIRECT_TEMPLATES = ('authors', 'archives', 'tags') +# MENUITEMS = [ +# ('Welcome', ''), +# ('Presentations', '/category/presentations'), +# ('Speakers', '/speakers'), +# ('Tags', '/tags'), +# ('Archives', '/archives'), +# ] + THEME = 'cwi' # Uncomment following line if you want document-relative URLs when developing diff --git a/projects/cwi/publishconf.py b/projects/cwi/publishconf.py index 85ff8ef6981db9aaf809eeb6b971ea62c7555301..4545b7891f3a9f571c1571e8946431a21dcfa81a 100644 --- a/projects/cwi/publishconf.py +++ b/projects/cwi/publishconf.py @@ -10,8 +10,9 @@ import sys sys.path.append(os.curdir) from pelicanconf import * -SITEURL = '' +SITEURL = 'http://event.cwi.nl/' RELATIVE_URLS = False +#MENUITEMS = [(title, ''.join((SITEURL, url))) for title, url in MENUITEMS] FEED_ALL_ATOM = 'feeds/all.atom.xml' CATEGORY_FEED_ATOM = 'feeds/%s.atom.xml'