Skip to content

Commit 00c0af2

Browse files
psi-4wardgithub-actions[bot]KoenkkklokniborKoen Kanters
authored
Newww Docu ;) (Koenkk#967)
* Update user extension. * Availability refactor (Koenkk#707) * Availability refactor proposal. Koenkk/zigbee2mqtt#6281 * Update availability docs. * Update availability * Update docs * Added TuYa TS011F_plug_3 (Koenkk#931) * Added TuYa TS011F_plug_3 * Update TS011F_plug_3.md * Docs update for exposing scenes and setting scene name. Koenkk/zigbee2mqtt#9056 (Koenkk#933) * Add doc for options expose. Koenkk/zigbee2mqtt#9110 * added MIR-HE200-TY (Koenkk#943) * TuYa Human Radar Motion-presence Sensor Additional Konverter-Update is comming up * Create MIR-HE200-TY.md New TuYa Human Radar Sensor * Update MIR-HE200-TY.md including picture as *.jpg * Update MIR-HE200-TY.md picture will pushed seperately * Picture for MIR-HE200-TY as jpg * Delete MIR-HE200-TY.png Co-authored-by: Koen Kanters <[email protected]> * Update exposes (Koenkk#944) * Add devices-overview page app (Koenkk#942) * Use devices-overview-app * Fix docker-compose.yml for local-run * Add devices-overview vue app * Add devices-overview app build * Set theme jekyll-theme-cayman * Remove CNAME * Fix: devices-overview-app hardcoded image url * Fix device-overview filters * Make device-overview exposes filter AND * Readd CNAME * Read device-addedAt from git and use for sort and label * Readd CNAME * Remove old supported devices table view * Fix docgen test * Add whitelabel-device icon * Fix: use original model for whitelabel devices * Fix minor styles for small devices * Fix whitelabel flag * Fix sort by addedAt * Add model to devices-overview * Delete docgen.test.js * Update .eslintignore * Update .eslintignore * Update package.json * Update supported-devices.js Co-authored-by: Koen Kanters <[email protected]> * Add frontend url. Koenkk/zigbee2mqtt#9214 * Added description for Perenio PECLS01 water leak sensor (Koenkk#950) * Refactor documentation and use VuePress as generator * Regenerate device-pages * Disable codeblock line-numbers on small devices * 21 10 backdate (Koenkk#951) * Add documentation and image for Philips Surimu Rectangle Panel * Add documentation and image for Philips LTV001 White Ambiance E27 ST64 bulb * Add documentation and image for Philips LTV001 White Ambiance E27 ST64 bulb * Not sure what happened here, but it looks like I modified this file so, adding it back! * Small cleanup * Add addedAt to device frontmatter * WIP: Quickstart * Add more get started stuff * WIP: quickstart guide * WIP: quickstart guide * Minor improvements; WIP getting started * Edit supported-hardware.md * Styles; try git-plugin * Added image for IKEA LED1949C5 (Koenkk#954) * add network_key:GENERATE to get-started * Styles * Add network_key converter * disable contributors display * Point to z2m main repo. * Updates * Add list expose (Koenkk#948) * Initial * variant 2 * u * more variants * Update exposes.md * Update exposes.md * Fix navbar Github link * Move FAQ to direct child of Guide and fix some links * Add dark class more early to avoid flickering on page load * Fix fails to start link in sidebar. * temporarily enable debug mode * Invalidate cache * Disable debug mode, update dependencies * Refactor FAQ, Z2M fails to start * Update z2m fails to start. * try vue patch * try disable webpack cache * Remove vue patch; update quasar * show hide back-to-top also on small devices * Fix broken links * change deploy * Add robots.txt * develop deploy; fix links * Fix links * add docsbranch develop switch * Readd usb-cable hint * Fix typo * Content improvements * More improvements * add docsbranch develop switch * Readd usb-cable hint * Fix typo * Disable deploy of develop branch * WIP: Config refactor * WIP: Config refactor * Config refactor * Config refactor * Remove develop link from navbar guide * Fix links * Small updates to configuration * Content improvements * Add workflows * Philips ltf (Koenkk#962) * Added documentation for Philips Apogee devices * Added images for Philips Apogee devices * Add sitemap generation * Add build.txt * Integrate algolia * Integrate algolia * add docsearch plugin * Fix workflow file * ci fixes * Try to better rank device-description search hits * Wait 1min before first request to build.txt * Remote start_urls from algolia index * Update algolia section-selector * Update navbar active-route links * Better device-desc search, use @Koenkk's index * Fix dropdown styles on mobile with dark mode * Change algolia index * Fixed Ubisys vendor name (Koenkk#963) * Update device-availability.md * Add images for Tuya TS000x_switch_module (Koenkk#964) * Prepare for 1.22.0 release * Remove unused images * Use herdsman 14.0.301 and fix links * Fix: image path, links * Use www.zigbee2mqtt.io * Add Notes-Comment test; remove "notes none" sections * Add Notes-Comment test; remove "notes none" sections * Change attention comments in device files Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Koen Kanters <[email protected]> Co-authored-by: Robin Kolk <[email protected]> Co-authored-by: Koen Kanters <[email protected]> Co-authored-by: Burkhard Kneiseler <[email protected]> Co-authored-by: Aleks <[email protected]> Co-authored-by: danieledwardgeorgehitchcock <[email protected]> Co-authored-by: Dirk van Donkelaar <[email protected]> Co-authored-by: rodriguezst <[email protected]>
1 parent 426fd16 commit 00c0af2

File tree

3,622 files changed

+71117
-42181
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,622 files changed

+71117
-42181
lines changed

.editorconfig

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# EditorConfig helps developers define and maintain consistent
2+
# coding styles between different editors and IDEs
3+
# editorconfig.org
4+
5+
root = true
6+
7+
[*]
8+
9+
indent_style = space
10+
indent_size = 2
11+
end_of_line = lf
12+
charset = utf-8
13+
trim_trailing_whitespace = true
14+
insert_final_newline = true
15+
16+
[{*.md, *.pug}]
17+
trim_trailing_whitespace = false

.eslintignore

-2
This file was deleted.

.eslintrc.json

-22
This file was deleted.

.github/workflows/build-deploy.yml

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Build ⚙ and Deploy 🚀
2+
on: push
3+
4+
jobs:
5+
build_and_deploy:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: Checkout 🚚
9+
uses: actions/checkout@v2
10+
11+
- name: Setup Node.js ⚗
12+
uses: actions/[email protected]
13+
with:
14+
node-version: '16'
15+
16+
- name: Determine node version №
17+
id: node-version
18+
run: |
19+
echo "::set-output name=version::$(node -v)"
20+
21+
- name: Restore Cache 📦
22+
uses: actions/[email protected]
23+
id: cache
24+
with:
25+
path: node_modules
26+
key: ${{ runner.os }}-node-${{ steps.node-version.outputs.version }}-${{ hashFiles('package-lock.json') }}
27+
28+
- name: Install dependencies 🌐
29+
if: steps.cache.outputs.cache-hit != 'true'
30+
run: npm ci
31+
32+
# - name: Set DEVELOP_BRANCH env var
33+
# if: github.ref == 'refs/heads/develop'
34+
# run: |
35+
# echo "DEVELOP_BRANCH=yes" >> $GITHUB_ENV
36+
37+
- name: Build 🛠
38+
run: npm run build
39+
40+
- name: Run tests 🩺
41+
run: npm run test
42+
43+
- name: Add build.txt 🗓
44+
run: |
45+
git log --pretty=format:'%h' -n 1 > dist/build.txt
46+
echo >> dist/build.txt
47+
date +%F_%T >> dist/build.txt
48+
49+
- name: Deploy 🚀
50+
if: github.ref == 'refs/heads/master'
51+
uses: JamesIves/[email protected]
52+
with:
53+
branch: gh-pages # The branch the action should deploy to.
54+
folder: dist # The folder the action should deploy.
55+
single-commit: true
56+
clean: true
57+
# clean-exclude: |
58+
# develop
59+
60+
# - name: Deploy to /develop 🚀
61+
# if: github.ref == 'refs/heads/develop'
62+
# uses: JamesIves/[email protected]
63+
# with:
64+
# branch: gh-pages
65+
# folder: dist
66+
# target-folder: develop
67+
# single-commit: true
68+
# clean: true

.github/workflows/ci.yml

-31
This file was deleted.
+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Update Algolia-Search index
2+
3+
# Only trigger, when the build workflow succeeded on branch master
4+
on:
5+
workflow_run:
6+
workflows: [ "Build ⚙ and Deploy 🚀" ]
7+
branches: [ master ]
8+
types: [ completed ]
9+
10+
jobs:
11+
update-algolia-index:
12+
runs-on: ubuntu-latest
13+
steps:
14+
# Try to workaround time gap between newly gh-pages deployment is available (cache cleared?)
15+
- name: Wait for deployment is published
16+
run: |
17+
CNT=1
18+
echo Waiting for deployment ${GITHUB_SHA:0:7} is published
19+
sleep 60
20+
while ! curl -sS https://www.zigbee2mqtt.io/build.txt | grep -qF ${GITHUB_SHA:0:7} ; do
21+
CNT=$((CNT+1))
22+
sleep 1
23+
if [ $CNT -gt 300 ]; then
24+
>&2 echo "build.txt does not match current commit"
25+
>&2 curl -sS https://www.zigbee2mqtt.io/build.txt
26+
exit 1
27+
fi
28+
done
29+
30+
- name: Create algolia scraper config
31+
run: |
32+
cat << EOF > algolia.json
33+
{
34+
"index_name": "zigbee2mqtt.io",
35+
"sitemap_urls": ["https://www.zigbee2mqtt.io/sitemap.xml"],
36+
"stop_urls": [],
37+
"selectors": {
38+
"lvl0": {
39+
"selector": "header .router-link-active",
40+
"global": true,
41+
"default_value": "Miscellaneous"
42+
},
43+
"lvl1": ".theme-default-content h1",
44+
"lvl2": ".theme-default-content h2, .device-page h1 + table tbody tr:nth-child(3) td:nth-child(2)",
45+
"lvl3": ".theme-default-content h3",
46+
"lvl4": ".theme-default-content h4",
47+
"lvl5": ".theme-default-content h5",
48+
"text": ".theme-default-content p, .theme-default-content li, .theme-default-content code, .theme-default-content td",
49+
"lang": {
50+
"selector": "/html/@lang",
51+
"type": "xpath",
52+
"global": true
53+
}
54+
},
55+
"custom_settings": {
56+
"attributesForFaceting": ["lang"]
57+
}
58+
}
59+
EOF
60+
61+
- run: curl -sSL https://www.zigbee2mqtt.io/build.txt
62+
63+
- name: Update algolia docsearch
64+
uses: darrenjennings/algolia-docsearch-action@master
65+
with:
66+
algolia_application_id: K1BM3QYQ34
67+
algolia_api_key: ${{ secrets.ALGOLIA_INDEX_APIKEY }}
68+
file: 'algolia.json'

.gitignore

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
node_modules/
2-
_site/
3-
.sass-cache/
1+
node_modules
2+
.temp
3+
.cache
4+
dist
45
.idea
5-
.DS_Store
6-
.idea/
7-
docs/.jekyll-metadata

LICENSE

100755100644
File mode changed.

README.md

100755100644
+85-34
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,85 @@
1-
# Zigbee2MQTT.io
2-
This repository contains the Zigbee2MQTT documentation.
3-
4-
## Generated documentation
5-
6-
Due to the repetitive nature of zigbee devices, lots of documentation is auto-generated from source code or by particular directives for the `exposes` and `notes` section. For local development:
7-
8-
```bash
9-
npm install
10-
npm run docgen
11-
```
12-
13-
## Running locally
14-
To run locally, execute the following commands:
15-
16-
```bash
17-
# Checkout the repository
18-
git clone https://github.com/Koenkk/zigbee2mqtt.io.git
19-
cd zigbee2mqtt.io/docs
20-
21-
# Make sure that you have at least Ruby 2.1.0 installed, if this fails, install at least Ruby 2.1.0
22-
ruby --version
23-
24-
# Install bundler
25-
sudo gem install bundler
26-
27-
# Install dependencies
28-
bundle install
29-
30-
# Start local server
31-
bundle exec jekyll serve --incremental
32-
```
33-
34-
You can now find the local instance under: http://127.0.0.1:4000
1+
# Zigbee2MQTT.io
2+
3+
[![Build ⚙ and Deploy 🚀 ](https://github.com/Koenkk/zigbee2mqtt.io/actions/workflows/build-deploy.yml/badge.svg)](https://github.com/Koenkk/zigbee2mqtt.io/actions/workflows/build-deploy.yml)
4+
5+
This repository contains the [Zigbee2MQTT](https://zigbee2mqtt.io) documentation.
6+
7+
It is based on [VuePress v2](https://v2.vuepress.vuejs.org/).
8+
9+
## Architecture
10+
11+
**Directory-Structure:**
12+
13+
* `docgen`: Some scripts to test and generate the Device-Pages.
14+
* `docs`: The actual documentation.
15+
* `docs/.vuepress`: Some VuePress enhancements like Stylesheets.
16+
* `public`: Static assets.
17+
* `supported-devices-component`: Vue.js component rendering the devices-overview page.
18+
* `navbar.ts`: Configuration for the top navigation.
19+
* `sidebar.ts`: Configuration for the sidebars by individual sections (like _Guide_).
20+
* `vuepress.config.ts`: The [VuePress config file](https://v2.vuepress.vuejs.org/reference/config.html).
21+
22+
## Docgen
23+
24+
The docgen-scripts helps to generate and update the individual device-pages (`/docs/devices/*.md`).
25+
[zigbee-herdsman-converters](https://github.com/Koenkk/zigbee-herdsman-converters) exposes a list with supported devices which is used for generation. It also updates the Devices-List used by the _Supported-Devices_ overview page.
26+
27+
The `## Notes` section of each page is writte by hand and does not come from `zigbee-herdsman-converters`. This section gets preserved and can be edited.
28+
29+
Docgen is written in Typescript, so you need a recent version of Node.js and NPM.
30+
31+
```bash
32+
# Install dependencies
33+
npm ci
34+
35+
# Run docgen
36+
npm run docgen
37+
```
38+
39+
### Docgen Tests
40+
41+
Docgen includes some scripts to help testing the page.
42+
43+
* `check-device-images`: Checks for missing device images
44+
* `check-links`: Checks for broken internal links
45+
46+
**Attention**: `check-links` iterates over the generated VuePress files, so you have to build the page first!
47+
48+
49+
## VuePress
50+
51+
```bash
52+
# Install dependencies
53+
npm ci
54+
```
55+
56+
### Building
57+
58+
```bash
59+
# Run vuepress build
60+
npm run build
61+
```
62+
63+
The build-artifact gets written to `dist` directory.
64+
65+
### Development
66+
67+
```bash
68+
# Run vuepress in dev mode with hot-reloading
69+
npm run dev
70+
```
71+
72+
The `dev`-Mode **excludes** the huge amount device-pages which slows down the build process drastically.
73+
If you are interested in the device-pages you could include them by using the `npm run dev:devices` npm-run script.
74+
75+
76+
## Docker
77+
78+
You can also just use a docker-image include Node.js.
79+
80+
```bash
81+
$ docker run --rm -v $PWD:/app -u $UID -ti node:16 bash
82+
node@87e1438ef553:/$ cd /app
83+
node@87e1438ef553:/app$ npm ci
84+
node@87e1438ef553:/app$ npm run dev
85+
```

devices-overview/.browserslistrc

-3
This file was deleted.

devices-overview/.eslintrc.js

-18
This file was deleted.

devices-overview/.gitignore

-23
This file was deleted.

0 commit comments

Comments
 (0)