Skip to content

Commit

Permalink
Update docs to latest mkdocs version (lynckia#1511)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcague authored Nov 29, 2019
1 parent 32a1658 commit 51d6426
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 29 deletions.
32 changes: 16 additions & 16 deletions doc/custom_theme/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{% if page_description %}<meta name="description" content="{{ page_description }}">{% endif %}
{% if site_author %}<meta name="author" content="{{ site_author }}">{% endif %}
{% if canonical_url %}<link rel="canonical" href="{{ canonical_url }}">{% endif %}
{% if page.description %}<meta name="description" content="{{ page.description }}">{% endif %}
{% if config.site_author %}<meta name="author" content="{{ config.site_author }}">{% endif %}
{% if page.canonical_url %}<link rel="canonical" href="{{ page.canonical_url }}">{% endif %}
{% if favicon %}<link rel="shortcut icon" href="{{ base_url }}/{{ favicon }}">
{% else %}<link rel="shortcut icon" href="{{ base_url }}/img/favicon.ico">{% endif %}

<title>{% if page_title %}{{ page_title }} - {% endif %}{{ site_name }}</title>
<title>{% if page.title %}{{ page.title }} - {% endif %}{{ config.site_name }}</title>

<link href="{{ base_url }}/css/bootstrap-custom.min.css" rel="stylesheet">
<link href="{{ base_url }}/css/font-awesome-4.5.0.css" rel="stylesheet">
<link href="{{ base_url }}/css/base.css" rel="stylesheet">
<link rel="stylesheet" href="{{ base_url }}/css/highlight.css">
{%- for path in extra_css %}
<link href="{{ path }}" rel="stylesheet">
{%- for path in config['extra_css'] %}
<link href="/{{ path }}" rel="stylesheet">
{%- endfor %}

<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
Expand All @@ -33,21 +33,21 @@
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', '{{ google_analytics[0] }}', '{{ google_analytics[1] }}');
ga('create', '{{ config.google_analytics[0] }}', '{{ config.google_analytics[1] }}');
ga('send', 'pageview');
</script>
{% endif %}
</head>

<body{% if current_page and current_page.is_homepage %} class="homepage"{% endif %}>
<body{% if page and page.is_homepage %} class="homepage"{% endif %}>

{% include "nav.html" %}

<div class="container">
{% block content %}
<div class="sec_title">
{% if page_title %}
<h1>{{ page_title }}</h1>
{% if page.title %}
<h1>{{ page.title }}</h1>
{% else %}
<h1>Architecture</h1>
{% endif %}
Expand All @@ -60,8 +60,8 @@ <h1>Architecture</h1>

<footer class="col-md-12">
<hr>
{% if copyright %}
<p>{{ copyright }}</p>
{% if config.copyright %}
<p>{{ config.copyright }}</p>
{% endif %}
<p>Documentation built with <a href="http://www.mkdocs.org/">MkDocs</a>.</p>
</footer>
Expand All @@ -70,10 +70,10 @@ <h1>Architecture</h1>
<script src="{{ base_url }}/js/bootstrap-3.0.3.min.js"></script>
<script src="{{ base_url }}/js/highlight.pack.js"></script>
<script>var base_url = '{{ base_url }}';</script>
<script data-main="{{ base_url }}/mkdocs/js/search.js" src="{{ base_url }}/mkdocs/js/require.js"></script>
<script data-main="{{ base_url }}/search/search.js" src="{{ base_url }}/search/require.js"></script>
<script src="{{ base_url }}/js/base.js"></script>
{%- for path in extra_javascript %}
<script src="{{ path }}"></script>
{%- for path in config['extra_javascript'] %}
<script src="/{{ path }}"></script>
{%- endfor %}

<div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="Search Modal" aria-hidden="true">
Expand Down Expand Up @@ -103,7 +103,7 @@ <h4 class="modal-title" id="exampleModalLabel">Search</h4>

</body>
</html>
{% if current_page and current_page.is_homepage %}
{% if page and page.is_homepage %}
<!--
MkDocs version : {{ mkdocs_version }}
Build Date UTC : {{ build_date_utc }}
Expand Down
6 changes: 3 additions & 3 deletions doc/custom_theme/content.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{% if meta.source %}
{% if page.meta.source %}
<div class="source-links">
{% for filename in meta.source %}
{% for filename in page.meta.source %}
<span class="label label-primary">{{ filename }}</span>
{% endfor %}
</div>
{% endif %}

{{ content }}
{{ page.content }}
6 changes: 3 additions & 3 deletions doc/custom_theme/nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@

<!-- Collapsed navigation -->
<div class="navbar-header">
{% if include_nav or include_next_prev or repo_url %}
{% if nav|length>1 or (page.next_page or page.previous_page) or config.repo_url %}
<!-- Expander button -->
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a href="https://github.com/ging/licode" class="github-logo hidden-desktop"><img src="img/github-logo.png"></a>
<a href="https://github.com/ging/licode" class="github-logo hidden-desktop"><img src="/img/github-logo.png"></a>
{%- endif %}
</div>

<!-- Expanded navigation -->
<div class="navbar-collapse collapse">
{%- block site_nav %}
{% if include_nav %}
{% if nav|length>1 %}
<!-- Main navigation -->
<ul class="nav navbar-nav">
<li>
Expand Down
12 changes: 6 additions & 6 deletions doc/custom_theme/toc.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

{%- for nav_child in nav_item_to_draw.children %}
<li class="main"><a href="{{ nav_child.url }}">{{ nav_child.title }}</a></li>
{%- if page_title == nav_child.title%}
{%- for toc_item in toc %}
{%- if page.title == nav_child.title%}
{%- for toc_item in page.toc %}
<li class="{% if toc_item.active %}active{% endif %}"><a href="{{ toc_item.url }}">{{ toc_item.title }}</a></li>
{%- endfor %}
{%- endif %}
Expand All @@ -21,16 +21,16 @@
{%- endblock %}
{%- for nav_item in nav %}
{%- for nav_child in nav_item.children %}
{%- if nav_child.title == page_title %}

{%- if nav_child.title == page.title %}
{{ draw_toc_for_nav(nav_item)}}
{%- endif %}
{%- if page_title == None %}
{%- if page.title == None %}
{%- if nav_child.title == 'Architecture' %}
{{ draw_toc_for_nav(nav_item)}}
{%- endif %}
{%- endif %}
{%- endfor %}
{%- endfor %}
</ul>
</div>
</div>
4 changes: 3 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ site_url: http://licode.readthedocs.org
repo_url: https://github.com/lynckia/licode
site_description: Open Source WebRTC Communications Platform
docs_dir: doc
theme_dir: doc/custom_theme
theme:
name: mkdocs
custom_dir: doc/custom_theme
extra_css: ['css/style.css', 'css/architecture.css']
extra_javascript: ['js/script.js']
pages:
Expand Down

0 comments on commit 51d6426

Please sign in to comment.