|
7 | 7 | # list see the documentation: |
8 | 8 | # https://www.sphinx-doc.org/en/master/usage/configuration.html |
9 | 9 |
|
10 | | -import os |
11 | | -import sys |
12 | | - |
13 | 10 | # -- Project information ----------------------------------------------------- |
14 | 11 |
|
15 | 12 | project = 'sphinxnotes-snippet' |
|
28 | 25 | 'sphinx.ext.githubpages', |
29 | 26 | 'sphinx_design', |
30 | 27 | 'sphinx_copybutton', |
| 28 | + 'sphinx_last_updated_by_git', |
31 | 29 | ] |
32 | 30 |
|
33 | 31 | # Add any paths that contain templates here, relative to this directory. |
|
74 | 72 |
|
75 | 73 | # -- Extensions ------------------------------------------------------------- |
76 | 74 |
|
77 | | -# |
78 | | -extensions.append('sphinxnotes.any') |
79 | | -from sphinxnotes.any import Schema, Field as F |
80 | | -# |
81 | | -version_schema = Schema('version', |
82 | | - name=F(unique=True, referenceable=True, required=True, form=F.Form.LINES), |
83 | | - attrs={'date': F(referenceable=True)}, |
84 | | - content=F(form=F.Form.LINES), |
85 | | - description_template=open('_templates/version.rst', 'r').read(), |
86 | | - reference_template='🏷️{{ title }}', |
87 | | - missing_reference_template='🏷️{{ title }}', |
88 | | - ambiguous_reference_template='🏷️{{ title }}') |
89 | | -confval_schema = Schema('confval', |
90 | | - name=F(unique=True, referenceable=True, required=True, form=F.Form.LINES), |
91 | | - attrs={ |
92 | | - 'type': F(), |
93 | | - 'default': F(), |
94 | | - 'choice': F(form=F.Form.WORDS), |
95 | | - 'versionadded': F(), |
96 | | - 'versionchanged': F(form=F.Form.LINES), |
97 | | - }, |
98 | | - content=F(), |
99 | | - description_template=open('_templates/confval.rst', 'r').read(), |
100 | | - reference_template='⚙️{{ title }}', |
101 | | - missing_reference_template='⚙️{{ title }}', |
102 | | - ambiguous_reference_template='⚙️{{ title }}') |
103 | | -example_schema = Schema('example', |
104 | | - name=F(referenceable=True), |
105 | | - attrs={'style': F()}, |
106 | | - content=F(form=F.Form.LINES), |
107 | | - description_template=open('_templates/example.rst', 'r').read(), |
108 | | - reference_template='📝{{ title }}', |
109 | | - missing_reference_template='📝{{ title }}', |
110 | | - ambiguous_reference_template='📝{{ title }}') |
111 | | -# |
112 | | -any_schemas = [ |
113 | | - version_schema, |
114 | | - confval_schema, |
115 | | - example_schema, |
116 | | -] |
117 | | -primary_domain = 'any' |
118 | | -# |
119 | | - |
120 | 75 | extensions.append('sphinx.ext.extlinks') |
121 | 76 | extlinks = { |
122 | 77 | 'issue': ('https://github.com/sphinx-notes/snippet/issues/%s', '💬%s'), |
|
138 | 93 | 'jinja': ('https://jinja.palletsprojects.com/en/latest/', None), |
139 | 94 | } |
140 | 95 |
|
141 | | -# |
| 96 | +extensions.append('sphinx_sitemap') |
| 97 | +sitemap_filename = "sitemap.xml" |
| 98 | +sitemap_url_scheme = "{link}" |
| 99 | + |
| 100 | +extensions.append('sphinxext.opengraph') |
| 101 | +ogp_site_url = html_baseurl |
| 102 | +ogp_site_name = project |
| 103 | +ogp_image = html_baseurl + '/' + html_logo |
| 104 | + |
142 | 105 | extensions.append('sphinxnotes.comboroles') |
143 | 106 | comboroles_roles = { |
144 | 107 | 'parsed_literal': (['literal'], True), |
145 | 108 | } |
146 | | -# |
147 | 109 |
|
148 | | -# |
| 110 | +extensions.append('sphinxnotes.project') |
| 111 | +primary_domain = 'any' |
| 112 | + |
149 | 113 | # -- Eat your own dog food -------------------------------------------------- |
150 | 114 |
|
151 | 115 | # If extensions (or modules to document with autodoc) are in another directory, |
152 | 116 | # add these directories to sys.path here. If the directory is relative to the |
153 | 117 | # documentation root, use os.path.abspath to make it absolute, like shown here. |
| 118 | +import os |
| 119 | +import sys |
154 | 120 | sys.path.insert(0, os.path.abspath('../src/sphinxnotes')) |
155 | | -extensions.append('snippet.ext') |
| 121 | +extensions.append('snippet') |
156 | 122 |
|
157 | | -# DOG FOOD CONFIGURATION START |
| 123 | +# CUSTOM CONFIGURATION |
158 | 124 |
|
159 | 125 | snippet_config = { |
160 | 126 | 'cache_dir': '/tmp/' + 'sphinxnotes-snippet' |
161 | 127 | } |
162 | 128 |
|
163 | 129 | extensions.append('sphinxcontrib.asciinema') |
164 | | - |
165 | | -# DOG FOOD CONFIGURATION END |
166 | | -# |
0 commit comments