Skip to content

Commit

Permalink
feat: Add Go Client documentation website (#2994)
Browse files Browse the repository at this point in the history
* feat: Add Go Client documentation website

* add Apache approve

* chore: Update GitHub Actions ver

* Exclude Go lock file from apache-rat-plugin scanning
  • Loading branch information
ittuann authored Jul 14, 2024
1 parent 289f8a4 commit 5784f88
Show file tree
Hide file tree
Showing 34 changed files with 3,573 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/go-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: build-go-docs

on:
workflow_dispatch:
schedule:
- cron: "0 2 * * 6"

jobs:
build-go-docs:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
extended: true

- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: ./streampipes-client-go/docs/package-lock.json

- name: Install docsy npm dependencies
working-directory: ./streampipes-client-go/docs
run: npm ci --verbose

- name: Build
working-directory: ./streampipes-client-go/docs
run: hugo --minify

- name: Publish Go docs as artifact
uses: actions/upload-artifact@v4
with:
name: streampipes-go-docs
path: |
streampipes-client-go/docs/public/
retention-days: 5
3 changes: 3 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1236,6 +1236,9 @@
<!-- Exclude Husky which defines its own gitignore and is not detected by rat -->
<exclude>ui/.husky/**</exclude>

<!-- Exclude GO -->
<exclude>**/go.sum</exclude>

</excludes>
</configuration>
</plugin>
Expand Down
19 changes: 19 additions & 0 deletions streampipes-client-go/docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

/public
resources/
node_modules/
.hugo_build.lock
33 changes: 33 additions & 0 deletions streampipes-client-go/docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!--
~ Licensed to the Apache Software Foundation (ASF) under one or more
~ contributor license agreements. See the NOTICE file distributed with
~ this work for additional information regarding copyright ownership.
~ The ASF licenses this file to You under the Apache License, Version 2.0
~ (the "License"); you may not use this file except in compliance with
~ the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
-->

# Apache StreamPipesocs Go Client Documentation

This directory contains the documentation for the Apache StreamPipes Go Client. The documentation is built and displayed using the [Docsy](https://www.docsy.dev/) theme under the [Hugo](https://gohugo.io/) framework.

## Running Locally

To build the documentation site locally, the prerequisites are to have the Go language environment installed, as well as Hugo.

You can then start the server with the following command:

```bash
hugo server
```

This will launch a local server, which is typically accessible at `http://localhost:1313`.
1 change: 1 addition & 0 deletions streampipes-client-go/docs/assets/icons/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions streampipes-client-go/docs/assets/scss/_variables_project.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Licensed to the Apache Software Foundation (ASF) under one or more
// contributor license agreements. See the NOTICE file distributed with
// this work for additional information regarding copyright ownership.
// The ASF licenses this file to You under the Apache License, Version 2.0
// (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

$primary: #39B54A;
$secondary: #1B1464;
57 changes: 57 additions & 0 deletions streampipes-client-go/docs/content/en/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
title: Apache StreamPipesocs
---
<!--
~ Licensed to the Apache Software Foundation (ASF) under one or more
~ contributor license agreements. See the NOTICE file distributed with
~ this work for additional information regarding copyright ownership.
~ The ASF licenses this file to You under the Apache License, Version 2.0
~ (the "License"); you may not use this file except in compliance with
~ the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
-->

{{< blocks/cover title="Welcome to StreamPipes Go" image_anchor="top" height="full" >}}

<p class="lead"><img src="https://streampipes.apache.org/img/sp-logo-color.png" class="img-fluid" alt="Apache StreamPipes"> </p>

<a class="btn btn-lg btn-primary me-3 mb-4" href="/docs/">
Documentation <i class="fas fa-arrow-alt-circle-right ms-2"></i>
</a>
<a class="btn btn-lg btn-secondary me-3 mb-4" href="https://github.com/apache/streampipes/releases">
Download <i class="fab fa-github ms-2 "></i>
</a>

<p class="lead mt-5">Apache StreamPipes enables non-technical users to connect, analyze and explore IoT data streams.</p>
{{< blocks/link-down color="info" >}}
{{< /blocks/cover >}}

{{% blocks/lead color="primary" %}}
Apache StreamPipes is a self-service Industrial IoT toolbox to enable non-technical users to connect, analyze and explore IoT data streams.
{{% /blocks/lead %}}

{{% blocks/section color="light" type="row" %}}

{{% blocks/feature icon="fa-lightbulb" title="Made for the Industrial IoT!" %}}
Quick-Start your IIoT Initiative with Apache StreamPipes.

A single user interface for everything.
{{% /blocks/feature %}}

{{% blocks/feature icon="fab fa-github" title="Contributions welcome!" url="https://github.com/apache/streampipes" %}}
We do a [Pull Request](https://github.com/apache/streampipes/pulls) contributions workflow on **GitHub**. New users are always welcome!
{{% /blocks/feature %}}

{{% blocks/feature icon="fab fa-linkedin" title="Follow us on LinkedIn!" url="https://www.linkedin.com/company/apache-streampipes/" %}}
For announcement of latest features etc.
{{% /blocks/feature %}}

{{% /blocks/section %}}
Loading

0 comments on commit 5784f88

Please sign in to comment.