Browse Source

Adds mkdocs to create a website out of it

pull/1/head
Franck Nijhof 2 years ago
parent
commit
4b9c7bdaff
No known key found for this signature in database GPG Key ID: D62583BA8AB11CA3
9 changed files with 175 additions and 11 deletions
  1. +1
    -0
      .gitattributes
  2. +9
    -0
      .gitignore
  3. +1
    -1
      CONTRIBUTING.md
  4. +20
    -10
      README.md
  5. +47
    -0
      docs/css/extra.css
  6. +68
    -0
      mkdocs.yml
  7. +3
    -0
      netlify.toml
  8. +2
    -0
      requirements.txt
  9. +24
    -0
      scripts/build.sh

+ 1
- 0
.gitattributes View File

@ -0,0 +1 @@
Dangerfile linguist-documentation

+ 9
- 0
.gitignore View File

@ -0,0 +1,9 @@
.DS_Store
*.do
bin/
docs/*.md
include/
lib/
pip-selfcheck.json
pyvenv.cfg
site/

+ 1
- 1
CONTRIBUTING.md View File

@ -3,7 +3,7 @@
Your contributions are always welcome! Thank you for your suggestions! :smiley:
Please note that this project is released with a
[Contributor Code of Conduct](code-of-conduct.md).
[Contributor Code of Conduct](https://github.com/frenck/awesome-home-assistant/blob/master/CODE_OF_CONDUCT.md).
By participating in this project you agree to abide by its terms.
## Guidelines

+ 20
- 10
README.md View File

@ -2,13 +2,23 @@
<div align="center">
<img width="400" src="https://cdn.rawgit.com/frenck/awesome-home-assistant/master/images/awesome-home-assistant.svg" alt="Awesome Home Assistant">
[![Awesome](https://awesome.re/badge.svg)](https://github.com/sindresorhus/awesome#readme)
[![GitHub Stars](https://img.shields.io/github/stars/frenck/awesome-home-assistant.svg?style=social&label=Stars)](https://github.com/frenck/awesome-home-assistant)
[![GitHub Watchers](https://img.shields.io/github/watchers/frenck/awesome-home-assistant.svg?style=social&label=Watchers)](https://github.com/frenck/awesome-home-assistant)
[![Build status](https://api.travis-ci.org/frenck/awesome-home-assistant.svg?branch=master)](https://travis-ci.org/frenck/awesome-home-assistant)
![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)
<br>
<a href="https://github.com/sindresorhus/awesome#readme" target="_blank">
<img alt="Awesome" src="https://awesome.re/badge.svg">
</a>
<a href="https://github.com/frenck/awesome-home-assistant" target="_blank">
<img alt="GitHub Stars" src="https://img.shields.io/github/stars/frenck/awesome-home-assistant.svg?style=social&label=Stars" />
</a>
<a href="https://github.com/frenck/awesome-home-assistant" target="_blank">
<img alt="GitHub Watchers" src="https://img.shields.io/github/watchers/frenck/awesome-home-assistant.svg?style=social&label=Watchers">
</a>
<br>
<a href="https://travis-ci.org/frenck/awesome-home-assistant" target="_blank">
<img alt="Build status" src="https://api.travis-ci.org/frenck/awesome-home-assistant.svg?branch=master">
</a>
<a href="https://github.com/frenck/awesome-home-assistant/edit/master/README.md" target="_blank">
<img alt="PRs Welcome" src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg">
</a>
</div>
## About
@ -19,7 +29,7 @@ custom Lovelace panels, cookbooks, example setups, and much more.
The list is divided into categories. The links in those categories do not have
pre-established order, the order is for contribution. If you want to contribute,
please read the [guide](CONTRIBUTING.md).
please read the [guide](https://github.com/frenck/awesome-home-assistant/blob/master/CONTRIBUTING.md).
## How to Use
@ -68,6 +78,6 @@ _Other amazingly awesome lists that can be found on the great and dangerous inte
## Contributing and License
- [See the guide](CONTRIBUTING.md)
- [See the guide](https://github.com/frenck/awesome-home-assistant/blob/master/CONTRIBUTING.md)
- Distributed under the Creative Commons Attribution 4.0 license.
See [LICENSE](LICENSE.md) for more information.
See [LICENSE](https://github.com/frenck/awesome-home-assistant/blob/master/LICENSE.md) for more information.

+ 47
- 0
docs/css/extra.css View File

@ -0,0 +1,47 @@
.bs-sidebar.well {
/* margin-bottom: 0; */
}
.bs-sidebar .nav > li > a:hover,
.bs-sidebar .nav > li > a:focus {
border: none;
border-left: 2px solid;
}
.bs-sidebar .nav > .active > a,
.bs-sidebar .nav > .active:hover > a,
.bs-sidebar .nav > .active:focus > a {
border: none;
border-left: 2px solid;
}
@media (min-width: 992px) {
.bs-sidebar.affix {
/* top: 60px; */
/* bottom: 0px; */
top: 80px;
bottom: 23px;
overflow: auto;
}
}
@media (min-width: 1200px) {
.bs-sidebar.affix-bottom,
.bs-sidebar.affix {
width: 280px;
}
.container > .col-md-9 {
padding-left: 40px;
}
}
.md-header-nav__button.md-logo img {
margin-top: -3px;
width: 42px !important;
height: 42px !important;
}
.md-footer-nav nav {
display: none;
}

