#!/usr/bin/env python # -*- coding: utf-8 -*- # from __future__ import unicode_literals from pelican.utils import get_date AUTHOR = 'calcul@math.cnrs.fr' SITENAME = 'groupe Calcul' SITEURL = '' PATH = 'content' STATIC_PATHS = ['static/robots.txt', 'job_offers'] EXTRA_PATH_METADATA = { 'static/robots.txt': {'path': 'robots.txt'}, } READERS = {'html': None} # prevent html attachments from being processed IGNORE_FILES = ['__pycache__', '*.swp'] TIMEZONE = 'Europe/Paris' DEFAULT_LANG = 'fr' # 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 # Blogroll LINKS = (('Pelican', 'http://getpelican.com/'), ('Python.org', 'http://python.org/'), ('Jinja2', 'http://jinja.pocoo.org/'), ('You can modify those links in your config file', '#'),) # Social widget SOCIAL = (('@GroupeCalcul', 'https://twitter.com/GroupeCalcul'),) DEFAULT_PAGINATION = False # Uncomment following line if you want document-relative URLs when developing #RELATIVE_URLS = True THEME = 'themes/calcul/' DIRECT_TEMPLATES = ['index', 'categories', 'archives', 'tags', 'search'] # Defined so that the authors page is not generated MARKUP = ('md', 'ipynb') PLUGIN_PATHS = ['./plugins'] PLUGINS = ['ipynb.markup', 'pelican_dynamic', 'rst_directives', 'extract_toc', 'calcul_reader', 'calcul_filters', 'rst_include', 'sitemap', 'pelican-deadlinks', 'tipue_search'] # Useful for 'rst_include' plugin (elative to content directory) RST_GLOBAL_INCLUDES = ['../plugins/rst_include/include.rst'] # For pelican-deadlinks plugin DEADLINK_VALIDATION = True DEADLINK_OPTS = { 'archive': True, 'classes': ['custom-class1', 'disabled'], 'labels': True, 'timeout_duration_ms': 3000, 'timeout_is_error': False, 'request_verify': False } MENUITEMS = [('Le groupe', '/pages/presentation_groupe.html'), ('Paysage du calcul', '/pages/paysage_du_calcul.html'), ('Nos journées', '/category/journee.html'), ('Nos formations', '/category/formation.html'), ("Offres d'emploi", '/category/job.html'), ] CIRCLES = {'journee': 'Nos journées', 'formation': 'Nos formations', 'job': 'Offres d\'emploi'} #PLUGINS.append('pelican-plugins.sitemap') SITEMAP = { 'format': 'xml', 'priorities': { 'articles': 0.5, 'indexes': 0.5, 'pages': 0.5 }, 'changefreqs': { 'articles': 'monthly', 'indexes': 'daily', 'pages': 'monthly' } } MARKDOWN = { 'extension_configs': { 'markdown.extensions.meta': {}, 'markdown.extensions.nl2br': {}, }, 'output_format': 'html5', } # Processors for custom metadata (see CalculReader) CUSTOM_METADATA_PROCESSORS = { 'start_date': lambda x, y: get_date(x), 'end_date': lambda x, y: get_date(x) } # Mandatory metadata per category (see CalculReader) CATEGORY_MANDATORY_METADATA = { 'journee': {'place', 'start_date', 'end_date'}, 'formation': {'place', 'start_date', 'end_date'}, } # Twitter configuration TWITTER = { 'user': 'groupecalcul', # Twitter account name. 'carousel_count': 3, # Number of tweets in the carousel. 'carousel_interval': 5000, # Delay before automatic cycle of the carousel. } # Follow-us link # Spaces are not allowed in url, use %20 instead FOLLOW_US_LINK = "mailto:sympa@listes.math.cnrs.fr?subject=subscribe%20calcul%20prénom%20nom&body=(pensez%20à%20remplacer%20prénom%20et%20nom%20dans%20le%20sujet)" # Article sort order ('reversed-' prefix to reverse the sort order). # sort_key is generated by the customs readers from the date and # start_date metadata. ARTICLE_ORDER_BY = 'reversed-sort_key' # Highlighted article # If the selected article is finished, the last event is selected. HIGHLIGHT_SETTINGS = { 'categories': {'journee', 'formation'}, # Filter article category 'article': 'next', # 'next' (next event), 'date' (last added), or its slug. } SUMMARY_MAX_LENGTH = 0 # Disable automatic generation of the summary # Job offer tags (tag to name) # If you add a tag here, you should also update the content/job_offers/add_job_offer.py script. JOB_OFFER_TAGS = { 'cdi': 'CDI', 'cdd': 'CDD', 'postdoc': 'Post-doc', 'these': 'Thèse', 'stage': 'Stage', } # We don't need authors pages # See https://github.com/getpelican/pelican/issues/1729#issuecomment-105239639 AUTHOR_SAVE_AS = ''