Skip to content

Commit

Permalink
Update shared, fix hugo links
Browse files Browse the repository at this point in the history
  • Loading branch information
thequailman committed Jan 29, 2024
1 parent ef97176 commit 2a69b7b
Show file tree
Hide file tree
Showing 13 changed files with 45 additions and 24 deletions.
1 change: 0 additions & 1 deletion .bin

This file was deleted.

1 change: 0 additions & 1 deletion .cache

This file was deleted.

12 changes: 5 additions & 7 deletions .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ jobs:
- name: Lint Go
if: steps.setup.outputs.change_go == 'true' || github.ref_name == 'main'
run: ./m lint-go
- name: Lint Hugo
if: steps.setup.outputs.change_hugo == 'true' || github.ref_name == 'main'
run: ./m lint-hugo
- name: Lint Shell
if: steps.setup.outputs.change_shell == 'true' || github.ref_name == 'main'
run: ./m lint-shell
Expand All @@ -71,7 +74,8 @@ jobs:

release_branch:
env:
BUILD_SOURCE: ${{ github.ref_name == 'main' && 'main' || 'pr' }}
BUILD_SOURCE: main
if: github.ref_name == 'main'
name: Release - Branch
needs:
- lint
Expand All @@ -89,26 +93,20 @@ jobs:
vault_address: ${{ github.ref_name == 'main' && secrets.VAULT_ADDR || '' }}
vault_role: ${{ github.ref_name == 'main' && 'yaml8n' || '' }}
- name: Create tag
if: github.ref_name == 'main'
run: |
./m tag
- name: Create release
if: github.ref_name == 'main'
run: |
./m tag-github-release
./m release
- name: Build hugo
if: github.ref_name == 'main'
run: ./m build-hugo
- name: Setup Pages
if: github.ref_name == 'main'
uses: actions/configure-pages@v3
- name: Upload artifact
if: github.ref_name == 'main'
uses: actions/upload-pages-artifact@v2
with:
path: 'hugo/public'
- name: Deploy to GitHub Pages
if: github.ref_name == 'main'
id: deployment
uses: actions/deploy-pages@v2
8 changes: 8 additions & 0 deletions hugo/content/blog/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
description: YAML8n's blog, containing the latest news and release notes for YAML8n.
linkTitle: Blog
menu: {main}
title: Blog
type: blog
weight: 40
---
15 changes: 15 additions & 0 deletions hugo/content/blog/whats-new-202401.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
author: Mike
date: 2024-01-28
description: Release notes for YAML8n v2024.01.
tags:
- release
title: "What's New in YAML8n: v2024.01"
type: blog
---

{{< yaml8n-release version="2024.01" >}}

## Enhancements

- Updated dependencies to latest versions
2 changes: 1 addition & 1 deletion hugo/content/docs/guides/add-missing-translations.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: Add Missing Translations
weight: 40
---