+ 68
- 0
mkdocs.yml View File

@ -0,0 +1,68 @@
# Project information
site_name: 'Awesome Home Assistant'
site_url: 'https://awesome-ha.com'
site_description: 'A curated list of awesome Home Assistant resources for automating every aspect of your home'
site_author: 'Franck Nijhof'
copyright: 'Copyright 2018 - Franck Nijhof. Creative Commons Attribution 4.0.'
# Repository
repo_name: 'awesome-home-assistant'
repo_url: 'https://github.com/frenck/awesome-home-assistant'
edit_uri: ''
# Theme configuration
theme:
name: 'material'
logo: 'https://cdn.rawgit.com/frenck/awesome-home-assistant/master/images/icon.svg'
icon: 'https://cdn.rawgit.com/frenck/awesome-home-assistant/master/images/icon.svg'
language: 'en'
palette:
primary: 'light-blue'
accent: 'pink'
# feature:
# tabs: false
extra_css:
- css/extra.css
# Customization
extra:
social:
- type: 'github'
link: 'https://github.com/frenck'
- type: 'twitter'
link: 'https://twitter.com/frenck'
- type: 'instagram'
link: 'https://instagram.com/frenck'
- type: 'twitch'
link: 'https://twitch.tv/internetofthings'
- type: 'youtube'
link: 'https://youtube.com/frenck'
- type: 'linkedin'
link: 'https://www.linkedin.com/in/frenck'
# Extensions
markdown_extensions:
- toc:
permalink: true
- pymdownx.betterem:
smart_enable: all
- pymdownx.caret
- pymdownx.critic
- pymdownx.details
- pymdownx.emoji:
emoji_generator: !!python/name:pymdownx.emoji.to_svg
- pymdownx.inlinehilite
- pymdownx.magiclink
- pymdownx.mark
- pymdownx.smartsymbols
- pymdownx.superfences
- pymdownx.tasklist:
custom_checkbox: true
- pymdownx.tilde
# The pages to serve
pages:
- "The Awesome List": "index.md"
- "Contributing": "contributing.md"
- "Code of Conduct": "code-of-conduct.md"
- "License": "license.md"

+ 3
- 0
netlify.toml View File

@ -0,0 +1,3 @@
[build]
publish = "site"
command = "./scripts/build.sh"

+ 2
- 0
requirements.txt View File

@ -0,0 +1,2 @@
mkdocs==0.17.5
mkdocs-material==2.9.4

+ 24
- 0
scripts/build.sh View File

@ -0,0 +1,24 @@
#!/usr/bin/env bash
# ==============================================================================
# Awesome Home Assistant
# This scripts builds the Awesome list into a website using mkdocs
# ==============================================================================
set -o errexit # Exit script when a command exits with non-zero status
set -o errtrace # Exit on error inside any functions or sub-shells
set -o nounset # Exit script on use of an undefined variable
set -o pipefail # Return exit status of the last command in the pipe that failed
# Switch to the root of the repository.
cd "$(dirname "$(dirname "${BASH_SOURCE[0]}")")"
# Install requirements
pip install -r requirements.txt
# Get the pages into the docs folder
ln -sf ../README.md docs/index.md
ln -sf ../LICENSE.md docs/license.md
ln -sf ../CONTRIBUTING.md docs/contributing.md
ln -sf ../CODE_OF_CONDUCT.md docs/code-of-conduct.md
# Build!
mkdocs build

Loading…
Cancel
Save