Skip to content

Commit

Permalink
render custom tags in doc site
Browse files Browse the repository at this point in the history
  • Loading branch information
anik120 committed Oct 29, 2024
1 parent 2c4794d commit 06398e0
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 1 deletion.
17 changes: 16 additions & 1 deletion docs/css/extra.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,19 @@
.md-nav__item--active > .md-nav__link, /* Active top-level items */
.md-nav__item--nested > .md-nav__link { /* Nested top-level items */
font-weight: bold;
}
}

.tags-list {
list-style: none;
padding: 0;
}

.tag {
display: inline-block;
background-color: #e0e0e0;
border-radius: 3px;
padding: 2px 8px;
margin: 2px;
font-size: 0.9em;
color: aqua;
}
14 changes: 14 additions & 0 deletions docs/overrides/main.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{% extends "base.html" %}

{% block content %}
<div class="tags">
{% if page.meta.tags %}
<ul class="tags-list">
{% for tag in page.meta.tags %}
<li class="tag">{{ tag }}</li>
{% endfor %}
</ul>
{% endif %}
</div>
{{ super() }}
{% endblock %}
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ site_name: Operator Lifecycle Manager
theme:
logo: assets/logo.svg
name: "material"
custom_dir: docs/overrides
palette:
primary: black
features:
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@ six==1.16.0
soupsieve==2.6
urllib3==2.2.3
watchdog==4.0.2

0 comments on commit 06398e0

Please sign in to comment.