[DOCS] Factorize documentation configuration into one file (#1856)

This commit is contained in:
Florian authored and GitHub committed 2024-01-09 09:57:08 -06:00
1 parent fd3c9b07b4
commit 2c3d98729a
4 files changed
+117 -128

No files matched your search

+3
View File
@@ -127,6 +127,9 @@ jobs:
uses: actions/setup-node@v3 uses: actions/setup-node@v3
with: with:
node-version: "14.x" node-version: "14.x"
- name: Download Common Config
run: |
curl -o docs/.vuepress/public/commonConfig.js https://www.theengs.io/commonConfig.js
- name: Install build dependencies - name: Install build dependencies
run: npm install run: npm install
- name: Build documentation - name: Build documentation
@@ -54,6 +54,9 @@ jobs:
uses: actions/setup-node@v3 uses: actions/setup-node@v3
with: with:
node-version: "14.x" node-version: "14.x"
- name: Download Common Config
run: |
curl -o docs/.vuepress/public/commonConfig.js https://www.theengs.io/commonConfig.js
- name: Build documentation - name: Build documentation
run: | run: |
python ./scripts/gen_wu_dev.py python ./scripts/gen_wu_dev.py
+3
View File
@@ -21,6 +21,9 @@ jobs:
python -m pip install --upgrade pip python -m pip install --upgrade pip
pip install requests pandas markdown pytablereader tabulate pip install requests pandas markdown pytablereader tabulate
npm install npm install
- name: Download Common Config
run: |
curl -o docs/.vuepress/public/commonConfig.js https://www.theengs.io/commonConfig.js
- name: get lastest release tag - name: get lastest release tag
id: last_release id: last_release
uses: InsonusK/get-latest-release@v1.0.1 uses: InsonusK/get-latest-release@v1.0.1
+108 -128
View File
@@ -1,130 +1,110 @@
const commonConfig = require('./public/commonConfig');
module.exports = { module.exports = {
markdown: { ...commonConfig,
lineNumbers: true title: 'OpenMQTTGateway version_tag',
}, base: '/',
title: 'OpenMQTTGateway version_tag', description: 'One gateway, many technologies: MQTT gateway for ESP8266, ESP32, Sonoff RF Bridge or Arduino with bidirectional 433mhz/315mhz/868mhz, Infrared communications, BLE, beacons detection, mi flora / mi jia / LYWSD02/ Mi Scale compatibility, SMS & LORA.',
base: '/', head: [
description: 'One gateway, many technologies: MQTT gateway for ESP8266, ESP32, Sonoff RF Bridge or Arduino with bidirectional 433mhz/315mhz/868mhz, Infrared communications, BLE, beacons detection, mi flora / mi jia / LYWSD02/ Mi Scale compatibility, SMS & LORA.', ['link', { rel: "icon", type: "image/png", sizes: "32x32", href: "/favicon-32x32.png"}],
head: [ ['link', { rel: "icon", type: "image/png", sizes: "16x16", href: "/favicon-16x16.png"}],
['link', { rel: "icon", type: "image/png", sizes: "32x32", href: "/favicon-32x32.png"}], ['link', { rel: 'icon', href: '/img/Openmqttgateway_logo_mini.png' }],
['link', { rel: "icon", type: "image/png", sizes: "16x16", href: "/favicon-16x16.png"}], ['link', { rel: 'manifest', href: '/manifest.json' }],
['link', { rel: 'icon', href: '/img/Openmqttgateway_logo_mini.png' }], ['meta', { name: 'theme-color', content: '#3eaf7c' }],
['link', { rel: 'manifest', href: '/manifest.json' }], ['meta', { name: 'apple-mobile-web-app-capable', content: 'yes' }],
['meta', { name: 'theme-color', content: '#3eaf7c' }], ['meta', { name: 'apple-mobile-web-app-status-bar-style', content: 'black' }],
['meta', { name: 'apple-mobile-web-app-capable', content: 'yes' }], ['link', { rel: "apple-touch-icon", sizes: "180x180", href: "/apple-touch-icon.png"}],
['meta', { name: 'apple-mobile-web-app-status-bar-style', content: 'black' }], ['link', { rel: 'mask-icon', href: '/icons/safari-pinned-tab.svg', color: '#3eaf7c' }],
['link', { rel: "apple-touch-icon", sizes: "180x180", href: "/apple-touch-icon.png"}], ['meta', { name: 'msapplication-TileImage', content: '/favicon-144x144.png' }],
['link', { rel: 'mask-icon', href: '/icons/safari-pinned-tab.svg', color: '#3eaf7c' }], ['meta', { name: 'msapplication-TileColor', content: '#000000' }],
['meta', { name: 'msapplication-TileImage', content: '/favicon-144x144.png' }], ['script', {type: 'module', src: 'https://unpkg.com/esp-web-tools@3.4.2/dist/web/install-button.js?module'}]
['meta', { name: 'msapplication-TileColor', content: '#000000' }], ],
['script', {type: 'module', src: 'https://unpkg.com/esp-web-tools@3.4.2/dist/web/install-button.js?module'}] themeConfig: {
], repo: '1technophile/OpenMQTTGateway',
themeConfig: { docsDir: 'docs',
smoothScroll: true, ...commonConfig.themeConfig,
repo: '1technophile/OpenMQTTGateway', sidebar: [
docsDir: 'docs', ['/','0 - What is it for 🏠'],
docsBranch: 'development', {
lastUpdated: 'Last Updated', title: '1 - Prerequisites🧭', // required
editLinks: true, //collapsable: true, // optional, defaults to true
nav: [ sidebarDepth: 1, // optional, defaults to 1
{ text: 'Shop🆕', link: 'https://shop.theengs.io/'}, children: [
{ text: 'Blog', link: 'https://1technophile.blogspot.com'}, 'prerequisites/devices',
{ text: 'Docs', link: '/'}, 'prerequisites/board',
{ text: 'Community', link: 'https://community.openmqttgateway.com', target:'_self', rel:''}, 'prerequisites/parts',
{ text: 'Devices', link: 'https://compatible.openmqttgateway.com/index.php/devices', target:'_self', rel:''}, 'prerequisites/broker',
{ text: 'Upload', link: '/upload/web-install.html'}, 'prerequisites/controller']
{ text: 'Theengs', link: 'https://app.theengs.io/'} },
], {
sidebar: [ title: '2 - Set it up 🔨', // required
['/','0 - What is it for 🏠'], sidebarDepth: 1, // optional, defaults to 1
{ children: [
title: '1 - Prerequisites🧭', // required 'setitup/rf',
//collapsable: true, // optional, defaults to true 'setitup/ble',
sidebarDepth: 1, // optional, defaults to 1 'setitup/ir',
children: [ 'setitup/lora',
'prerequisites/devices', 'setitup/gsm',
'prerequisites/board', 'setitup/rs232',
'prerequisites/parts', 'setitup/sensors',
'prerequisites/broker', 'setitup/actuators'
'prerequisites/controller'] ]
}, },
{ {
title: '2 - Set it up 🔨', // required title: '3 - Upload ➡️', // required
sidebarDepth: 1, // optional, defaults to 1 sidebarDepth: 1, // optional, defaults to 1
children: [ children: [
'setitup/rf', 'upload/web-install',
'setitup/ble', 'upload/binaries',
'setitup/ir', 'upload/builds',
'setitup/lora', 'upload/gitpod',
'setitup/gsm', 'upload/portal',
'setitup/rs232', 'upload/advanced-configuration',
'setitup/sensors', 'upload/troubleshoot'
'setitup/actuators' ]
] },
}, {
{ title: '4 - Use ✈️', // required
title: '3 - Upload ➡️', // required sidebarDepth: 1, // optional, defaults to 1
sidebarDepth: 1, // optional, defaults to 1 children: [
children: [ 'use/rf',
'upload/web-install', 'use/ble',
'upload/binaries', 'use/ir',
'upload/builds', 'use/lora',
'upload/gitpod', 'use/gsm',
'upload/portal', 'use/rs232',
'upload/advanced-configuration', 'use/rfm69',
'upload/troubleshoot' 'use/sensors',
] 'use/actuators',
}, 'use/boards',
{ 'use/displays',
title: '4 - Use ✈️', // required 'use/gateway',
sidebarDepth: 1, // optional, defaults to 1 'use/webui'
children: [ ]
'use/rf', },
'use/ble', {
'use/ir', title: '5 - Integrate 🎉', // required
'use/lora', sidebarDepth: 1, // optional, defaults to 1
'use/gsm', children: [
'use/rs232', 'integrate/openhab2',
'use/rfm69', 'integrate/openhab3',
'use/sensors', 'integrate/home_assistant',
'use/actuators', 'integrate/node_red',
'use/boards', 'integrate/aws_iot',
'use/displays', 'integrate/jeedom'
'use/gateway', ]
'use/webui' },
] {
}, title: '6 - Participate 💻', // required
{ sidebarDepth: 1, // optional, defaults to 1
title: '5 - Integrate 🎉', // required children: [
sidebarDepth: 1, // optional, defaults to 1 'participate/support',
children: [ 'participate/development',
'integrate/openhab2', 'participate/adding-protocols',
'integrate/openhab3', 'participate/community',
'integrate/home_assistant', ['https://github.com/1technophile/OpenMQTTGateway/blob/development/LICENSE.txt','License']
'integrate/node_red', ]
'integrate/aws_iot', }
'integrate/jeedom' ]
]
},
{
title: '6 - Participate 💻', // required
sidebarDepth: 1, // optional, defaults to 1
children: [
'participate/support',
'participate/development',
'participate/adding-protocols',
'participate/community',
['https://github.com/1technophile/OpenMQTTGateway/blob/development/LICENSE.txt','License']
]
}
]
},
plugins: [
['@vuepress/pwa', {
serviceWorker: true,
updatePopup: true
}],
['@vuepress/medium-zoom', true],
['@vuepress/nprogress']
]
} }
}