From d30589d1faf58178ea8f10179f2536a48449009a Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Wed, 3 Jul 2019 17:46:42 +0200 Subject: [PATCH] Add rst_prolog to docs/conf.py --- docs/conf.py | 7 +++++++ docs/examples.rst | 1 - docs/faq.rst | 2 -- docs/index.rst | 2 -- docs/intro.rst | 2 -- docs/testing.rst | 1 - docs/todo.rst | 2 -- 7 files changed, 7 insertions(+), 10 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 6307ba6..8e40314 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -54,6 +54,13 @@ master_doc = "index" # This pattern also affects html_static_path and html_extra_path. exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] +rst_prolog = """ +.. highlight:: python +.. currentmodule:: {} +""".format( + project +) + # The reST default role (used for this markup: `text`) to use for all # documents. # diff --git a/docs/examples.rst b/docs/examples.rst index 44204ee..9c58a2a 100644 --- a/docs/examples.rst +++ b/docs/examples.rst @@ -1,4 +1,3 @@ -.. highlight:: python .. _examples: Examples diff --git a/docs/faq.rst b/docs/faq.rst index a5cc660..c3dd8f0 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -1,5 +1,3 @@ -.. highlight:: python -.. currentmodule:: fbchat .. _faq: FAQ diff --git a/docs/index.rst b/docs/index.rst index 671cd69..6d4e997 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,5 +1,3 @@ -.. highlight:: python -.. currentmodule:: fbchat .. fbchat documentation master file, created by sphinx-quickstart on Thu May 25 15:43:01 2017. You can adapt this file completely to your liking, but it should at least diff --git a/docs/intro.rst b/docs/intro.rst index 0ac22dd..0334140 100644 --- a/docs/intro.rst +++ b/docs/intro.rst @@ -1,5 +1,3 @@ -.. highlight:: python -.. currentmodule:: fbchat .. _intro: Introduction diff --git a/docs/testing.rst b/docs/testing.rst index 9dbb9b7..75d11d9 100644 --- a/docs/testing.rst +++ b/docs/testing.rst @@ -1,5 +1,4 @@ .. highlight:: sh -.. currentmodule:: fbchat .. _testing: Testing diff --git a/docs/todo.rst b/docs/todo.rst index 33b3ab9..9b89848 100644 --- a/docs/todo.rst +++ b/docs/todo.rst @@ -1,5 +1,3 @@ -.. highlight:: python -.. currentmodule:: fbchat .. _todo: Todo