Skip to content

Commit

Permalink
Merge pull request #2 from Enveloppe/repo-sync/wiki/default
Browse files Browse the repository at this point in the history
🔄 synced file(s) with Mara-Li/wiki
  • Loading branch information
Mara-Li authored Dec 25, 2024
2 parents 017515a + 55a39c7 commit 5ef8da5
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 43 deletions.
7 changes: 5 additions & 2 deletions overrides/hooks/category.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@
"""

import argparse
import yaml
from pathlib import Path
import re
from pathlib import Path

import yaml


def create_category(path, index_contents):
Expand Down Expand Up @@ -81,8 +82,10 @@ def main():
args = parser.parse_args()

mkdocs_config = Path("mkdocs.yml").resolve()

with open(mkdocs_config, "r", encoding="utf-8") as f:
config = yaml.load(f, Loader=yaml.BaseLoader)

docs_dir = config.get("docs_dir", "docs")
docs_dir = Path(docs_dir).resolve()
path, description_yaml, hider, description_contents = resolving_args(args, docs_dir)
Expand Down
78 changes: 39 additions & 39 deletions overrides/main.html
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
{% extends "base.html" %}

{% block extrahead %}
<script src="https://unpkg.com/@popperjs/core@2/dist/umd/popper.min.js"></script>
<script src="https://unpkg.com/tippy.js@6/dist/tippy-bundle.umd.js"></script>
<link
rel="stylesheet"
href="https://unpkg.com/tippy.js@6/animations/scale-subtle.css"
/>
<link
rel="stylesheet"
href="https://unpkg.com/tippy.js@6/themes/translucent.css"
/>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css"
integrity="sha512-Fo3rlrZj/k7ujTnHg4CGR2D7kSs0v4LLanw2qksYuRlEzO+tcaEPQogQ0KaoGN26/zrn20ImR1DfuLWnOo7aBA=="
crossorigin="anonymous"
referrerpolicy="no-referrer"
/>
{% include "partials/meta.html" %}
{% endblock %}
{% block content %}
{{ super() }}
{% include "partials/css_class.html" %}
{% include "partials/comments.html" %}
{% set pg_title = 'title' | value_in_frontmatter(page.meta) %}
{% set pg_title = page.meta.title if pg_title is not none else page.title %}
{% set pg_title = page.parent.title if pg_title == 'Index' else pg_title %}
<script>
try {
const index = document.querySelector('h1').innerHTML;
if (index === "Index") {
document.querySelector('h1').innerHTML = "{{ pg_title }}";
}
} catch (error) {
// console.log(error);
}
</script>
{% extends "base.html" %}

{% block extrahead %}
<script src="https://unpkg.com/@popperjs/core@2/dist/umd/popper.min.js"></script>
<script src="https://unpkg.com/tippy.js@6/dist/tippy-bundle.umd.js"></script>
<link
rel="stylesheet"
href="https://unpkg.com/tippy.js@6/animations/scale-subtle.css"
/>
<link
rel="stylesheet"
href="https://unpkg.com/tippy.js@6/themes/translucent.css"
/>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css"
integrity="sha512-Fo3rlrZj/k7ujTnHg4CGR2D7kSs0v4LLanw2qksYuRlEzO+tcaEPQogQ0KaoGN26/zrn20ImR1DfuLWnOo7aBA=="
crossorigin="anonymous"
referrerpolicy="no-referrer"
/>
{% include "partials/meta.html" %}
{% endblock %}
{% block content %}
{{ super() }}
{% include "partials/css_class.html" %}
{% include "partials/comments.html" %}
{% set pg_title = 'title' | value_in_frontmatter(page.meta) %}
{% set pg_title = page.meta.title if pg_title is not none else page.title %}
{% set pg_title = page.parent.title if pg_title == 'Index' else pg_title %}
<script>
try {
const index = document.querySelector('h1').innerHTML;
if (index === "Index") {
document.querySelector('h1').innerHTML = "{{ pg_title }}";
}
} catch (error) {
// console.log(error);
}
</script>
{% endblock %}
4 changes: 2 additions & 2 deletions overrides/partials/post-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ <h1>{{ page.title | d(config.site_name, true) }}</h1>
{% if category_exists %}
{% set link = pg.meta.category | links %}
{% set link = config.site_url ~ link ~ '/' %}
{% set pg_category = '<a href="' ~ link ~ '">' ~ pg_category ~ '</a>' %}
{% set pg_category = '<a class="post-link category" href="' ~ link ~ '">' ~ pg_category ~ '</a>' %}
{% endif %}
{% endif %}
{% endif %}
Expand All @@ -128,7 +128,7 @@ <h1>{{ page.title | d(config.site_name, true) }}</h1>
{% endif %}
<div class="post">
<h4 class="post-title">
<a href="{{ pg.canonical_url }}">{{ pg_title }}</a>
<a href="{{ pg.canonical_url }}" class="post-link title">{{ pg_title }}</a>
</h4>
<div class="post-info-wrap">
<div class="post-info">
Expand Down

0 comments on commit 5ef8da5

Please sign in to comment.