Skip to content

Commit 1f28a8a

Browse files
author
Sam Kleinman
committed
theme: making the theme more generic
1 parent bf97051 commit 1f28a8a

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

conf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,8 @@
162162
'repo_name': 'docs',
163163
'jira_project': 'DOCS',
164164
'google_analytics': 'UA-7301842-8',
165+
'is_manual': True,
166+
'project': 'manual',
165167
}
166168

167169
# If true, an OpenSearch description file will be output, and all pages will

themes/mongodb/pagenav.html

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,15 @@
1010
:license: BSD, see LICENSE for details.
1111
#}
1212

13-
<h3><a href="{{ pathto(master_doc) }}">{{ _('MongoDB Manual') }}</a>
13+
<h3><a href="{{ pathto(master_doc) }}">{{ title }}</a>
1414
<small>(<a href="{{ pathto('genindex') }}">{{ _('Index') }}</a>)</small>
1515
</h3>
1616

1717
{{ toctree(maxdepth=-1) }}
1818

19+
{%- if theme_is_manual %}
20+
{%- if project == 'ecosystem' %}
21+
{%- else %}
1922
<h3>{{ _('Formats') }}</h3>
2023
<ul class="this-page-menu">
2124
{%- if show_source and has_source and sourcename %}
@@ -25,17 +28,27 @@ <h3>{{ _('Formats') }}</h3>
2528
<li><a href="{{ theme_pdfpath }}" rel="nofollow">{{ _('MongoDB Manual, PDF Format') }}</a></li>
2629
<li><a href="{{ theme_epubpath }}" rel="nofollow">{{ _('MongoDB Manual, ePub Format') }}</a></li>
2730
</ul>
31+
{%- endif %}
32+
{%- endif %}
2833

2934
<h3>Translations</h3>
3035
<ul class="translation-menu">
36+
{%- if theme_is_manual %}
3137
<li><a href="http://jp.docs.mongodb.org/{{theme_manual_path}}/{%- if pagename == "index" %}{%- else %}{{pagename}}{%- endif %}" rel="nofollow">Japanese</a></li>
3238
<li><a href="http://cn.docs.mongodb.org/{{theme_manual_path}}/{%- if pagename == "index" %}{%- else %}{{pagename}}{%- endif %}" rel="nofollow">Chinese</a></li>
3339
<!-- <li><a href="http://docs.mongodb.org/{{theme_manual_path}}/{%- if pagename == "index" %}{%- else %}{{pagename}}{%- endif %}" rel="nofollow">English</a></li> -->
40+
{%- else %}
41+
<li><a href="http://jp.docs.mongodb.org/{{theme_project}}/{{theme_manual_path}}/{%- if pagename == "index" %}{%- else %}{{pagename}}{%- endif %}" rel="nofollow">Japanese</a></li>
42+
<li><a href="http://cn.docs.mongodb.org/{{theme_project}}/{{theme_manual_path}}/{%- if pagename == "index" %}{%- else %}{{pagename}}{%- endif %}" rel="nofollow">Chinese</a></li>
43+
<!-- <li><a href="http://docs.mongodb.org/{{theme_project}}/{{theme_manual_path}}/{%- if pagename == "index" %}{%- else %}{{pagename}}{%- endif %}" rel="nofollow">English</a></li> -->
44+
{%- endif %}
3445
</ul>
3546

47+
{%-if is_manual %}
3648
<h3>Knowledge Base </h3>
3749
<ul class="kb-menu">
3850
<li><a href="{{ pathto('tutorial') }}">Tutorials</a></li>
3951
<li><a href="{{ pathto('faq') }}">Frequently Asked Questions</a></li>
4052
<li><a href="{{ pathto('use-cases') }}">Use Cases</a></li>
4153
</ul>
54+
{%- endif %}

themes/mongodb/theme.conf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@ epubpath = EPUBPATH
1010
manual_path = PATH
1111
repo_name = REPONAME
1212
jira_project = JIRA
13-
google_analytics = GACODE
13+
google_analytics = GACODE
14+
is_manual = MANUAL
15+
project = PROJECT

0 commit comments

Comments
 (0)