Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions .github/workflows/make_blog_draft_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ jobs:
- name: Generate draft and staging URLs
id: gen-url
run: |
echo "::set-output name=draft-url::https://blogs-draft-openlibertyio.mqj6zf7jocq.us-south.codeengine.appdomain.cloud/blog/$(echo ${{ inputs.publish-date }} | tr - /)/${{ inputs.version }}.html"
echo "::set-output name=staging-url::https://blogs-staging-openlibertyio.mqj6zf7jocq.us-south.codeengine.appdomain.cloud/blog/$(echo ${{ inputs.publish-date }} | tr - /)/${{ inputs.version }}.html"
echo "::set-output name=pr-branch::Draft"
echo "draft-url=https://blogs-draft-openlibertyio.mqj6zf7jocq.us-south.codeengine.appdomain.cloud/blog/$(echo ${{ inputs.publish-date }} | tr - /)/${{ inputs.version }}.html" >> $GITHUB_OUTPUT
echo "staging-url=https://blogs-staging-openlibertyio.mqj6zf7jocq.us-south.codeengine.appdomain.cloud/blog/$(echo ${{ inputs.publish-date }} | tr - /)/${{ inputs.version }}.html" >> $GITHUB_OUTPUT
echo "pr-branch=Draft" >> $GITHUB_OUTPUT

- name: Commit post and create PR to draft branch
id: create-pr
Expand All @@ -83,6 +83,16 @@ jobs:
- name: Update PR to draft branch
if: false
run: gh pr edit ${{ steps.create-pr.outputs.pull-request-number }} --base draft

- name: Install Asciidoctor
run: sudo apt-get install -y asciidoctor

- name: Run Vale on AsciiDoc files
uses: errata-ai/vale-action@v2.1.1
with:
files: posts/${{ inputs.publish-date }}-${{ inputs.version }}.adoc
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Send Slack alert
run: |
Expand Down
10 changes: 10 additions & 0 deletions .vale.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
StylesPath = styles
MinAlertLevel = suggestion

Vocab = WordUsageVocab
Packages = Google

[*.adoc]
BasedOnStyles = WordUsage, Inclusivity, Spelling, Grammar, Google, Vale


7 changes: 7 additions & 0 deletions styles/Cloud-Docs-Markdown/Anchors.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
extends: substitution
message: "use '%s' instead of '%s'"
level: error
ignorecase: false
nonword: true
swap:
- '\{#.*\}|\{ #.*\}|\{:#.*\}': '{: #anchor}'
11 changes: 11 additions & 0 deletions styles/Cloud-Docs-Markdown/Callouts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
extends: substitution
message: "use '%s' instead of '%s'"
level: error
nonword: true
ignorecase: false
scope: raw
swap:
- '\{pre\}|\{:pre\}|\{: \#pre\}': '{: pre}'
- '\{codeblock\}|\{:codeblock\}|\{: \#codeblock\}': '{: codeblock}'
- '\{shortdesc\}|\{:shortdesc\}|\{: \#shortdesc\}': '{: shortdesc}'
- '\{screen\}|\{:screen\}|\{: \#screen\}': '{: screen}'
8 changes: 8 additions & 0 deletions styles/Cloud-Docs-Markdown/HeadingSpaces.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
extends: existence
message: "Malformed heading. Remove extra spaces."
level: error
nonword: true
scope: raw
tokens:
- '^ +#+ +'
- '#+ +'
7 changes: 7 additions & 0 deletions styles/Cloud-Docs-Markdown/RelativeLinks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
extends: existence
message: "Replace %s with a relative link that uses '(/docs'."
level: warning
scope: raw
tokens:
- https://cloud.ibm.com/docs.*
- cloud.ibm.com/docs.*
6 changes: 6 additions & 0 deletions styles/Grammar/Abbreviations.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
extends: existence
message: "Do not use periods in all-uppercase abbreviations such as '%s'."
level: warning
nonword: true
tokens:
- '\b(?:[A-Z]\.){3,5}'
68 changes: 68 additions & 0 deletions styles/Grammar/Acronyms.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
extends: conditional
message: "Spell out '%s', if it's unfamiliar to the audience."
level: suggestion
ignorecase: false
# Ensures that the existence of 'first' implies the existence of 'second'.
first: '\b([A-Z]{3,5})\b'
second: '(?:\b[A-Z][a-z]+ )+\(([A-Z]{3,5})\)'
# ... with the exception of these:
exceptions:
- API
- APIs
- ASP
- CLI
- CPU
- CSS
- CSV
- DEBUG
- DOM
- DPI
- FAQ
- GCC
- GDB
- GET
- GPU
- GTK
- GUI
- HTML
- HTTP
- HTTPS
- IAM
- IBM
- IDE
- JAR
- JSON
- JSX
- LESS
- LLDB
- NET
- NOTE
- NVDA
- OSS
- PATH
- PDF
- PHP
- POST
- RAM
- REPL
- RSA
- SCM
- SCSS
- SDK
- SQL
- SSH
- SSL
- SVG
- TBD
- TCP
- TODO
- URI
- URL
- USB
- UTF
- VM
- VMs
- XML
- XSS
- YAML
- ZIP
145 changes: 145 additions & 0 deletions styles/Grammar/Adverbs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
extends: existence
message: "Consider removing '%s'."
ignorecase: true
level: warning
action:
name: remove
tokens:
- absentmindedly
- adventurously
- anxiously
- arrogantly
- bashfully
- beautifully
- bitterly
- bleakly
- blissfully
- boastfully
- bravely
- briskly
- calmly
- cheerfully
- cleverly
- coaxingly
- coolly
- courageously
- crossly
- cruelly
- daintily
- dearly
- deceivingly
- defiantly
- dreamily
- elegantly
- energetically
- enthusiastically
- excitedly
- faithfully
- famously
- ferociously
- fervently
- fiercely
- fondly
- foolishly
- frantically
- frenetically
- frightfully
- furiously
- gleefully
- gracefully
- gratefully
- greedily
- happily
- hastily
- helplessly
- hopelessly
- hungrily
- innocently
- inquisitively
- irritably
- jaggedly
- jealously
- jovially
- joyfully
- joyously
- jubilantly
- judgmentally
- keenly
- kiddingly
- kindheartedly
- knavishly
- lazily
- limply
- loftily
- longingly
- lovingly
- loyally
- madly
- majestically
- merrily
- miserably
- mockingly
- mortally
- mysteriously
- nervously
- obediently
- obnoxiously
- overconfidently
- painfully
- playfully
- politely
- quaintly
- queasily
- queerly
- quirkily
- quizzically
- reassuringly
- recklessly
- reproachfully
- righteously
- rigidly
- rudely
- scarily
- sedately
- selfishly
- shakily
- sheepishly
- shrilly
- shyly
- sleepily
- solemnly
- stealthily
- sternly
- suspiciously
- sweetly
- sympathetically
- tenderly
- terribly
- thankfully
- triumphantly
- unabashedly
- unaccountably
- unbearably
- unimpressively
- vacantly
- vainly
- valiantly
- viciously
- victoriously
- violently
- vivaciously
- warmly
- weakly
- wearily
- wetly
- wildly
- willfully
- woefully
- wonderfully
- worriedly
- yawningly
- yearningly
- youthfully
- zealously
- zestfully
- zestily
10 changes: 10 additions & 0 deletions styles/Grammar/Auto.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
extends: existence
message: "In general, don't hyphenate '%s'."
ignorecase: true
level: error
action:
name: convert
params:
- simple
tokens:
- 'auto-\w+'
Loading
Loading