-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 69661a1
Showing
55 changed files
with
3,458 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: npm | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
time: '20:00' | ||
open-pull-requests-limit: 10 | ||
- package-ecosystem: bundler | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
time: '20:00' | ||
open-pull-requests-limit: 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
# Sample workflow for building and deploying a Hugo site to GitHub Pages | ||
name: Deploy Hugo site to Pages | ||
|
||
on: | ||
# Runs on pushes targeting the default branch | ||
push: | ||
branches: | ||
- main | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
# Allow one concurrent deployment | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: true | ||
|
||
# Default to bash | ||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
# Build job | ||
build: | ||
runs-on: ubuntu-latest | ||
env: | ||
HUGO_VERSION: 0.111.2 | ||
steps: | ||
- name: Install Hugo CLI | ||
run: | | ||
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \ | ||
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb | ||
- name: Install Dart Sass Embedded | ||
run: sudo snap install dart-sass-embedded | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
fetch-depth: 0 | ||
- name: Setup Pages | ||
id: pages | ||
uses: actions/configure-pages@v3 | ||
- name: Install Node.js dependencies | ||
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true" | ||
- name: Build with Hugo | ||
env: | ||
# For maximum backward compatibility with Hugo modules | ||
HUGO_ENVIRONMENT: production | ||
HUGO_ENV: production | ||
run: | | ||
hugo \ | ||
--gc \ | ||
--minify \ | ||
--baseURL "${{ steps.pages.outputs.base_url }}/" | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
path: ./public | ||
|
||
# Deployment job | ||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/public | ||
resources/ | ||
node_modules/ | ||
.hugo_build.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
[submodule "themes/docsy"] | ||
path = themes/docsy | ||
url = https://github.com/google/docsy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
lts/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# How to Contribute | ||
|
||
We'd love to accept your patches and contributions to this project. There are | ||
just a few small guidelines you need to follow. | ||
|
||
## Contributor License Agreement | ||
|
||
Contributions to this project must be accompanied by a Contributor License | ||
Agreement. You (or your employer) retain the copyright to your contribution; | ||
this simply gives us permission to use and redistribute your contributions as | ||
part of the project. Head over to <https://cla.developers.google.com/> to see | ||
your current agreements on file or to sign a new one. | ||
|
||
You generally only need to submit a CLA once, so if you've already submitted one | ||
(even if it was for a different project), you probably don't need to do it | ||
again. | ||
|
||
## Code reviews | ||
|
||
All submissions, including submissions by project members, require review. We | ||
use GitHub pull requests for this purpose. Consult | ||
[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more | ||
information on using pull requests. | ||
|
||
## Community Guidelines | ||
|
||
This project follows | ||
[Google's Open Source Community Guidelines](https://opensource.google.com/conduct/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
FROM klakegg/hugo:ext-alpine | ||
|
||
RUN apk add git && \ | ||
git config --global --add safe.directory /src |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,156 @@ | ||
# HALMET documentation repository | ||
|
||
This is the HALMET documentation repository that is rendered to project documentation available at https://docs.hatlabs.fi/halmet/. | ||
HALMET is Hat Labs Marine Engine & Tank interface, an SH-ESP32 based development board for interfacing with common marine engines and resistive senders. | ||
HALMET is available for purchase at https://shop.hatlabs.fi. | ||
|
||
## Contributing | ||
|
||
You can contribute to the documentation by cloning the repository, modifying the Markdown pages, and creating a Pull Request. | ||
Instructions for generic GitHub use can be found at [The GitHub Guides](https://guides.github.com). | ||
|
||
The pages are rendered using [Hugo](https://gohugo.io/), a modern static site generation framework. | ||
The Hugo theme in use is [Docsy](https://www.docsy.dev/). | ||
|
||
If you want to test your modifications locally, [install Hugo](https://gohugo.io/installation/) and then run `hugo server`. | ||
|
||
---- | ||
|
||
# Docsy Example | ||
|
||
[Docsy][] is a [Hugo theme module][] for technical documentation sites, providing easy | ||
site navigation, structure, and more. This **Docsy Example Project** uses the Docsy | ||
theme component as a hugo module and provides a skeleton documentation structure for you to use. | ||
You can clone/copy this project and edit it with your own content, or use it as an example. | ||
|
||
In this project, the Docsy theme component is pulled in as a Hugo module, together with other module dependencies: | ||
|
||
```bash | ||
$ hugo mod graph | ||
hugo: collected modules in 566 ms | ||
hugo: collected modules in 578 ms | ||
github.com/google/docsy-example github.com/google/docsy@v0.5.1-0.20221017155306-99eacb09ffb0 | ||
github.com/google/docsy-example github.com/google/docsy/dependencies@v0.5.1-0.20221014161617-be5da07ecff1 | ||
github.com/google/docsy/dependencies@v0.5.1-0.20221014161617-be5da07ecff1 github.com/twbs/bootstrap@v4.6.2+incompatible | ||
github.com/google/docsy/dependencies@v0.5.1-0.20221014161617-be5da07ecff1 github.com/FortAwesome/Font-Awesome@v0.0.0-20220831210243-d3a7818c253f | ||
``` | ||
|
||
You can find detailed theme instructions in the [Docsy user guide][]. | ||
|
||
This Docsy Example Project is hosted on [Netlify][] at [example.docsy.dev][]. | ||
You can view deploy logs from the [deploy section of the project's Netlify | ||
dashboard][deploys], or this [alternate dashboard][]. | ||
|
||
This is not an officially supported Google product. This project is currently maintained. | ||
|
||
## Using the Docsy Example Project as a template | ||
|
||
A simple way to get started is to use this project as a template, which gives you a site project that is set up and ready to use. To do this: | ||
|
||
1. Click **Use this template**. | ||
|
||
2. Select a name for your new project and click **Create repository from template**. | ||
|
||
3. Make your own local working copy of your new repo using git clone, replacing https://github.com/me/example.git with your repo’s web URL: | ||
|
||
```bash | ||
git clone --depth 1 https://github.com/me/example.git | ||
``` | ||
|
||
You can now edit your own versions of the site’s source files. | ||
|
||
If you want to do SCSS edits and want to publish these, you need to install `PostCSS` | ||
|
||
```bash | ||
npm install | ||
``` | ||
|
||
## Running the website locally | ||
|
||
Building and running the site locally requires a recent `extended` version of [Hugo](https://gohugo.io). | ||
You can find out more about how to install Hugo for your environment in our | ||
[Getting started](https://www.docsy.dev/docs/getting-started/#prerequisites-and-installation) guide. | ||
|
||
Once you've made your working copy of the site repo, from the repo root folder, run: | ||
|
||
``` | ||
hugo server | ||
``` | ||
|
||
## Running a container locally | ||
|
||
You can run docsy-example inside a [Docker](https://docs.docker.com/) | ||
container, the container runs with a volume bound to the `docsy-example` | ||
folder. This approach doesn't require you to install any dependencies other | ||
than [Docker Desktop](https://www.docker.com/products/docker-desktop) on | ||
Windows and Mac, and [Docker Compose](https://docs.docker.com/compose/install/) | ||
on Linux. | ||
|
||
1. Build the docker image | ||
|
||
```bash | ||
docker-compose build | ||
``` | ||
|
||
1. Run the built image | ||
|
||
```bash | ||
docker-compose up | ||
``` | ||
|
||
> NOTE: You can run both commands at once with `docker-compose up --build`. | ||
1. Verify that the service is working. | ||
|
||
Open your web browser and type `http://localhost:1313` in your navigation bar, | ||
This opens a local instance of the docsy-example homepage. You can now make | ||
changes to the docsy example and those changes will immediately show up in your | ||
browser after you save. | ||
|
||
### Cleanup | ||
|
||
To stop Docker Compose, on your terminal window, press **Ctrl + C**. | ||
|
||
To remove the produced images run: | ||
|
||
```console | ||
docker-compose rm | ||
``` | ||
For more information see the [Docker Compose | ||
documentation](https://docs.docker.com/compose/gettingstarted/). | ||
|
||
## Troubleshooting | ||
|
||
As you run the website locally, you may run into the following error: | ||
|
||
``` | ||
➜ hugo server | ||
INFO 2021/01/21 21:07:55 Using config file: | ||
Building sites … INFO 2021/01/21 21:07:55 syncing static files to / | ||
Built in 288 ms | ||
Error: Error building site: TOCSS: failed to transform "scss/main.scss" (text/x-scss): resource "scss/scss/main.scss_9fadf33d895a46083cdd64396b57ef68" not found in file cache | ||
``` | ||
|
||
This error occurs if you have not installed the extended version of Hugo. | ||
See this [section](https://www.docsy.dev/docs/get-started/docsy-as-module/installation-prerequisites/#install-hugo) of the user guide for instructions on how to install Hugo. | ||
|
||
Or you may encounter the following error: | ||
|
||
``` | ||
➜ hugo server | ||
Error: failed to download modules: binary with name "go" not found | ||
``` | ||
|
||
This error occurs if you have not installed the `go` programming language on your system. | ||
See this [section](https://www.docsy.dev/docs/get-started/docsy-as-module/installation-prerequisites/#install-go-language) of the user guide for instructions on how to install `go`. | ||
|
||
|
||
[alternate dashboard]: https://app.netlify.com/sites/goldydocs/deploys | ||
[deploys]: https://app.netlify.com/sites/docsy-example/deploys | ||
[Docsy user guide]: https://docsy.dev/docs | ||
[Docsy]: https://github.com/google/docsy | ||
[example.docsy.dev]: https://example.docsy.dev | ||
[Hugo theme module]: https://gohugo.io/hugo-modules/use-modules/#use-a-module-for-a-theme | ||
[Netlify]: https://netlify.com |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* | ||
Add styles or override variables from the theme here. | ||
*/ | ||
|
||
$primary: #ADB4C0; | ||
$secondary: #13294B; | ||
|
||
$google_font_name: "IBM Plex Sans"; | ||
$google_font_family: "IBM+Plex+Sans:ital,wght@0,400;0,700;1,400;1,700&family=IBM+Plex+Mono:ital,wght@0,400;0,700;1,400;1,700&family=IBM+Plex+Serif"; |
Oops, something went wrong.