Skip to content
This repository was archived by the owner on May 5, 2025. It is now read-only.

Commit b2cc3ef

Browse files
authored
Merge pull request #154 from mattray/material
Material for MkDocs support
2 parents e7c0eaf + 123aed7 commit b2cc3ef

File tree

7 files changed

+53
-49
lines changed

7 files changed

+53
-49
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- attach_workspace:
1414
at: ~/
1515
- checkout
16-
- run: pip install mkdocs
16+
- run: pip install mkdocs-material
1717
- run:
1818
name: Building package
1919
command: make build

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM python:3 AS builder
22

3-
RUN pip install mkdocs
3+
RUN pip install mkdocs-material
44

55
COPY . /docs
66

README.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Install it with:
88
pip install mkdocs
99
```
1010

11-
If you have Python3, you may need to run
11+
If you have Python3, you may need to run
1212

1313
```
1414
pip3 install mkdocs
@@ -23,3 +23,25 @@ mkdocs serve
2323
## Changes
2424

2525
Commit your changes and CI will automatically build the new site and deploy it
26+
27+
## Docker Instructions
28+
29+
From the `docs` directory, build the image with the `docs` name.
30+
31+
```
32+
docker build -t docs .
33+
```
34+
35+
After a few minutes
36+
```
37+
docker images
38+
REPOSITORY TAG IMAGE ID CREATED SIZE
39+
docs latest 1e704c7ab807 About a minute ago 155MB
40+
```
41+
42+
Start up the container
43+
```
44+
docker run -p 8081:80 docs:latest
45+
```
46+
47+
and open http://localhost:8081 to view the content.

custom_theme/img/favicon.ico

-14.7 KB
Binary file not shown.

docs/extra.css

Lines changed: 9 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,10 @@
1-
/* We will need to use !important to override default styles */
2-
body:before {
3-
font-family: Roboto, sans-serif;
4-
background-color: #fafafa;
5-
background-image: none !important;
6-
}
7-
8-
.bg-primary {
9-
background-color: #1976d2 !important;
10-
background-image: none !important;
11-
}
12-
13-
.navbar-brand {
14-
font-size: 24px;
15-
}
16-
17-
.dropdown-item:hover {
18-
color: #37474f;
19-
background: #eceff1;
20-
}
21-
22-
.dropdown-item.active {
23-
background-color: #e3f2fd;
24-
color: #37474f;
25-
}
26-
27-
#toc-collapse {
28-
background-color: white !important;
29-
}
30-
31-
.nav-link {
32-
color: #37474f;
33-
}
34-
35-
.nav-link:hover {
36-
color: #1976d2;
37-
}
38-
39-
.nav-link.active {
40-
color: #1976d2;
41-
}
42-
43-
a {
44-
color: #1976d2;
1+
:root {
2+
--md-accent-fg-color: #1976d2; /* nav mouseover */
3+
--md-default-bg-color: #fafafa; /* page bg */
4+
--md-default-fg-color--light: #37474f; /* h1 color */
5+
--md-default-fg-color--lighter: #e3f2fd; /* pencil color */
6+
--md-default-fg-color: #000000; /* page text */
7+
--md-primary-bg-color--light: #eceff1; /* search panel */
8+
--md-primary-bg-color: #e3f2fd; /* header bg */
9+
--md-primary-fg-color: #1976d2; /* header */
4510
}

docs/images/tmLogo-white.png

6.21 KB
Loading

mkdocs.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1+
copyright: © 2021, TriggerMesh
2+
site_author: TriggerMesh
3+
site_description: TriggerMesh's Docs
14
site_name: TriggerMesh
5+
site_url: https://docs.triggermesh.io
26
repo_url: https://github.com/triggermesh/docs
37
google_analytics: ['UA-127409524-1', 'docs.triggermesh.io']
48
extra_css: [extra.css]
@@ -23,8 +27,21 @@ nav:
2327
- Cloud: https://cloud.triggermesh.io
2428
- About: about.md
2529
theme:
26-
name: mkdocs
27-
custom_dir: "custom_theme/"
30+
name: material
31+
favicon: images/favicon.ico
32+
logo: images/tmLogo-white.png
33+
34+
extra:
35+
social:
36+
- icon: fontawesome/brands/github
37+
link: https://github.com/triggermesh
38+
name: TriggerMesh on GitHub
39+
- icon: fontawesome/brands/linkedin
40+
link: https://www.linkedin.com/company/triggermesh/
41+
name: TriggerMesh on LinkedIn
42+
- icon: fontawesome/brands/twitter
43+
link: https://twitter.com/triggermesh
44+
name: TriggerMesh on Twitter
2845

2946
markdown_extensions:
3047
- attr_list

0 commit comments

Comments
 (0)