YAML8n can add missing translations using [Google Cloud Translation API](https://cloud.google.com/translate). Follow these steps after creating your [Translations](../../references/translations) to use [`yaml8n translate`](../../references/cli/#translate-path)
YAML8n can add missing translations using [Google Cloud Translation API](https://cloud.google.com/translate). Follow these steps after creating your [Translations]({{< ref "/docs/references/translations" >}}) to use [`yaml8n translate`]({{< ref "/docs/references/cli#translate-path" >}})

## Create a Google Cloud Project

Expand Down
4 changes: 2 additions & 2 deletions hugo/content/docs/guides/ci-cd.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ YAML8n works really well in a Continuous Integration/Continuous Delivery (CI/CD)

## Check Generated Code

It's recommended to run [`yaml8n generate`](../../references/cli#generate-path) follow by a `git diff` to check if the output code changes. This should fail builds, as they aren't using the latest translations.
It's recommended to run [`yaml8n generate`]({{< ref "/docs/references/cli#generate-path" >}}) follow by a `git diff` to check if the output code changes. This should fail builds, as they aren't using the latest translations.

{{< highlight bash >}}
yaml8n generate translations.yaml
Expand All @@ -19,7 +19,7 @@ git diff --exit-code outputs/yaml8n.ts

## Validate Translations

You can validate the [Translations](../../references/translations) by running [`yaml8n validate`](../../references/cli#validate-path). This command will walk the translations and ensure they have the correct syntax.
You can validate the [Translations]({{< ref "/docs/references/translations" >}}) by running [`yaml8n validate`]({{< ref "/docs/references/cli#validate-path" >}}). This command will walk the translations and ensure they have the correct syntax.

Additionally, you can pass the argument `-w` to fail on warnings like missing translations.

Expand Down
4 changes: 2 additions & 2 deletions hugo/content/docs/guides/create-translations.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ weight: 20

Setup your Translations by creating a YAML file containing the default translation, the list of languages you want to translate, and the output formats for the Translations.

See [Translations](../../references/translations) for details on the format.
See [Translations]({{< ref "/docs/references/translations" >}}) for details on the format.

Here is an example script:

Expand Down Expand Up @@ -43,4 +43,4 @@ translations:
Start by copying strings from your existing codebase into this file when converting an existing codebase to use YAML8n. Give the translations meaningful, specific names like WebModalPayment. If you start sharing translations, add a prefix like Global.
{{% /alert %}}

You don't have to add every language code (in the example above, `de` is missing). YAML8n will warn on missing translations so you can [add them later](../add-missing-translations).
You don't have to add every language code (in the example above, `de` is missing). YAML8n will warn on missing translations so you can [add them later]({{< ref "/docs/guides/add-missing-translations" >}}).
6 changes: 3 additions & 3 deletions hugo/content/docs/guides/generate-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ title: Generate Code
weight: 30
---

You can start generating code once you have [created your translations](../create-translations).
You can start generating code once you have [created your translations]({{< ref "/docs/guides/create-translations" >}}).

## On Demand

Running [`yaml8n generate`](../../references/cli/#generate-path) will generate code for all of the [`outputs`](../../references/translations/#outputs) listed in your [Translations](../../references/translations/).
Running [`yaml8n generate`]({{< ref "/docs/references/cli#generate-path" >}}) will generate code for all of the [`outputs`]({{< ref "/docs/references/translations#outputs" >}}) listed in your [Translations]({{< ref "/docs/references/translations" >}}).

## Watch

Instead of generating code on demand, you can have YAML8n watch your [Translations](../../references/translations/) and generate code upon saving them using [`yaml8n watch`](../../references/cli/#watch-path).
Instead of generating code on demand, you can have YAML8n watch your [Translations]({{< ref "/docs/references/translations" >}}) and generate code upon saving them using [`yaml8n watch`]({{< ref "/docs/references/cli#watch-path" >}}).

{{% alert title="Note" %}}
You should absolutely use this while developing! It makes it easy to add translations and rapidly use new variables/functions.
Expand Down
10 changes: 5 additions & 5 deletions hugo/content/docs/references/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Arguments must be entered before commands.

### `-c [code]`

Check/validate a specific [language code](../references/translations#iso639codes).
Check/validate a specific [language code]({{< ref "/docs/references/translations#iso639codes" >}}).

### `-d`

Expand All @@ -29,20 +29,20 @@ Fail on translation warnings, like missing translations.

### `generate [path]`

Generate code for the [outputs](../translations/#outputs) specified within the [Translations](../translations/) located at `path`.
Generate code for the [outputs]({{< ref "/docs/references/translations#outputs" >}}) specified within the [Translations]({{< ref "/docs/references/translations" >}}) located at `path`.

### `translate [path]`

Add missing translations for the [Translations](../translations/) located at `path` using [Google Cloud Translation API](https://cloud.google.com/translate). See [Guides/Add Missing Translations](../../guides/add-missing-translations) for more information.
Add missing translations for the [Translations]({{< ref "/docs/references/translations" >}}) located at `path` using [Google Cloud Translation API](https://cloud.google.com/translate). See [Guides/Add Missing Translations]({{< ref "/docs/guides/add-missing-translations" >}}) for more information.

### `validate [path]`

Lint and validate the [Translations](../translations/) located at `path`.
Lint and validate the [Translations]({{< ref "/docs/references/translations" >}}) located at `path`.

### `version`

Print the current version of YAML8n.

### `watch [path]`

Watch the [Translations](../translations/) located at `path` for changes and generate code for the [outputs](../translations/#outputs) specified within on change.
Watch the [Translations]({{< ref "/docs/references/translations" >}}) located at `path` for changes and generate code for the [outputs]({{< ref "/docs/references/translations#outputs" >}}) specified within on change.
1 change: 1 addition & 0 deletions hugo/layouts/shortcodes/yaml8n-release.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{ printf "> **YAML8n v%s** is now available on [GitHub](https://github.com/candiddev/yaml8n)" (.Get "version") | markdownify }}
2 changes: 1 addition & 1 deletion shared
Submodule shared updated from 6e8e92 to 597e9e
3 changes: 2 additions & 1 deletion shell/yaml8n.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env bash

export APP_NAME=yaml8n
export APP_URL=https://yaml8n.dev
export GITHUB_REPOSITORY_ID=678385646
export INSTALL_ALL="install-go install-golangci-lint install-hugo install-shellcheck install-vault"
export INSTALL_ALL="install-go install-hugo install-shellcheck install-vault"

0 comments on commit 2a69b7b

Please sign in to comment.