PageRenderTime 42ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/am207/pelicanconf.py

https://github.com/AM207/Site
Python | 105 lines | 62 code | 23 blank | 20 comment | 0 complexity | 8e97ff9b3521ee02463da9ee2ed4de55 MD5 | raw file
Possible License(s): WTFPL
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*- #
  3. from __future__ import unicode_literals
  4. AUTHOR = u'Pavlos Protopapas'
  5. SITENAME = u'AM207'
  6. SITEURL = 'http://localhost:8000'
  7. TIMEZONE ="America/New_York"
  8. THEME = '../pelican-bootstrap3-modified'
  9. BOOTSTRAP_THEME = 'flatly'
  10. TWITTER_USERNAME="am207"
  11. DEFAULT_LANG = u'en'
  12. DEFAULT_DATE = 'fs'
  13. # Feed generation is usually not desired when developing
  14. FEED_ALL_ATOM = "feeds/all.atom.xml"
  15. CATEGORY_FEED_ATOM = None
  16. TRANSLATION_FEED_ATOM = None
  17. # Blogroll
  18. LINKS = (('Piazza', 'https://piazza.com/harvard/spring2014/am207/home'),
  19. ('Videos', 'http://cm.dce.harvard.edu/2014/02/24104/publicationListing.shtml'),
  20. ('ISite', 'http://isites.harvard.edu/icb/icb.do?keyword=k102129&login=yes'),)
  21. OTHERLINKS = (('Numpy', 'http://docs.scipy.org/doc/numpy/reference/'),
  22. ('Scipy', 'http://docs.scipy.org/doc/scipy/reference/'),
  23. ('Pandas', 'http://pandas.pydata.org/pandas-docs/dev/'),
  24. ('Matplotlib', 'http://matplotlib.org/api/index.html'),
  25. ('PyMC3', 'https://github.com/pymc-devs/pymc'),
  26. ('IACS', 'http://iacs.seas.harvard.edu'),)
  27. # Social widget
  28. #SOCIAL = (('twitter', 'http://twitter.com/am207'),)
  29. SOCIAL=True
  30. DEFAULT_PAGINATION = 10
  31. # Uncomment following line if you want document-relative URLs when developing
  32. #RELATIVE_URLS = True
  33. MD_EXTENSIONS = ['codehilite(css_class=highlight)', 'extra']
  34. NEWEST_FIRST_ARCHIVES = True
  35. USE_FOLDER_AS_CATEGORY=False
  36. #MENU
  37. DISPLAY_PAGES_ON_MENU=False
  38. DISPLAY_CATEGORIES_ON_MENU=False
  39. ARTICLEDIR='posts'
  40. PAGEDIR='pages'
  41. PAGE_EXCLUDES=('othermd',)
  42. ARTICLE_EXCLUDES=('pages','othermd',)
  43. #categiries: homework, lecture, lab, project
  44. # if SITEURL[0:4]=='file':
  45. # start = SITEURL
  46. # else:
  47. # start=""
  48. start = SITEURL
  49. # ('Lectures', "%s/category/lecture.html" % start ),
  50. # ('Homework', "%s/category/homework.html" % start ),
  51. # ('Labs', "%s/category/lab.html" % start ),
  52. # ('Projects', "%s/category/project.html" % start ),
  53. # ('About AM207', "%s/about-am207.html" % start )
  54. def do_menuitems(start):
  55. menuitems = [
  56. ('Schedule', "%s/schedule.html" % start ),
  57. ('Syllabus', "%s/syllabus.html" % start ),
  58. ('Policies', "%s/policies.html" % start ),
  59. ('Resources', "%s/resources.html" % start ),
  60. ('Contact', "%s/contact.html" % start ),
  61. ]
  62. return menuitems
  63. MENUITEMS = do_menuitems(start)
  64. INTERLINKS = {
  65. 'wikipedia_en': 'http://en.wikipedia.org/wiki/',
  66. 'wikipedia_es': 'http://es.wikipedia.org/wiki/',
  67. 'ddg': 'https://duckduckgo.com/?q='
  68. }
  69. PLUGIN_PATH = '../pelican-plugins-activated'
  70. PLUGINS = ['interlinks', 'liquid_tags.img', 'liquid_tags.video',
  71. 'liquid_tags.youtube', 'liquid_tags.notebook', 'liquid_tags.include_code',
  72. 'liquid_tags.include_md']
  73. EXTRA_HEADER = open('../notebook_header.html').read().decode('utf-8')
  74. STATIC_PATHS=['static', 'images', 'code', 'notebooks', 'files']
  75. #INDEX_SAVE_AS='index.html'
  76. ARTICLE_URL = 'blog/{slug}.html'
  77. ARTICLE_SAVE_AS = 'blog/{slug}.html'
  78. PAGE_URL = '{slug}.html'
  79. PAGE_SAVE_AS = '{slug}.html'
  80. YEAR_ARCHIVE_SAVE_AS = 'posts/{date:%Y}/index.html'
  81. MONTH_ARCHIVE_SAVE_AS = 'posts/{date:%Y}/{date:%b}/index.html'
  82. DIRECT_TEMPLATES = ('tags', 'categories', 'authors', 'archives')