mirror of
https://github.com/spf13/cobra
synced 2025-04-10 16:57:19 +00:00
Merge 89c1e0df76
into 8cb30f9ca5
This commit is contained in:
commit
24890cbdfc
9 changed files with 147 additions and 2 deletions
.github/workflows
README.mdassets
site
47
.github/workflows/site.yml
vendored
Normal file
47
.github/workflows/site.yml
vendored
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
name: 'site'
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
doc:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Get Hugo and Theme
|
||||||
|
run: |
|
||||||
|
curl -fsSL https://github.com/gohugoio/hugo/releases/download/v0.114.0/hugo_extended_0.114.0_Linux-64bit.tar.gz | sudo tar xzf - -C /usr/local/bin hugo
|
||||||
|
sudo chmod +x /usr/local/bin/hugo
|
||||||
|
mkdir -p site/themes
|
||||||
|
cd site/themes
|
||||||
|
git clone https://github.com/bep/docuapi
|
||||||
|
cd docuapi
|
||||||
|
npm install --only=dev
|
||||||
|
mv node_modules ../..
|
||||||
|
|
||||||
|
- name: Build site
|
||||||
|
run: |
|
||||||
|
cd site
|
||||||
|
hugo version
|
||||||
|
hugo
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: site
|
||||||
|
path: site/public
|
||||||
|
|
||||||
|
- name: Publish site to gh-pages
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
|
run: |
|
||||||
|
cd site/public/
|
||||||
|
touch .nojekyll
|
||||||
|
git init
|
||||||
|
cp ../../.git/config ./.git/config
|
||||||
|
git add .
|
||||||
|
git config --local user.email "push@gha"
|
||||||
|
git config --local user.name "GHA"
|
||||||
|
git commit -a -m "update ${{ github.sha }}"
|
||||||
|
git push -u origin +HEAD:gh-pages
|
|
@ -1,4 +1,4 @@
|
||||||

|

|
||||||
|
|
||||||
Cobra is a library for creating powerful modern CLI applications.
|
Cobra is a library for creating powerful modern CLI applications.
|
||||||
|
|
||||||
|
|
Binary file not shown.
Before ![]() (image error) Size: 72 KiB |
1
site/.gitignore
vendored
Normal file
1
site/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
/public
|
42
site/assets/scss/slate/docuapi_overrides.scss
Normal file
42
site/assets/scss/slate/docuapi_overrides.scss
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
// Copyright 2013-2023 The Cobra Authors
|
||||||
|
//
|
||||||
|
// Licensed 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.
|
||||||
|
|
||||||
|
// BACKGROUND COLORS
|
||||||
|
|
||||||
|
$nav-bg:#254E70 !default;
|
||||||
|
$examples-bg: #002642 !default;
|
||||||
|
|
||||||
|
// FONTS
|
||||||
|
|
||||||
|
@import url("https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700&display=swap");
|
||||||
|
|
||||||
|
$font-default-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
||||||
|
|
||||||
|
// FLEX SIDEBAR
|
||||||
|
|
||||||
|
.toc-wrapper {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
#toc {
|
||||||
|
flex-grow: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toc-wrapper .toc-footer {
|
||||||
|
margin-top: .5em;
|
||||||
|
li {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
45
site/config.toml
Normal file
45
site/config.toml
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
theme = "docuapi"
|
||||||
|
languageCode = "en-us"
|
||||||
|
baseurl = "https://spf13.github.io/cobra/"
|
||||||
|
title = "Cobra"
|
||||||
|
|
||||||
|
disableKinds = ["taxonomyTerm"]
|
||||||
|
|
||||||
|
# Code higlighting settings
|
||||||
|
pygmentsCodefences = true
|
||||||
|
pygmentsCodeFencesGuesSsyntax = false
|
||||||
|
pygmentsOptions = ""
|
||||||
|
pygmentsStyle = "monokai"
|
||||||
|
pygmentsUseClasses = false
|
||||||
|
|
||||||
|
defaultContentLanguage = "en"
|
||||||
|
|
||||||
|
[module]
|
||||||
|
[module.hugoVersion]
|
||||||
|
[[module.imports]]
|
||||||
|
# We need one module import for Hugo to detect us as a Hugo Module.
|
||||||
|
path="github.com/bep/empty-hugo-module"
|
||||||
|
|
||||||
|
[params]
|
||||||
|
search = true
|
||||||
|
|
||||||
|
[markup]
|
||||||
|
[markup.goldmark]
|
||||||
|
[markup.goldmark.parser]
|
||||||
|
autoHeadingIDType = "github-ascii"
|
||||||
|
[markup.goldmark.renderer]
|
||||||
|
unsafe= true
|
||||||
|
|
||||||
|
[languages]
|
||||||
|
[languages.en]
|
||||||
|
languageName = "English"
|
||||||
|
weight = 2
|
||||||
|
title = "Cobra documentation"
|
||||||
|
[languages.en.params]
|
||||||
|
toc_footers = [
|
||||||
|
"[](https://github.com/spf13/cobra)",
|
||||||
|
"Built with [Hugo](https://gohugo.io/) theme [DocuAPI](https://github.com/bep/docuapi) by [bep](https://github.com/bep)"
|
||||||
|
]
|
||||||
|
[languages.en.params.blackfriday]
|
||||||
|
angledQuotes = false
|
||||||
|
hrefTargetBlank = true
|
|
@ -1,4 +1,4 @@
|
||||||
## Projects using Cobra
|
# Projects using Cobra
|
||||||
|
|
||||||
- [Allero](https://github.com/allero-io/allero)
|
- [Allero](https://github.com/allero-io/allero)
|
||||||
- [Arewefastyet](https://benchmark.vitess.io)
|
- [Arewefastyet](https://benchmark.vitess.io)
|
||||||
|
|
10
site/go.mod
Normal file
10
site/go.mod
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
module github.com/bep/docuapi
|
||||||
|
|
||||||
|
go 1.12
|
||||||
|
|
||||||
|
require (
|
||||||
|
github.com/bep/empty-hugo-module v1.0.0 // indirect
|
||||||
|
github.com/jquery/jquery-dist v0.0.0-20190501211928-15bc73803f76 // indirect
|
||||||
|
github.com/olivernn/lunr.js v2.3.8+incompatible // indirect
|
||||||
|
github.com/slatedocs/slate v2.3.1+incompatible // indirect
|
||||||
|
)
|
BIN
site/static/images/logo.png
Normal file
BIN
site/static/images/logo.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 76 KiB |
Loading…
Add table
Reference in a new issue