Skip to content

Commit

Permalink
feat: Dark mode for mkdocs
Browse files Browse the repository at this point in the history
  • Loading branch information
carlspring committed May 20, 2024
1 parent 30fe5fd commit 0b1f88f
Show file tree
Hide file tree
Showing 6 changed files with 88 additions and 65 deletions.
8 changes: 5 additions & 3 deletions docs/content/contributing/legal/license-Apache-2.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ This is our copy of the Apache 2.0 license.

## License Text

```
--8<-- "../LICENSE.Apache-2.0.md"
```
[//]: # (```)

[//]: # (--8<-- "../LICENSE.Apache-2.0.md")

[//]: # (```)
9 changes: 6 additions & 3 deletions docs/content/contributing/legal/license-MIT.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
This is our copy of the MIT license.

## License Text
```
--8<-- "../LICENSE.MIT.md"
```

[//]: # (```)

[//]: # (--8<-- "../LICENSE.MIT.md")

[//]: # (```)
3 changes: 2 additions & 1 deletion docs/content/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
Create/load a properties file in your project which defines the following properties:

```
--8<-- "../src/test/resources/amazon-test-sample.properties"

[//]: # ( --8<-- "../src/test/resources/amazon-test-sample.properties")
```

These properties can also be exported as environment variables.
Expand Down
4 changes: 2 additions & 2 deletions docs/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ services:
build:
context: .
dockerfile: ./docs.Dockerfile
image: squidfunk/mkdocs-material:5.5.9-custom
image: squidfunk/mkdocs-material:9
container_name: s3fs-nio-docs
working_dir: /workspace/docs
volumes:
Expand All @@ -15,7 +15,7 @@ services:
build:
context: .
dockerfile: ./docs.Dockerfile
image: squidfunk/mkdocs-material:5.5.9-custom
image: squidfunk/mkdocs-material:9
working_dir: /workspace/docs
command: [ "build" ]
volumes:
Expand Down
107 changes: 62 additions & 45 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,43 @@ docs_dir: content

theme:
name: material
custom_dir: 'theme'
icon:
repo: fontawesome/brands/github-alt
repo: fontawesome/brands/github

font:
text: Roboto
code: Roboto Mono

palette:
# Palette toggle for light mode
- media: "(prefers-color-scheme: light)"
primary: indigo
scheme: default
toggle:
icon: material/toggle-switch
name: Switch to dark mode

# Palette toggle for dark mode
- media: "(prefers-color-scheme: dark)"
scheme: slate
toggle:
icon: material/toggle-switch-off-outline
name: Switch to light mode

features:
- search.highlight
- announce.dismiss
- content.tooltips
- meta
# Instant should be disabled because of a bug - not redirecting pages.
#- instant
- navigation.footer
- navigation.indexes
- navigation.sections
- navigation.tabs
- navigation.tabs.sticky
- navigation.top
- navigation.tracking
- search.highlight
- search.share
- search.suggest
- tabs

plugins:
Expand All @@ -32,17 +56,18 @@ plugins:
# debug: true
# This plugin should be AFTER mkdocs-pom-parser-plugin until issue is fixed.
# https://github.com/rosscdh/mkdocs-markdownextradata-plugin/issues/26
- markdownextradata: {}
# - markdownextradata: {}
- minify:
minify_html: true

markdown_extensions:
- admonition
- attr_list
- footnotes
- meta
- mdx_gh_links
- mdx_include:
base_path: ./content
# - mdx_gh_links
# - mdx_include:
# base_path: ./content
- toc:
permalink: true
- pymdownx.extra
Expand All @@ -61,9 +86,6 @@ markdown_extensions:
- pymdownx.caret
- pymdownx.critic
- pymdownx.details
- pymdownx.emoji:
emoji_index: !!python/name:materialx.emoji.twemoji
emoji_generator: !!python/name:materialx.emoji.to_svg
- pymdownx.highlight
- pymdownx.inlinehilite
- pymdownx.keys
Expand Down Expand Up @@ -93,10 +115,10 @@ extra:
repo_url: *repo_url
chat_url: &chat_url https://chat.carlspring.org/channel/s3fs-nio-community
social:
- icon: fontawesome/brands/github-alt
link: *repo_url
- icon: fontawesome/brands/rocketchat
link: *chat_url
- icon: fontawesome/brands/github-alt
link: *repo_url
- icon: fontawesome/brands/rocketchat
link: *chat_url
POM_GROUP_ID: org.carlspring.cloud.aws
POM_ARTIFACT_ID: s3fs-nio
## {x-release-please-start-version}
Expand All @@ -105,32 +127,32 @@ extra:

nav:
- Home:
- Getting Started: index.md
- History: history.md
- Versioning and Releases: versioning.md
- License: license.md
- Getting Started: index.md
- History: history.md
- Versioning and Releases: versioning.md
- License: license.md
- Contributing:
- Getting Started: contributing/index.md
- Code of Conduct: contributing/code-of-conduct.md
- Coding Conventions: contributing/developer-guide/coding-convention.md
- Guides:
- Developers: contributing/developer-guide/index.md
- Security Advisers: contributing/security-advisers.md
- Writing Documentation: contributing/writing-documentation.md
- Legal:
- Overview: contributing/legal/index.md
- Licenses:
- Apache 2.0: contributing/legal/license-Apache-2.0.md
- MIT: contributing/legal/license-MIT.md
- ICLA: contributing/legal/ICLA.md
- Pull Request Guidelines: ./contributing/pull-request-guidelines.md
- Who Can Help And How: ./contributing/who-can-help-and-how.md
- Getting Started: contributing/index.md
- Code of Conduct: contributing/code-of-conduct.md
- Coding Conventions: contributing/developer-guide/coding-convention.md
- Guides:
- Developers: contributing/developer-guide/index.md
- Security Advisers: contributing/security-advisers.md
- Writing Documentation: contributing/writing-documentation.md
- Legal:
- Overview: contributing/legal/index.md
- Licenses:
- Apache 2.0: contributing/legal/license-Apache-2.0.md
- MIT: contributing/legal/license-MIT.md
- ICLA: contributing/legal/ICLA.md
- Pull Request Guidelines: ./contributing/pull-request-guidelines.md
- Who Can Help And How: ./contributing/who-can-help-and-how.md
- Reference:
- Configuration Options: reference/configuration-options.md
- Examples:
- Basic Example: reference/examples/basic-example.md
- MINA Example: reference/examples/mina-example.md
- Spring Example: reference/examples/spring-example.md
- Configuration Options: reference/configuration-options.md
- Examples:
- Basic Example: reference/examples/basic-example.md
- MINA Example: reference/examples/mina-example.md
- Spring Example: reference/examples/spring-example.md
# - Changelog:
# - Release notes:
# - master: changelog/release/notes-master.md
Expand All @@ -139,8 +161,3 @@ nav:
# - master: changelog/upgrading/master.md
- Join chat:
- Redirect: chat.md

# Google Analytics
google_analytics:
- !!python/object/apply:os.getenv ["GOOGLE_ANALYTICS_KEY"]
- auto
22 changes: 11 additions & 11 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
mkdocs==1.1.2
mkdocs-material==5.5.11
mdx_gh_links==0.3
#mdx_include==1.3.3
mkdocs==1.6.0
mkdocs-material==9.5.23
mdx_gh_links==0.4
mdx_include==1.4.2
mkdocs-markdownextradata-plugin==0.2.1
mkdocs-git-revision-date-plugin==0.3
mkdocs-redirects==1.0.1
mkdocs-htmlproofer-plugin==0.0.3
mkdocs-pom-parser-plugin>=1.0.3
mkdocs-minify-plugin==0.3.0
mdx_include==1.4.2
mkdocs-markdownextradata-plugin==0.2.5
mkdocs-git-revision-date-plugin==0.3.2
mkdocs-redirects==1.2.1
mkdocs-htmlproofer-plugin==1.2.1
mkdocs-pom-parser-plugin
mkdocs-minify-plugin==0.8.0
# This dependency is necessary for older mkdocs versions.
# TODO: Remove when upgrading mkdocs.
jinja2<3.1.0
#jinja2<3.1.0

0 comments on commit 0b1f88f

Please sign in to comment.