From 94f19c3a7c34bc04be4ce2f125a61ff25ae1f033 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 12 Feb 2020 12:55:47 +0100 Subject: [PATCH 1/2] fix docs formatting and push to docs branch --- .drone.star | 22 ++++++++++++++++++++++ Makefile | 2 +- docs/{about.md => _index.md} | 5 +---- docs/building.md | 5 ++--- docs/getting-started.md | 25 +++++++++++++------------ 5 files changed, 39 insertions(+), 20 deletions(-) rename docs/{about.md => _index.md} (59%) diff --git a/.drone.star b/.drone.star index deb7ba112f..30a7cd204e 100644 --- a/.drone.star +++ b/.drone.star @@ -643,6 +643,28 @@ def website(ctx): 'tree hugo/public', ], }, + { + 'name': 'publish', + 'image': 'plugins/gh-pages:1', + 'pull': 'always', + 'settings': { + 'username': { + 'from_secret': 'github_username', + }, + 'password': { + 'from_secret': 'github_token', + }, + 'pages_directory': 'docs/', + 'target_branch': 'docs', + }, + 'when': { + 'ref': { + 'exclude': [ + 'refs/pull/**', + ], + }, + }, + }, { 'name': 'downstream', 'image': 'plugins/downstream', diff --git a/Makefile b/Makefile index b3b444cd05..dfdd590b68 100644 --- a/Makefile +++ b/Makefile @@ -140,7 +140,7 @@ docs-copy: git remote add origin https://github.com/owncloud/owncloud.github.io; \ git fetch; \ git checkout origin/source -f; \ - rsync -aX ../docs/ content/extensions/ocis-accounts + rsync --delete -aX ../docs/ content/extensions/ocis-accounts .PHONY: docs-build docs-build: diff --git a/docs/about.md b/docs/_index.md similarity index 59% rename from docs/about.md rename to docs/_index.md index 2f6241567b..da3aa5fe49 100644 --- a/docs/about.md +++ b/docs/_index.md @@ -1,8 +1,5 @@ --- -title: "About" -date: 2020-02-07T00:00:00+00:00 -anchor: "about" -weight: 10 +title: ocis-accounts --- This service provides an inter-operable accounts service that operates on the filesystem by default. diff --git a/docs/building.md b/docs/building.md index 0cf2186527..bbce525a1c 100644 --- a/docs/building.md +++ b/docs/building.md @@ -1,8 +1,7 @@ --- title: "Building" date: 2018-05-02T00:00:00+00:00 -anchor: "building" -weight: 30 +weight: 20 --- As this project is built with Go, so you need to install that first. The installation of Go is out of the scope of this document, please follow the official documentation for [Go](https://golang.org/doc/install), to build this project you have to install Go >= v1.13. After the installation of the required tools you need to get the sources: @@ -14,7 +13,7 @@ cd ocis-accounts All required tool besides Go itself and make are bundled or getting automatically installed within the `GOPATH`. All commands to build this project are part of our `Makefile`. -### Backend +## Backend {{< highlight txt >}} make generate diff --git a/docs/getting-started.md b/docs/getting-started.md index 795519fe32..466842639b 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -1,31 +1,32 @@ --- title: "Getting Started" date: 2018-05-02T00:00:00+00:00 -anchor: "getting-started" -weight: 20 +weight: 10 --- -### Installation +{{< toc >}} + +## Installation So far we are offering two different variants for the installation. You can choose between [Docker](https://www.docker.com/) or pre-built binaries which are stored on our download mirrors and GitHub releases. Maybe we will also provide system packages for the major distributions later if we see the need for it. -#### Docker +### Docker TBD -#### Binaries +### Binaries TBD -### Configuration +## Configuration We provide overall three different variants of configuration. The variant based on environment variables and commandline flags are split up into global values and command-specific values. -#### Envrionment variables +### Envrionment variables If you prefer to configure the service with environment variables you can see the available variables below. -##### Server +#### Server OCIS_ACCOUNTS_MANAGER : Enable sending traces, defaults to `filesystem` @@ -42,19 +43,19 @@ OCIS_ACCOUNTS_NAMESPACE OCIS_ACCOUNTS_ADDRESS : Endpoint for the grpc service endpoint. -#### Commandline flags +### Commandline flags If you prefer to configure the service with commandline flags you can see the available variables below. -#### Configuration file +### Configuration file So far we support the file formats `JSON` and `YAML`, if you want to get a full example configuration just take a look at [our repository](https://github.com/owncloud/ocis-accounts/tree/master/pkg/config), there you can always see the latest configuration format. These example configurations include all available options and the default values. The configuration file will be automatically loaded if it's placed at `/etc/ocis/accounts.yml`, `${HOME}/.ocis/accounts.yml` or `$(pwd)/config/accounts.yml`. -### Usage +## Usage The program provides a few sub-commands on execution. The available configuration methods have already been mentioned above. Generally you can always see a formated help output if you execute the binary via `ocis-accounts --help`. -#### Server +### Server The server command is used to start the grpc server. For further help please execute: From 42a5ba79b446b9f107c49a1c66a93121d47a3e63 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 12 Feb 2020 13:46:04 +0100 Subject: [PATCH 2/2] ensure hugo content path exists --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index dfdd590b68..cc7e7709db 100644 --- a/Makefile +++ b/Makefile @@ -134,13 +134,14 @@ release-finish: release-copy release-check .PHONY: docs-copy docs-copy: mkdir -p $(HUGO); \ + mkdir -p $(HUGO)/content/extensions; \ cd $(HUGO); \ git init; \ git remote rm origin; \ git remote add origin https://github.com/owncloud/owncloud.github.io; \ git fetch; \ git checkout origin/source -f; \ - rsync --delete -aX ../docs/ content/extensions/ocis-accounts + rsync --delete -aX ../docs/ content/extensions/$(NAME) .PHONY: docs-build docs-build: