Skip to content

Commit 475c5d7

Browse files
[Enhancement] - Simplify local builds to lower bar for beginners openhab#2215 (openhab#2218)
* [Enancement] - Simplify local builds to lower bar for beginners Fixes openhab#2215 * [Enancement] - Simplify local builds to lower bar for beginners Fixes openhab#2215 📄 missing `npm install step` added to README.md Signed-off-by: Patrik Gfeller <[email protected]> * 🐞 problems resolved after reabse/update to latest main branch. Signed-off-by: Patrik Gfeller <[email protected]> * 🔃 Squashed commit of the following: commit 6774910 Author: jimtng <[email protected]> Date: Sun Feb 25 17:23:01 2024 +1000 Convert pwm, pid, map icons to svg and add jinja logo (openhab#2253) * Replace map icon with svg version Signed-off-by: Jimmy Tanagra <[email protected]> * Replace pidcontroller icon with svg version Signed-off-by: Jimmy Tanagra <[email protected]> * Replace pwm icon with svg version Signed-off-by: Jimmy Tanagra <[email protected]> * Add jinja logo Signed-off-by: Jimmy Tanagra <[email protected]> --------- Signed-off-by: Jimmy Tanagra <[email protected]> commit 6f39e14 Author: jimtng <[email protected]> Date: Sun Feb 25 08:15:21 2024 +1000 Add icon for scale transformation (openhab#2252) Signed-off-by: Jimmy Tanagra <[email protected]> commit 67a019a Author: jimtng <[email protected]> Date: Sun Feb 25 00:55:02 2024 +1000 Add pwm icon (openhab#2251) Signed-off-by: Jimmy Tanagra <[email protected]> commit a03e4c0 Author: jimtng <[email protected]> Date: Sun Feb 25 00:54:22 2024 +1000 PIDController icon: Make lines thicker (openhab#2250) Signed-off-by: Jimmy Tanagra <[email protected]> commit 7308a41 Author: Kai Kreuzer <[email protected]> Date: Sat Feb 24 14:57:54 2024 +0100 Fix typo in tutorial (openhab#2249) Signed-off-by: Kai Kreuzer <[email protected]> commit ccb7e64 Author: jimtng <[email protected]> Date: Sat Feb 24 18:15:21 2024 +1000 Make basicui icon a bit bigger and more visible (openhab#2247) Signed-off-by: Jimmy Tanagra <[email protected]> commit d9664d9 Author: jimtng <[email protected]> Date: Sat Feb 24 18:10:22 2024 +1000 Add icon for pidcontroller (openhab#2248) Signed-off-by: Jimmy Tanagra <[email protected]> commit bcba38e Author: jimtng <[email protected]> Date: Sat Feb 24 08:31:23 2024 +1000 Add an icon for map transformation (openhab#2240) Signed-off-by: Jimmy Tanagra <[email protected]> commit f8ebab4 Author: jimtng <[email protected]> Date: Sat Feb 24 03:23:06 2024 +1000 Add icon for Basic UI (openhab#2242) Signed-off-by: Jimmy Tanagra <[email protected]> commit ab958f9 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri Feb 23 18:21:57 2024 +0100 Bump ip from 1.1.5 to 1.1.9 (openhab#2244) Bumps [ip](https://github.com/indutny/node-ip) from 1.1.5 to 1.1.9. - [Commits](indutny/node-ip@v1.1.5...v1.1.9) --- updated-dependencies: - dependency-name: ip dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: stefan-hoehn <[email protected]> commit dedb16a Author: Florian Hotze <[email protected]> Date: Fri Feb 23 16:52:57 2024 +0100 Use SVG logos for DoorBird & Govee (openhab#2246) Signed-off-by: Florian Hotze <[email protected]> commit 749a656 Author: jimtng <[email protected]> Date: Fri Feb 23 18:29:36 2024 +1000 Add sqlite icon (openhab#2238) Signed-off-by: Jimmy Tanagra <[email protected]> Signed-off-by: Patrik Gfeller <[email protected]> * Update README.md Signed-off-by: stefan-hoehn <[email protected]> * Update README.md Signed-off-by: stefan-hoehn <[email protected]> --------- Signed-off-by: Patrik Gfeller <[email protected]> Signed-off-by: stefan-hoehn <[email protected]> Co-authored-by: stefan-hoehn <[email protected]>
1 parent a64d0e6 commit 475c5d7

9 files changed

+11567
-6209
lines changed

.vuepress/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
addons-*
22
public/logos
33
tmp
4+
dist

.vuepress/config.js

-94
This file was deleted.

