Skip to content

Commit

Permalink
Merge pull request #428 from junior/docs_update
Browse files Browse the repository at this point in the history
Docs update
  • Loading branch information
junior authored Apr 2, 2024
2 parents 830a127 + 5984d76 commit 97c79ca
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 21 deletions.
45 changes: 31 additions & 14 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,50 @@ name: Publish Docs

on:
push:
branches:
branches:
- master
- docs_update
paths:
- 'src/docs/**'
workflow_dispatch:
jobs:
build-and-deploy:
build:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.122.0
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: '14'
node-version: ''
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.82.0'
extended: true
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: Setup Pages
id: pages
uses: actions/configure-pages@v5
- name: Build Hugo Docs
run: |
cd src/docs
make build
- name: Publish to Github Pages
uses: peaceiris/actions-gh-pages@v3
- name: Upload production artifact
uses: actions/upload-pages-artifact@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: src/docs/public
path: ./src/docs/public

deploy:
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
15 changes: 8 additions & 7 deletions .github/workflows/test-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,19 @@ on:
jobs:
test-build:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.122.0
steps:
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: '10.x'
node-version: ''
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.66.0'
extended: true
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: Build Hugo Docs
run: |
cd src/docs
Expand Down
8 changes: 8 additions & 0 deletions src/docs/content/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ Content with aspect ratio of `2-1`
> Display content as cards - usually in a grid

{{% grid col="1-2" y="top" %}}

```markdown
{{%/* grid col="1-2" */%}}
{{%/* card style="primary" title="Primary" hover=true */%}}
Expand Down Expand Up @@ -225,6 +226,7 @@ Card body
> Add a grid of inner contents using [grid](https://getuikit.com/docs/grid) and [flex](https://getuikit.com/docs/flex)

{{% grid col="1-2" y="top" %}}

```markdown
{{%/* grid col="1-3" */%}}
- **Example**
Expand All @@ -235,6 +237,7 @@ Card body

{{% wrapper %}}
{{% grid col="1-3" %}}

- **Example**
- Item one
- Item two
Expand Down Expand Up @@ -342,6 +345,7 @@ Slideshow items must be `<li>` type. Refer to [usage](https://getuikit.com/docs/
> Create a tabbed content switcher

{{% grid col="1-2" y="top" %}}

```markdown
{{</* switcher left=true tabs="One|Two|Three" */>}}
- Tab one content
Expand All @@ -355,10 +359,13 @@ Slideshow items must be `<li>` type. Refer to [usage](https://getuikit.com/docs/

{{% wrapper %}}
{{< switcher left=true tabs="One|Two|Three" >}}

- Tab one content

```ts
const foo: string = 'bar';
```

- Tab two content
- Tab three content
{{< /switcher >}}
Expand Down Expand Up @@ -409,6 +416,7 @@ Slideshow items must be `<li>` type. Refer to [usage](https://getuikit.com/docs/
> Wraps inner content with any `div` and specified classes. Useful for specifying markup with other UIkit features

{{% grid col="1-2" y="top" %}}

```markdown
{{%/* wrapper "uk-light uk-background-primary uk-panel uk-padding" */%}}
Light Panel
Expand Down

0 comments on commit 97c79ca

Please sign in to comment.