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 1642780
Show file tree
Hide file tree
Showing 4 changed files with 36 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 %}
4 changes: 4 additions & 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: overrides
palette:
primary: black
features:
Expand All @@ -14,6 +15,9 @@ theme:

repo_url: https://github.com/operator-framework/operator-controller

plugins:
- awesome-pages

extra_css:
- css/extra.css

Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,5 @@ six==1.16.0
soupsieve==2.6
urllib3==2.2.3
watchdog==4.0.2
mkdocs-awesome-pages-plugin==2.9.3

0 comments on commit 1642780

Please sign in to comment.