.vuepress/config.ts

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
import { DefaultThemeConfig, UserConfig, defineConfig } from "vuepress/config";
2+
3+
const DocsSidebarNavigation = require('./docs-sidebar.js')
4+
5+
const base = process.env.OH_DOCS_VERSION
6+
? `/v${process.env.OH_DOCS_VERSION}/`
7+
: '/'
8+
9+
const config: UserConfig<DefaultThemeConfig> = {
10+
title: 'v4 Documentation Preview',
11+
description: 'This is a preview of the main parts of the documentation, found in the openhab/openhab-docs repository',
12+
dest: 'vuepress',
13+
host: 'localhost',
14+
plugins: [
15+
// @ts-ignore
16+
'tabs',
17+
'container'
18+
],
19+
// @ts-ignore
20+
base: base,
21+
patterns: [
22+
'docs/**/*.md',
23+
'addons/integrations/**/*.md',
24+
'**/*.vue'],
25+
configureWebpack: {
26+
module: {
27+
rules: [
28+
{
29+
test: /\.(drawio|xml|txt)$/,
30+
exclude: /node_modules/,
31+
use: 'null-loader'
32+
}
33+
]
34+
}
35+
},
36+
head: [
37+
['link', { rel: 'stylesheet', href: `/fonts/fonts.css` }],
38+
['link', { rel: 'icon', href: `/favicon.ico` }],
39+
['link', { rel: 'shortcut icon', href: `/favicon.ico` }],
40+
['link', { rel: 'apple-touch-icon', href: `/apple-icon.png` }],
41+
['meta', { property: 'og:type', content: 'website' }],
42+
['meta', { property: 'og:image', content: 'https://www.openhab.org/og-image.png' }],
43+
44+
],
45+
themeConfig: {
46+
logo: `/openhab-logo.png`,
47+
editLinks: false,
48+
activeHeaderLinks: false,
49+
sidebarDepth: 0,
50+
docsDir: 'docs',
51+
nav: [
52+
{
53+
text: 'Documentation',
54+
link: '/docs/',
55+
},
56+
{
57+
text: 'GitHub',
58+
link: 'https://github.com/openhab/openhab-docs',
59+
}
60+
],
61+
sidebar: {
62+
'/docs/': DocsSidebarNavigation
63+
}
64+
}
65+
};
66+
67+
export default defineConfig(config);

README.md

+34-6
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,6 @@ Imagine you want to do an improvement of the zwave binding and have to update th
5050
That's twice the effort and also we would have to coordinate two Pull Requests.
5151
So we are saving time for everyone by keeping those files at their original location along with the code.
5252

53-
::: tip UNDER REVIEW
54-
55-
The process below is subject to changes until the openHAB.x website become the production one.
56-
57-
:::
58-
5953
### How the documentation build works
6054

6155
We have set up our [build server](https://ci.openhab.org/view/Documentation/) to do the magic automatically.
@@ -85,6 +79,40 @@ When one of these jobs is finished, it will then notify our website hosting serv
8579
This is recognized due to new commits in the final branch of this repository.
8680
The new build will include all the latest changes in the code repository and in all external repositories.
8781

82+
### How to build the documentation locally
83+
84+
It is possible to build a preview version of the documentation on your local machine. The following software is required:
85+
86+
- [`node =16.20.1`](https://nodejs.org/en)
87+
- [`ruby >=3.0.2`](https://www.ruby-lang.org/en/)
88+
- [`Python >= 3.10.12`](https://www.python.org)
89+
90+
If you work on multiple node projects [Node Version Manager](https://github.com/nvm-sh/nvm) is recommended in case they use a different version of node.
91+
92+
Example:
93+
94+
```bash
95+
$ nvm install 16
96+
# ...
97+
$ nvm use 16
98+
Now using node v16.20.2 (npm v8.19.4)
99+
$ npm install
100+
# ...
101+
$ npm run serve
102+
# ...
103+
Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/)
104+
```
105+
106+
The local preview is available under the following options
107+
108+
- [http://0.0.0.0:8000/docs](http://0.0.0.0:8000/docs)
109+
- [http://localhost:8000/docs](http://localhost:8000/docs)
110+
- [http://[::]/:8000/docs](http://[::]:8000/docs)
111+
112+
![local preview](images/local-docu-preview.png)
113+
114+
This will also allow you to preview how the page renders on different devices using the respective browser tools.
115+
88116
## Documentation Versioning
89117

90118
Just as openHAB is released in versions, the documentation website provides fixed versions of the documentation articles, e.g., [https://www.openhab.org/v2.2/installation/linux.html](https://www.openhab.org/v2.2/installation/linux.html)

images/local-docu-preview.png

60.1 KB
Loading

0 commit comments

Comments
 (0)