Skip to content

Commit

Permalink
[Enhancement] - Simplify local builds to lower bar for beginners open…
Browse files Browse the repository at this point in the history
…hab#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]>
  • Loading branch information
pgfeller and stefan-hoehn authored Mar 2, 2024
1 parent a64d0e6 commit 475c5d7
Show file tree
Hide file tree
Showing 9 changed files with 11,567 additions and 6,209 deletions.
1 change: 1 addition & 0 deletions .vuepress/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
addons-*
public/logos
tmp
dist
94 changes: 0 additions & 94 deletions .vuepress/config.js

This file was deleted.

67 changes: 67 additions & 0 deletions .vuepress/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
import { DefaultThemeConfig, UserConfig, defineConfig } from "vuepress/config";

const DocsSidebarNavigation = require('./docs-sidebar.js')

const base = process.env.OH_DOCS_VERSION
? `/v${process.env.OH_DOCS_VERSION}/`
: '/'

const config: UserConfig<DefaultThemeConfig> = {
title: 'v4 Documentation Preview',
description: 'This is a preview of the main parts of the documentation, found in the openhab/openhab-docs repository',
dest: 'vuepress',
host: 'localhost',
plugins: [
// @ts-ignore
'tabs',
'container'
],
// @ts-ignore
base: base,
patterns: [
'docs/**/*.md',
'addons/integrations/**/*.md',
'**/*.vue'],
configureWebpack: {
module: {
rules: [
{
test: /\.(drawio|xml|txt)$/,
exclude: /node_modules/,
use: 'null-loader'
}
]
}
},
head: [
['link', { rel: 'stylesheet', href: `/fonts/fonts.css` }],
['link', { rel: 'icon', href: `/favicon.ico` }],
['link', { rel: 'shortcut icon', href: `/favicon.ico` }],
['link', { rel: 'apple-touch-icon', href: `/apple-icon.png` }],
['meta', { property: 'og:type', content: 'website' }],
['meta', { property: 'og:image', content: 'https://www.openhab.org/og-image.png' }],

],
themeConfig: {
logo: `/openhab-logo.png`,
editLinks: false,
activeHeaderLinks: false,
sidebarDepth: 0,
docsDir: 'docs',
nav: [
{
text: 'Documentation',
link: '/docs/',
},
{
text: 'GitHub',
link: 'https://github.com/openhab/openhab-docs',
}
],
sidebar: {
'/docs/': DocsSidebarNavigation
}
}
};

export default defineConfig(config);
40 changes: 34 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,6 @@ Imagine you want to do an improvement of the zwave binding and have to update th
That's twice the effort and also we would have to coordinate two Pull Requests.
So we are saving time for everyone by keeping those files at their original location along with the code.

::: tip UNDER REVIEW

The process below is subject to changes until the openHAB.x website become the production one.

:::

### How the documentation build works

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

### How to build the documentation locally

It is possible to build a preview version of the documentation on your local machine. The following software is required:

- [`node =16.20.1`](https://nodejs.org/en)
- [`ruby >=3.0.2`](https://www.ruby-lang.org/en/)
- [`Python >= 3.10.12`](https://www.python.org)

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.

Example:

```bash
$ nvm install 16
# ...
$ nvm use 16
Now using node v16.20.2 (npm v8.19.4)
$ npm install
# ...
$ npm run serve
# ...
Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/)
```

The local preview is available under the following options

- [http://0.0.0.0:8000/docs](http://0.0.0.0:8000/docs)
- [http://localhost:8000/docs](http://localhost:8000/docs)
- [http://[::]/:8000/docs](http://[::]:8000/docs)

![local preview](images/local-docu-preview.png)

This will also allow you to preview how the page renders on different devices using the respective browser tools.

## Documentation Versioning

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)
Expand Down
Binary file added images/local-docu-preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 475c5d7

Please sign in to comment.