File tree 8 files changed +95
-0
lines changed
Tools_Equipment/Wood_Working
8 files changed +95
-0
lines changed Original file line number Diff line number Diff line change 13
13
python-version : 3.x
14
14
- run : pip install mkdocs
15
15
- run : pip install mkdocs-material
16
+ - run : pip install git+https://github.com/srymh/MkdocsTagPlugin.git@ac1f02ba95527d11d84b5ec87f4e63851d57fc7d
16
17
- run : mkdocs gh-deploy --force
Original file line number Diff line number Diff line change
1
+ ---
2
+ tags :
3
+ - Equipment
4
+ ---
5
+
1
6
# TableSaw - ts 2500
2
7
3
8
## features
Original file line number Diff line number Diff line change
1
+ ---
2
+ pagetype : tagpage
3
+ ---
4
+
5
+ # Tag: Equipment
6
+
7
+ This is a test
Original file line number Diff line number Diff line change @@ -3,3 +3,6 @@ site_url: https://docs.hacman.org.uk
3
3
repo_url : https://github.com/HACManchester/documentation/
4
4
theme :
5
5
name : material
6
+ custom_dir : ' theme'
7
+ plugins :
8
+ - mdoctag
Original file line number Diff line number Diff line change
1
+ {% extends "base.html" %}
2
+
3
+ {% block site_meta %}
4
+ {{ super() }}
5
+ {% if page and page.meta.tags %}
6
+ {% for tag in page.meta.tags %}
7
+ < meta name ="tag " content ="{{ tag }} ">
8
+ {% endfor %}
9
+ {% endif %}
10
+ {% endblock %}
11
+
12
+ {% block content %}
13
+ {{ super() }}
14
+ {% if page and page.meta.pagetype == 'tagpage' %}
15
+ {% include "tag_page.html" %}
16
+ {% endif %}
17
+ {% if 'mdoctag' in config.plugins %}
18
+ {% include "tag_list.html" %}
19
+ {% endif %}
20
+ {% endblock %}
Original file line number Diff line number Diff line change
1
+ {% if page and page.meta.tags %}
2
+ < hr / >
3
+ < div class ="mdoctag-tags-label "> Tag</ div >
4
+ < div id ="mdoctag-tags-list ">
5
+ {% for tag in page.meta.tags %}
6
+ < a
7
+ id ="{{ 'mdoctag-tag-link-' + tag }} "
8
+ class ="mdoctag-tag-link "
9
+ href ="{{ base_url + '/' + config.plugins['mdoctag'].config['tagpage_dir'] + '/' + tag }} ">
10
+ {{ tag }}
11
+ </ a >
12
+ {% endfor %}
13
+ </ div >
14
+ < style >
15
+ .mdoctag-tag-link {
16
+ border : 2px solid;
17
+ border-radius : 5px ;
18
+ padding : 2px ;
19
+ margin-right : 10px ;
20
+ }
21
+ # mdoctag-tags-list {
22
+ margin-bottom : 20px ;
23
+ }
24
+ .mdoctag-tags-label {
25
+ margin-bottom : 6px ;
26
+ }
27
+ </ style >
28
+ {% endif %}
Original file line number Diff line number Diff line change
1
+ {% if page %}
2
+ {% set tag = page.file.name %}
3
+ {% set data_file_url = base_url + '/' + config.plugins['mdoctag'].config['data_filename'] %}
4
+ {% endif %}
5
+
6
+ < div id ="mdoctag-tag-page-list "> </ div >
7
+
8
+
9
+ < script >
10
+ var tag = '{{ tag }}' ; // not secure
11
+ var dataFileURL = '{{ data_file_url }}' // not secure
12
+ var req = new XMLHttpRequest ( ) ;
13
+ req . open ( 'GET' , dataFileURL , false ) ;
14
+ req . send ( null ) ;
15
+ var data = JSON . parse ( req . responseText ) ;
16
+ var filterd = data . filter ( function ( page ) {
17
+ return page . tags . includes ( tag ) ;
18
+ } ) ;
19
+ html = '<ul>' ;
20
+ filterd . forEach ( function ( page ) {
21
+ var description = page . description . length !== 0 ? page . description : '' ;
22
+ html += '<li><a href="' + page . url ;
23
+ html += '">' + page . title ;
24
+ html += '</a>' + ': ' + description + '</li>' ;
25
+ } ) ;
26
+ html += '</ul>' ;
27
+ document . getElementById ( 'mdoctag-tag-page-list' ) . innerHTML = html ;
28
+ </ script >
Original file line number Diff line number Diff line change 1
1
# Depends
2
2
mkdocs
3
3
mkdocs-material
4
+
5
+ # Tags for mkdocs
6
+ git+https://github.com/srymh/MkdocsTagPlugin.git@ac1f02ba95527d11d84b5ec87f4e63851d57fc7d
You can’t perform that action at this time.
0 commit comments