diff --git a/.gitignore b/.gitignore index 6f88ee0d..456b1603 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,12 @@ bin/* !bin/create_all.sh !bin/create_hassio_addon.sh !bin/travis_build.sh +*.do +bin/* +docs/* +site/* +pip-selfcheck.json +pyvenv.cfg +include/ +lib/ +venv/ diff --git a/build-site.sh b/build-site.sh new file mode 100755 index 00000000..eb1906b6 --- /dev/null +++ b/build-site.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash +# ============================================================================== +# Community Hass.io Add-ons for Home Assistant +# This script builds a small little website +# ============================================================================== +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]}")")" + +# Create a documentation folder +mkdir -p docs + +# 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 diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 00000000..1dae71f2 --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,68 @@ +# Project information +site_name: 'Community Hass.io Add-ons for Home Assistant' +site_url: 'https://addons.community' +site_description: 'The primary goal of this project is to provide you (as a Hass.io / Home Assistant user) with additional, high quality, add-ons that allow you to take your automated home to the next level.' +site_author: 'Franck Nijhof' +copyright: 'Copyright 2017-2019 - Franck Nijhof.' + +# Repository +repo_name: 'hassio-addons' +repo_url: 'https://github.com/hassio-addons/repository' +edit_uri: '' + +# Theme configuration +theme: + name: 'material' + logo: 'https://avatars3.githubusercontent.com/u/30772201?s=200&v=4' + icon: 'https://avatars3.githubusercontent.com/u/30772201?s=200&v=4' + language: 'en' + palette: + primary: 'light-blue' + accent: 'blue' + font: + text: 'Exo2' + code: 'Roboto Mono' + feature: + tabs: false +extra_css: + - css/extra.css + +# Customization +extra: + manifest: 'manifest.webmanifest' + social: + - type: 'github' + link: 'https://github.com/hassio-addons' + - type: 'twitter' + link: 'https://twitter.com/hassio-addons' + - type: 'twitch' + link: 'https://twitch.tv/frenck' + - type: 'youtube' + link: 'https://youtube.com/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: + - "Our Add-ons": "index.md" + - "Contributing": "contributing.md" + - "Code of Conduct": "code-of-conduct.md" + - "License": "license.md" diff --git a/netlify.toml b/netlify.toml new file mode 100644 index 00000000..4737e47e --- /dev/null +++ b/netlify.toml @@ -0,0 +1,3 @@ +[build] + publish = "site" + command = "./scripts/build.sh" diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..66a8af5e --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +mkdocs==1.0.4 +mkdocs-material==4.4.0