Skip to content

Commit e389270

Browse files
Anastasia Alexadrovanastena1606
Anastasia Alexadrova
authored andcommitted
DISTMYSQL-108 Move documentattion to Netlify with Material theme
1 parent 307af54 commit e389270

File tree

9 files changed

+126
-2
lines changed

9 files changed

+126
-2
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ source/percona-theme/
33
source/ext/psdom.pyc
44
*~
55
.DS_Store
6-
source/ext/__pycache__
6+
source/ext/__pycache__
7+
source/__pycache__/

Makefile

+5
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ html:
5151
@echo
5252
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
5353

54+
netlify:
55+
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) -c source/conf-netlify $(BUILDDIR)/html
56+
@echo
57+
@echo "Netlify build finished. The HTML pages are in $(BUILDDIR)/html."
58+
5459
dirhtml:
5560
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
5661
@echo

requirements.txt

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
alabaster==0.7.12
2+
Babel==2.8.0
3+
beautifulsoup4==4.9.3
4+
certifi==2020.6.20
5+
chardet==3.0.4
6+
click==7.1.2
7+
css-html-js-minify==2.5.5
8+
Deprecated==1.2.10
9+
docutils==0.16
10+
Flask==1.1.2
11+
gitdb==4.0.5
12+
GitPython==3.1.13
13+
idna==2.10
14+
imagesize==1.2.0
15+
inflection==0.5.1
16+
itsdangerous==1.1.0
17+
Jinja2==2.11.2
18+
livereload==2.6.3
19+
lxml==4.6.2
20+
MarkupSafe==1.1.1
21+
packaging==20.4
22+
py-buzz==2.0.0
23+
Pygments==2.6.1
24+
pyparsing==2.4.7
25+
python-slugify==4.0.1
26+
pytz==2020.1
27+
requests==2.24.0
28+
six==1.15.0
29+
smmap==3.0.5
30+
snowballstemmer==2.0.0
31+
soupsieve==2.1
32+
Sphinx==3.2.1
33+
sphinx-autobuild==2020.9.1
34+
sphinx-copybutton==0.3.1
35+
sphinx-gitstamp==0.3.1
36+
sphinx-material==0.0.32
37+
sphinxcontrib-applehelp==1.0.2
38+
sphinxcontrib-contentui==0.2.5
39+
sphinxcontrib-devhelp==1.0.2
40+
sphinxcontrib-fulltoc==1.2.0
41+
sphinxcontrib-htmlhelp==1.0.3
42+
sphinxcontrib-jsmath==1.0.1
43+
sphinxcontrib-qthelp==1.0.3
44+
sphinxcontrib-serializinghtml==1.1.4
45+
text-unidecode==1.3
46+
tornado==6.1
47+
Unidecode==1.1.2
48+
urllib3==1.25.10
49+
Werkzeug==1.0.1
50+
wrapt==1.12.1

runtime.txt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.7
+12
Loading
894 Bytes
Binary file not shown.

source/_templates/layout.html

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{% extends "!layout.html" %}
2+
3+
{ # Adds the "Last updated label" at the bottom of the page # }
4+
{%- block relbar2 %}
5+
{%- if gitstamp %}
6+
<div class="small">
7+
<p><i class="fas fa-sync-alt"></i>
8+
Last updated on {{ gitstamp }}. </p>
9+
</div>
10+
{%- endif %}
11+
{{ super() }}
12+
{%- endblock%}
13+
14+
{#### 'Edit this page' links #}
15+
{% macro edit_report() %}
16+
{%- block rootrellink %}
17+
{{ super() }}
18+
{% if repo_url|e %}
19+
<div class="small">
20+
<ul class="list-inline">
21+
<li class="pull-right">
22+
<a href="{{ repo_url }}/{{ edit_uri }}/{{ pagename }}.rst" target="_blank">
23+
<i class="fa fa-github"></i>
24+
Edit this page
25+
</a>
26+
</li>
27+
</ul>
28+
</div>
29+
{% endif %}
30+
{%- endblock %}
31+
{% endmacro %}

source/conf-netlify/conf.py

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/usr/bin/env python3
2+
# -*- coding: utf-8 -*-
3+
import sys
4+
import os
5+
sys.path.append(os.path.abspath("../"))
6+
from conf import *
7+
extensions.append('sphinx_gitstamp')
8+
extensions.append('sphinx_copybutton')
9+
html_theme = 'sphinx_material'
10+
html_sidebars = {
11+
'**': ['localtoc.html', 'sourcelink.html', 'globaltoc.html', 'searchbox.html' ]}
12+
html_theme_options = {
13+
'base_url': 'http://bashtage.github.io/sphinx-material/',
14+
'repo_url': 'https://github.com/percona/pdmysql-docs',
15+
'repo_name': 'percona/pdmysql-docs',
16+
'color_accent': 'grey',
17+
'color_primary': 'orange'
18+
}
19+
html_logo = '../_static/images/percona-logo.svg'
20+
html_favicon = '../_static/images/percona_favicon.ico'
21+
pygments_style = 'emacs'
22+
gitstamp_fmt = '%b %d, %Y'
23+
copybutton_prompt_text = '$'
24+
#html_last_updated_fmt = ''

source/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@
211211
# Custom sidebar templates, maps document names to template names.
212212
#
213213
html_sidebars = {
214-
'**': ['localtoc.html', 'sourcelink.html', 'edit.html', 'relations.html'],
214+
'**': ['localtoc.html', 'sourcelink.html', 'edit.html', 'relations.html', 'searchbox.html'],
215215
'using/windows': ['windowssidebar.html'],
216216
}
217217

0 commit comments

Comments
 (0)