Skip to content

Commit

Permalink
Fix lingering plus signs (#3341)
Browse files Browse the repository at this point in the history
- fix lingering plus signs from the docs move
- fix formatting issues discovered when looking through plus signs
- refactor content check to a bunch of scripts that can be run
  • Loading branch information
mooreds authored Oct 30, 2024
1 parent fa0e0c7 commit f45219a
Show file tree
Hide file tree
Showing 22 changed files with 98 additions and 89 deletions.
68 changes: 9 additions & 59 deletions .github/workflows/contentcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
name: content_check
on:
pull_request:
# run once a day
schedule:
- cron: '13 19 * * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
Expand All @@ -18,79 +14,33 @@ jobs:
- uses: actions/checkout@v4
- name: Check for blog posts that have incorrect categories
run: |
find astro/src/content/blog/ -type f -name "*.md*" |grep -v swp | xargs grep '^categories:'|sed 's/.*categories: //'|sed 's/, /\n/g'|sort -u > out
RES=`diff out config/contentcheck/known-blog-categories.txt`
exit $RES
exit `src/scripts/check-for-incorrect-categories.sh`
shell: bash
- name: Grep for absolute URLs referencing FusionAuth.io
continue-on-error: true
# we ignore 'open your browser and navigate to https://fusionauth.io/docs' because it is part of command output
# we ignore 'homepage "https://fusionauth.io"' because it is part of the homebrew formula
# we ignore "<a href='https://fusionauth.io/docs/v1/tech/tutorials/'>Learn how this app works.</a>" because it is part of a react tutorial
# we use continue-on-error because grep -v exits with code 1 if it doesn't find anything, but that's what we want.
- name: No absolute URLs referencing FusionAuth.io
run: |
find astro/src/content/ -type f -name "*.md*" | xargs grep 'https://fusionauth.io' | grep -v 'homepage "https://fusion' | grep -v 'open your browser and navigate to https://fusionauth.io/docs' |grep -v "<a href='https://fusionauth.io/docs/'>Learn how this app works.</a>" > absolute.out
shell: bash
- name: Check for absolute URLs referencing FusionAuth.io from file. Keep this next to 'Grep for absolute URLs referencing FusionAuth.io'
run: |
cat absolute.out
exit `cat absolute.out | wc -l | sed 's/[ ]*//g'`
shell: bash
- name: Check for old asciidoc styling syntax
run: |
exit `find astro/src/content/docs/ -type f | xargs grep ']#'| wc -l |sed 's/[ ]*//g'`
shell: bash
- name: Check for old asciidoc code import
run: |
exit `find astro/src/content/docs/ -type f | xargs grep '++++'| wc -l |sed 's/[ ]*//g'`
shell: bash
- name: Check for old doc nav url references
run: |
exit `find astro/src/content/ -type f | xargs grep 'docs/v1/tech'| wc -l |sed 's/[ ]*//g'`
exit `src/scripts/check-for-absolute-urls.sh`
shell: bash
- name: Check for erroneous markdown references
run: |
exit `find astro/src/content/ -type f -name "*.md*" | xargs grep ']()'| wc -l |sed 's/[ ]*//g'`
exit `src/scripts/check-for-incorrect-markdown-references.sh`
shell: bash
- name: Make sure all docs have a full sentence in their description.
run: |
exit `find astro/src/content/docs/ -type f -print|grep -v '/_' |xargs grep '^description: '|grep -v '\.$'|wc -l |sed 's/[ ]*//g'`
shell: bash
- name: Make sure docs don't use old asciidoc icon references
run: |
exit `find astro/src/content/docs/ -type f -print|xargs grep -l 'icon:[a-z]'| wc -l |sed 's/[ ]*//g'`
exit `src/scripts/check-for-full-sentences-in-docs-descriptions.sh`
shell: bash
- name: check for APIFields with no name
run: |
echo `grep -R \<APIField astro/src/content/docs | grep -v name`
exit `find astro/src/content/docs/ -type f -print|xargs grep \<APIField | grep -v name | wc -l | sed 's/[ ]*//g'`
exit `src/scripts/check-for-api-fields-no-name.sh`
shell: bash
- name: check for the word 'edition' which we don't use any more, excluding files it is okay to have 'edition' in
run: |
echo `grep -Ri edition astro/src/content | grep -v 'IDEA'|grep -v 'Scouting'|grep -v '0-reactor-ed'|grep -v 'Gluu Server Community Edition'|grep -v 'TR/webauthn-2/'|grep -v 'API-Security/editions'|grep -v fusionauth-colorado-company-to-watch|grep -v 'edition.cnn.com'|grep -v 'hey are also called editions'|grep -v 'also known as an edition'`
exit `find astro/src/content -type f -print|xargs grep -i edition | grep -v 'IDEA'|grep -v 'Scouting'|grep -v '0-reactor-ed'|grep -v 'Gluu Server Community Edition'|grep -v 'TR/webauthn-2/'|grep -v 'API-Security/editions'|grep -v fusionauth-colorado-company-to-watch|grep -v 'edition.cnn.com'|grep -v 'hey are also called editions'|grep -v 'also known as an edition' | wc -l | sed 's/[ ]*//g'`
exit `src/scripts/check-for-use-of-word-edition.sh`
shell: bash
- name: check for the proper casing of word 'plan' which should always be lowercase when prefixed by Community, Starter, Enterprise or Essentials
run: |
# uncomment to troubleshoot or run locally. If this is uncommented and finds nothing (which is expected state) then it errors out and the GH workflow fails.
#find astro/src/content -type f|xargs egrep '(Enterprise|Community|Starter|Essentials) Plan' |grep -v '^##'
exit `find astro/src/content -type f|xargs egrep '(Enterprise|Community|Starter|Essentials) Plan'|grep -v '^##'|wc -l | sed 's/[ ]*//g'`
shell: bash
- name: check for the proper casing of plans, such as Community, Starter, Enterprise or Essentials
run: |
# uncomment to troubleshoot or run locally. If this is uncommented and finds nothing (which is expected state) then it errors out and the GH workflow fails.
#find astro/src/content -type f|xargs egrep '(enterprise|community|starter|essentials) plan'|grep -v '^##'
exit `find astro/src/content -type f|xargs egrep '(enterprise|community|starter|essentials) plan'|grep -v '^##' |wc -l | sed 's/[ ]*//g'`
shell: bash
- name: check for old style asciidoc URLs
run: |
echo `grep -R 'https://[^[]*\[' astro/src/content/docs |grep -v '(' | grep -v '[200]'`
exit `find astro/src/content/docs/ -type f -print|xargs grep 'https://[^[]*\[' astro/src/content/docs |grep -v '(' |grep -v '[200]' | wc -l | sed 's/[ ]*//g'`
# ignore the '[200]' because that is a valid case that grep picks up incorrectly
exit `src/scripts/check-for-use-proper-casing-of-plan.sh`
shell: bash
- name: check unsorted vale keywords. error to fix because this decreases merge conflicts
run: |
# first line shows output of unsorted item, second just an exit code. this needs to be LC_ALL=C because otherwise you run into issues between how macos sorts it and how linux/GH actions sorts it
echo `LC_ALL=C sort -cu config/vale/styles/config/vocabularies/FusionAuth/accept.txt`
exit `LC_ALL=C sort -Cu config/vale/styles/config/vocabularies/FusionAuth/accept.txt`
exit `src/scripts/check-vale-vocab-sorted.sh`
shell: bash
1 change: 1 addition & 0 deletions DocsDevREADME.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Here are some guidelines to follow when writing documentation (everything under
- Headers should have the first letter of every word capitalized: `This Is The Header Text`. This is true for all headers (h1, h2, h3, h4). This is also known as [Start Case](https://en.wikipedia.org/wiki/Letter_case).
- When writing, you have access to Asides. Here's an [example blog post using an Aside](https://github.com/FusionAuth/fusionauth-site/blob/main/astro/src/content/blog/log4j-fusionauth.mdx). You can assign the following values to the type: `tip` for tips. `note` for things for the user to be aware of. `important` for things the user should pay attention to. `warn` for dangerous actions like deleting a tenant.
- For links, don't use the absolute URL for the FusionAuth website (https://fusionauth.io), only relative URLs. This allows us to deploy to our local and staging environments and not get sent over to prod.
- If you have a list element containing more than one paragraph, indent the second paragraph by the same amount as the start of the text in the first paragraph to make sure that it renders correctly.

## Docs
- Don't use complex breadcrumbs styling in docs. Use `->`. Use the [Breadcrumb](astro/src/components/Breadcrumb.astro) component. Breadcrumbs should look like this `<Breadcrumb>foo -> bar -> baz</Breadcrumb>`.
Expand Down
4 changes: 2 additions & 2 deletions astro/src/content/docs/apis/_jwt_algorithm.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
The algorithm used to sign the JSON Web Token (JWT). The following available JSON Web Algorithms (JWA) as described in [RFC 7518](https://tools.ietf.org/html/rfc7518) are available.
+

* `ES256` - ECDSA using P-256 curve and SHA-256 <span class="text-green-600">Available since 1.4.0</span>
* `ES384` - ECDSA using P-384 curve and SHA-384 <span class="text-green-600">Available since 1.4.0</span>
* `ES512` - ECDSA using P-521 curve and SHA-512 <span class="text-green-600">Available since 1.4.0</span>
Expand All @@ -8,4 +8,4 @@ The algorithm used to sign the JSON Web Token (JWT). The following available JSO
* `HS512` - HMAC using SHA-512
* `RS256` - RSASSA-PKCS1-v1_5 using SHA-256
* `RS384` - RSASSA-PKCS1-v1_5 using SHA-384
* `RS512` - RSASSA-PKCS1-v1_5 using SHA-512
* `RS512` - RSASSA-PKCS1-v1_5 using SHA-512
4 changes: 2 additions & 2 deletions astro/src/content/docs/apis/_webauthn-transports.mdx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FusionAuth treats the list of transports as strings to maximize authenticator compatibility. These values are used as hints during WebAuthn ceremonies and missing, extra, or unexpected values should not cause a ceremony to fail. Some common values are:
+

* `internal` - the authenticator is integrated with the client device
* `usb` - the authenticator can be contacted over USB
* `nfc` - the authenticator can be contacted over Near Field Communication (NFC)
* `ble` - the authenticator can be contacted over Bluetooth Smart (Bluetooth Low Energy, or BLE)
* `cable` - "cloud-assisted" BLE. This transport is used for Android devices acting as an authenticator connected to the computer over Bluetooth
* `hybrid` - replacement for the `cable` transport
* `hybrid` - replacement for the `cable` transport
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
A map of incoming claims to User fields, User data or Registration data. The key of the map is the incoming claim name from the
configured identity provider. The following are allowed values:
+

* `birthDate`
* `firstName`
* `lastName`
Expand All @@ -10,4 +10,4 @@ configured identity provider. The following are allowed values:
* `imageUrl`
* `timezone`
* `UserData`
* `RegistrationData`
* `RegistrationData`
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Available since 1.26.0

## Set Up a Twilio Messenger

Here you can add a Twilio messenger to send SMS messages. +
Here you can add a Twilio messenger to send SMS messages.

To create a new Twilio messenger, navigate to <strong>Settings -> Messengers</strong>. Click `Add Twilio Messenger` from the dropdown in the upper right.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ The SAML configuration allows you to reveal FusionAuth as a SAML v2 Identity Pro
When enabled, all unsigned requests will be rejected.
</APIField>
<APIField name="Default verification key" optional since="1.20.0">
The verification key used to verify a signature when the SAML v2 Service Provider is using HTTP Redirect Bindings. +
The verification key used to verify a signature when the SAML v2 Service Provider is using HTTP Redirect Bindings.

When HTTP POST Bindings are used, this is the default verification key used if a `KeyInfo` element is not found in the SAML AuthNRequest. If a `KeyInfo` element is found, Key Master will be used to resolve the key and this configuration will not be used to verify the request signature.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import ScimServerPermissions from 'src/content/docs/_shared/_scim-server-permiss

## Overview

There are many use cases where it is helpful to model entities in addition to users. Examples might include devices, cars, computers, customers, companies, etc. +
There are many use cases where it is helpful to model entities in addition to users. Examples might include devices, cars, computers, customers, or companies.

_Enter Entities._ Entities allow you to model everything right from FusionAuth! Entities allow you to model relationships and enable machine-to-machine authentication using the Client Credentials grant.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ gcloud container clusters create fusionauth-cluster \
* `cluster-version` - The Kubernetes version to use. [optional]
* `cluster-ipv4-cidr` - Used to create the subnet's secondary IP address range for Pods. [optional]
* `service-ip-range` - Used to create the subnet's secondary IP address range for Services. [optional]
+
For more information on the [create](https://cloud.google.com/sdk/gcloud/reference/container/clusters/create) command, see [gcloud container clusters create](https://cloud.google.com/sdk/gcloud/reference/container/clusters/create) documentation.
### Update Kubernetes Configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress
If you are unsure of the best mapping in this step, the Event Log will provide valuable guidance indicating how FusionAuth and Azure are connecting.
</Aside>

This claim can be found in the event log of a SAML auth handshake. In the case of a default Azure AD application, the email claim is nested under +
This claim can be found in the event log of a SAML auth handshake. In the case of a default Azure AD application, the email claim is nested.

```
<AttributeStatement>
{/* ... */}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,7 @@ If you want a user to return to a specific redirect URL after SAML authenticatio
- Simply add something like `https://hooli.com` to the <InlineField>Default RelayState</InlineField> in your Okta configuration.
2. Add to the ACS
- You can append your redirect to the <InlineField>Single sign-on URL</InlineField> (ACS)
- Example: +
`https://example.com/acs/22cea679-83af-422a-806a-baae792b3ab9/85a03867-dccf-4882-adde-1a79aeec50df?redirect_uri=http%3A%2F%2Fhooli.com`
- Example: `https://example.com/acs/22cea679-83af-422a-806a-baae792b3ab9/85a03867-dccf-4882-adde-1a79aeec50df?redirect_uri=http%3A%2F%2Fhooli.com`

<img src="/img/docs/lifecycle/authenticate-users/identity-providers/enterprise/saml-acs-and-relay-state.png" alt="Showing Setting the Relay and ACS values" width="1200" role="bottom-cropped" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Below, we will show you how to make this editable `birthDate` field show up on t
### Update Your Theme and Template (Admin Facing)

<Aside type="note">
For more information on themes please reference the documentation found [here](/docs/customize/look-and-feel/). +
For more information on themes please reference the documentation found [here](/docs/customize/look-and-feel/).
For more information on custom forms please reference documentation found [here](/feature/user-registration)
</Aside>

Expand Down
Loading

0 comments on commit f45219a

Please sign in to comment.