Skip to content

Commit bf17c78

Browse files
committed
qol updates
1 parent 21966f4 commit bf17c78

7 files changed

Lines changed: 57 additions & 83 deletions

File tree

.github/workflows/main.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ jobs:
2121
runs-on: ubuntu-latest
2222
steps:
2323
- name: Checkout main
24-
uses: actions/checkout@v2
24+
uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 0
27+
2528

2629
- name: Deploy docs
2730
uses: mhausenblas/mkdocs-deploy-gh-pages@master

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ start: dependencies
77
@mkdocs serve
88

99
install:
10-
pip install mkdocs mkdocs-material
10+
pip install -r docs/requirements.txt
1111

1212
dependencies:
1313
ifndef MKDOCS_AVAILABLE

README.md

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -28,34 +28,17 @@ There is a To-Do list for libretro/docs *here* and you can submit suggestions or
2828
!!! Note "Building in Windows/msys2"
2929
If you are using the standard RetroArch msys2 environment, you will need to install python with the command `pacman -S python`. Next you will need to download [the `get-pip.py` script](https://bootstrap.pypa.io/get-pip.py) from the `pip` bootstrap site. Finally, execute the script with the command `python get-pip.py`.
3030
31-
2. Install MkDocs
31+
2. Install dependencies
3232
```
33-
pip install mkdocs
33+
pip install -r docs/requirements.txt
3434
```
3535
36-
3. Install MkDocs-Material
37-
```
38-
pip install mkdocs-material
39-
```
40-
41-
4. Install PyMdown Extensions
42-
```
43-
pip install pymdown-extensions
44-
```
45-
5. Install mkdocs-git-revision-date
46-
```
47-
pip install mkdocs-git-revision-date-plugin
48-
```
49-
6. Install mkdocs-macros
50-
```
51-
pip install mkdocs-macros-plugin
52-
```
53-
54-
7. Build the site
36+
3. Build the site
5537
```
5638
mkdocs build
5739
```
5840
41+
5942
8. The documentation will be built to the `site` directory; preview any changes with MkDocs' built-in dev-server before submitting a pull request
6043
```
6144
mkdocs serve

_typos.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[files]
22
extend-exclude = [
33
".git/", # Version control files
4-
"achive/*", # Archive files
4+
"archive/*", # Archive files
55
]
66

77
# Match Inside a Word - Case Insensitive

docs/overrides/main.html

Lines changed: 25 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,32 @@
11
<!-- Elements added to main will be displayed on all pages -->
22
{% extends "base.html" %}
33

4-
<!-- Google Tag Manager -->
5-
{% block libs %}
6-
<script>
7-
var gtmId = 'GTM-KXPH36V';
8-
if (typeof window !== 'undefined' && window.location.href.includes('127.0.0.1')) {
9-
gtmId = 'GTM-XXX'
10-
}
11-
(function(w,d,s,l,i){
12-
w[l]=w[l]||[];w[l].push({'gtm.start':
13-
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
14-
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
15-
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
16-
})(window,document,'script','dataLayer', gtmId);
17-
</script>
4+
<!-- Google Tag Manager and Ads -->
5+
{% block extrahead %}
6+
{{ super() }}
7+
<script>
8+
var gtmId = 'GTM-KXPH36V';
9+
if (typeof window !== 'undefined' && window.location.href.includes('127.0.0.1')) {
10+
gtmId = 'GTM-XXX'
11+
}
12+
(function(w,d,s,l,i){
13+
w[l]=w[l]||[];w[l].push({'gtm.start':
14+
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
15+
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
16+
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
17+
})(window,document,'script','dataLayer', gtmId);
18+
</script>
1819
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
19-
<script>
20-
(adsbygoogle = window.adsbygoogle || []).push({
21-
google_ad_client: "ca-pub-9447404270680650",
22-
enable_page_level_ads: true
23-
});
24-
</script>
25-
<script async src="https://securepubads.g.doubleclick.net/tag/js/gpt.js"></script>
26-
<script>
27-
window.googletag = window.googletag || { cmd: [] };
28-
</script>
20+
<script>
21+
(adsbygoogle = window.adsbygoogle || []).push({
22+
google_ad_client: "ca-pub-9447404270680650",
23+
enable_page_level_ads: true
24+
});
25+
</script>
26+
<script async src="https://securepubads.g.doubleclick.net/tag/js/gpt.js"></script>
27+
<script>
28+
window.googletag = window.googletag || { cmd: [] };
29+
</script>
2930
{% endblock %}
3031

3132
<!-- Announcement bar -->
@@ -34,29 +35,3 @@
3435
<a href="https://www.libretro.com/index.php/retroarch-1-21-0-release/"><strong>New version released! Read the blog post now!</strong></a>
3536
{% endblock %}
3637

37-
<!-- More minimal footer -->
38-
{% block footer %}
39-
<footer class="md-footer">
40-
<div class="md-footer-meta md-typeset">
41-
<div class="md-footer-meta__inner md-grid">
42-
<!-- Copyright and theme information -->
43-
<div class="md-footer-copyright">
44-
{% if config.copyright %}
45-
<div class="md-footer-copyright__highlight">
46-
{{ config.copyright }}
47-
</div>
48-
{% endif %}
49-
powered by
50-
<a href="https://www.mkdocs.org" title="MkDocs">MkDocs</a>
51-
and
52-
<a href="https://squidfunk.github.io/mkdocs-material/"
53-
title="Material for MkDocs">
54-
Material for MkDocs</a>
55-
</div>
56-
{% block social %}
57-
{% include "partials/social.html" %}
58-
{% endblock %}
59-
</div>
60-
</div>
61-
</footer>
62-
{% endblock %}

docs/requirements.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
mkdocs>=1.5.0
2+
mkdocs-material>=9.5.0
13
mkdocs-macros-plugin
2-
mkdocs-git-revision-date-plugin
4+
mkdocs-git-revision-date-localized-plugin
35
pygments

mkdocs.yml

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ markdown_extensions:
574574
toc_depth: 6
575575

576576
plugins:
577-
- git-revision-date
577+
- git-revision-date-localized
578578
- macros
579579
- search
580580

@@ -583,11 +583,20 @@ theme:
583583
favicon: 'image/branding/invader.png'
584584
features:
585585
- content.action.edit
586+
- content.action.view
586587
- content.code.annotate
587588
- content.code.copy
589+
- content.tooltips
590+
- navigation.indexes
591+
- navigation.prune
588592
- navigation.tabs
593+
- navigation.tabs.sticky
589594
- navigation.top
590-
- tables
595+
- navigation.tracking
596+
- search.highlight
597+
- search.share
598+
- search.suggest
599+
- toc.follow
591600
font:
592601
text: 'Noto Sans'
593602
code: 'Noto Sans Mono'
@@ -597,16 +606,18 @@ theme:
597606
logo: 'image/branding/invader.png'
598607
name: material
599608
palette:
600-
- scheme: retroarch
609+
- media: "(prefers-color-scheme: light)"
610+
scheme: retroarch
601611
toggle:
602-
icon: material/weather-sunny
603-
name: Switch to light mode
604-
- scheme: slate
612+
icon: material/weather-night
613+
name: Switch to dark mode
614+
- media: "(prefers-color-scheme: dark)"
615+
scheme: slate
605616
accent: deep purple
606617
primary: black
607618
toggle:
608-
icon: material/weather-night
609-
name: Switch to dark mode
619+
icon: material/weather-sunny
620+
name: Switch to light mode
610621
search_index_only: true
611622
static_templates:
612623
- 404.html

0 commit comments

Comments
 (0)