Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs build templates #2596

Merged
merged 1 commit into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,12 @@ theme:
- navigation.sections:
level: 1
- navigation.tabs
- navigation.footer
- content.code.annotate
- content.tabs.link
- content.code.copy
- content.action.edit
- content.action.view

nav:
- Home: index.md
Expand Down
6 changes: 0 additions & 6 deletions overrides/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,3 @@
<meta name="twitter:image" content="{{ image }}" />

{% endblock %}

{% block content %}
{{ super() }}

{% include "partials/giscus.html" %}
{% endblock %}
32 changes: 32 additions & 0 deletions overrides/partials/actions.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<!-- Actions - only if content is not generated -->
{% if not page.meta.generated and page.edit_url %}

<!-- Edit button -->
{% if "content.action.edit" in features %}
<a
href="{{ page.edit_url }}"
title="{{ lang.t('action.edit') }}"
class="md-content__button md-icon"
>
{% set icon = config.theme.icon.edit or "material/file-edit-outline" %}
{% include ".icons/" ~ icon ~ ".svg" %}
</a>
{% endif %}

<!-- View button -->
{% if "content.action.view" in features %}
{% if "/blob/" in page.edit_url %}
{% set part = "blob" %}
{% else %}
{% set part = "edit" %}
{% endif %}
<a
href="{{ page.edit_url | replace(part, 'raw') }}"
title="{{ lang.t('action.view') }}"
class="md-content__button md-icon"
>
{% set icon = config.theme.icon.view or "material/file-eye-outline" %}
{% include ".icons/" ~ icon ~ ".svg" %}
</a>
{% endif %}
{% endif %}
1 change: 1 addition & 0 deletions overrides/partials/comments.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{% include "partials/giscus.html" %}
33 changes: 11 additions & 22 deletions overrides/reference.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,8 @@
<!-- Content -->
{% block content %}

<!-- Edit button -->
{% if not page.meta.generated %}
{% if page.edit_url %}
<a
href="{{ page.edit_url }}"
title="{{ lang.t('edit.link.title') }}"
class="md-content__button md-icon"
>
{% include ".icons/material/pencil.svg" %}
</a>
{% endif %}
{% endif %}
<!-- Actions -->
{% include "partials/actions.html" %}

<!--
Hack: check whether the content contains a h1 headline. If it
Expand All @@ -25,17 +15,16 @@
<h1>{{ page.title | d(config.site_name, true)}}</h1>
{% endif %}

<!-- Markdown content -->
<!-- Page content -->
{{ page.content }}

<!-- Last update of source file -->
{% if page and page.meta %}
{% if page.meta.git_revision_date_localized or
page.meta.revision_date
%}
{% include "partials/source-file.html" %}
{% endif %}
{% endif %}
<!-- Source file information -->
{% include "partials/source-file.html" %}

<!-- Was this page helpful? -->
{% include "partials/feedback.html" %}

<!-- Comment system -->
{% include "partials/comments.html" %}

{% include "partials/giscus.html" %}
{% endblock %}
Loading