Skip to content

Commit

Permalink
Merge branch 'master' into doc-1045-new
Browse files Browse the repository at this point in the history
  • Loading branch information
yuliiiah committed Apr 15, 2024
2 parents ddf2682 + 74d1751 commit ec1b523
Show file tree
Hide file tree
Showing 191 changed files with 430,397 additions and 86,386 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/aloglia_crawler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ on:
workflow_run:
workflows: ["Release to Production"]
types: [completed]
workflow_dispatch:

jobs:
docsearch:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}
steps:
- name: Checkout repo
uses: actions/checkout@v4
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ palette-docs.pdf

docs/api-content/api-docs/v1/*.mdx
docs/api-content/api-docs/v1/sidebar.*
docs/api-content/api-docs/edge-v1/*.mdx
docs/api-content/api-docs/edge-v1/sidebar.*

# Versions Content
versions.json
Expand Down
6 changes: 6 additions & 0 deletions .gitleaksignore
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,9 @@ fd60bdc4fdfe8b66925db07865cb530eab4978df:docs/docs-content/integrations/kubernet
511e735952ff4babb08c522a7febdd856740c3f9:docs/docs-content/vertex/system-management/reverse-proxy.md:private-key:141
511e735952ff4babb08c522a7febdd856740c3f9:docs/docs-content/vertex/system-management/reverse-proxy.md:private-key:167
511e735952ff4babb08c522a7febdd856740c3f9:docs/docs-content/vertex/system-management/reverse-proxy.md:private-key:239
9e62b4b635976b0ab93d4dddcf29d33365664091:docs/docs-content/integrations/kubernetes.md:generic-api-key:391
9e62b4b635976b0ab93d4dddcf29d33365664091:docs/docs-content/integrations/kubernetes.md:generic-api-key:759
9e62b4b635976b0ab93d4dddcf29d33365664091:docs/docs-content/integrations/kubernetes.md:generic-api-key:1125
e4040084011d4d7935a589959b96ebc5cfba7a94:docs/docs-content/integrations/kubernetes.md:generic-api-key:759
e4040084011d4d7935a589959b96ebc5cfba7a94:docs/docs-content/integrations/kubernetes.md:generic-api-key:1125
e4040084011d4d7935a589959b96ebc5cfba7a94:docs/docs-content/integrations/kubernetes.md:generic-api-key:391
47 changes: 39 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ clean-versions: ## Clean Docusarus content versions
rm -rf api_versions.json versions.json versioned_docs versioned_sidebars api_versioned_sidebars api_versioned_docs
git checkout -- docusaurus.config.js static/robots.txt

clean-api: ## Clean API docs
@echo "cleaning api docs"
npm run clean-api-docs
# Remove the sidebar file as it's not removed by the clean-api command
rm -f docs/api-content/api-docs/v1/sidebar.ts && rm -f docs/api-content/api-docs/edge-v1/sidebar.ts

clean-visuals:
@echo "Cleaning visual regression tests"

Expand Down Expand Up @@ -150,18 +156,43 @@ pdf-local: ## Generate PDF from local docs

###@ URL Checks

verify-url-links: ## Check for broken URLs in production
verify-url-links:
@echo "Checking for broken external URLs in markdown files..."
rm link_report.csv || echo "No report exists. Proceeding to scan step"
npx linkinator https://docs.spectrocloud.com/ --recurse --timeout 60000 --retry --retry-errors-count 3 --skip "^http(?!.*spectrocloud\\.com).*$"" --skip "^https:\/\/docs\.spectrocloud\.com\/.*\/supplemental\-packs$"" --format csv > temp_report.csv && sleep 2
grep -E '^[^,]*,[[:space:]]*([4-9][0-9]{2}|[0-9]{4,}),' temp_report.csv > link_report.csv && rm temp_report.csv

@npx linkinator "docs/**/*.md" --markdown --recurse --timeout 60000 --retry --retry-errors-jitter --retry-errors-count 3 \
--skip "^https:\/\/docs\.spectrocloud\.com.*$$" \
--skip "^https:\/\/docs\.spectrocloud\.com\/.*\/supplemental\-packs$$" \
--skip "^http:\/\/docs\.spectrocloud\.com.*$$" \
--skip "^https:\/\/software-private\.spectrocloud\.com.*$$" \
--skip "^\/.*\.md$$" \
--skip "!\[.*\]\(.*\)$$" \
--skip "\.(jpg|jpeg|png|gif|webp)$$" \
--skip "https:\/\/linux\.die\.net\/man\/.*$$" \
--skip "https:\/\/mysql\.com\/.*\.*$$" \
--skip "https:\/\/dev\.mysql\.com\/doc/\.*$$" \
--format csv > temp_report.csv && sleep 2
@grep -E 'https?://' temp_report.csv > filtered_report.csv
@grep -E ',[[:space:]]*([4-9][0-9]{2}|[0-9]{4,}),' filtered_report.csv > link_report.csv && rm temp_report.csv filtered_report.csv

verify-url-links-ci: ## Check for broken URLs in production in a GitHub Actions CI environment
@echo "Checking for broken external URLs in CI environment..."
rm link_report.json || echo "No report exists. Proceeding to scan step"
npx linkinator https://docs.spectrocloud.com/ --recurse --timeout 60000 --retry --retry-errors-count 3 --skip '^http(?!.*software-private.spectrocloud\\.com).*$'' --skip '^http(?!.*spectrocloud\\.com).*$'' --format json > temp_report.json
jq 'del(.links[] | select(.status <= 200))' temp_report.json > link_report.json
rm temp_report.json
mv link_report.json scripts/
@npx linkinator "docs/**/*.md" --markdown --recurse --timeout 60000 --retry --retry-errors-count 3 \
--skip "^https:\/\/docs\.spectrocloud\.com.*$$" \
--skip "^https:\/\/docs\.spectrocloud\.com\/.*\/supplemental\-packs$$" \
--skip "^http:\/\/docs\.spectrocloud\.com.*$$" \
--skip "^https:\/\/software-private\.spectrocloud\.com.*$$" \
--skip "^\/.*\.md$$" \
--skip "!\[.*\]\(.*\)$$" \
--skip "\.(jpg|jpeg|png|gif|webp)$$" \
--skip "https:\/\/linux\.die\.net\/man\/.*$$" \
--skip "https:\/\/mysql\.com\/.*\.*$$" \
--skip "https:\/\/dev\.mysql\.com\/doc/\.*$$" \
--format json > temp_report.json
@# Use jq to filter out links that do not start with http or https and keep only broken links
@jq '[.links[] | select(.url | test("^https?://")) | select(.status >= 400)]' temp_report.json > filtered_report.json
@rm temp_report.json
@mv filtered_report.json scripts/link_report.json

###@ Image Formatting

Expand Down
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,30 @@ To add a video, use the following syntax. Ensure you capitalize the letter "V":
<Video title="vsphere-pcg-creation" src="/cluster-creation-videos/vmware.mp4"></Video>
```
### Badges
The following badges are available for use:
> [!NOTE]
>
> All badges are globally available. No need to import them.
- Technical Preview Badge ![Technical Preview Badge](static/img/tech-preview-light.svg)
![Technical Preview Badge](static/img/tech-preview-dark.svg)
#### Technical Preview Badge
The technical preview badge is used to indicate that a feature is in technical preview. The badge is intended for
release notes in the context of a list. The following is an example of how to use the technical preview badge. The
component will automatically display the badge in the correct color based on the light theme (dark/light).
```markdown
- <TpBadge /> Cluster Profile variables, a new feature that allows you to define variables in a cluster profile. This
feature is in Tech Preview and is available only for Edge clusters. Profile variables allow you to define variable
types, apply validation, and more. Refer to the Cluster Profile Variables documentation to learn more about profile
variables.
```
### Simple Card Grid
This is a custom component that creates a grid of simple text cards with two columns, styled according to our color
Expand Down Expand Up @@ -744,3 +768,7 @@ make clean-versions
>
> The `docusaurus.config.js` file is updated by the [`update_docusaurus_config.js`](./docusaurus.config.js) script. DO
> NOT commit this file with the updated changes.
```
```
12 changes: 12 additions & 0 deletions apisidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ if (fs.existsSync(sidebarFilePath)) {
sidebarItems = require(sidebarFilePath);
}

let emcSidebarItems = [];
const sidebarEmcFilePath = "./docs/api-content/api-docs/edge-v1/sidebar.ts";
if (fs.existsSync(sidebarEmcFilePath)) {
emcSidebarItems = require(sidebarEmcFilePath);
}

module.exports = {
apiSidebar: [
{ type: "doc", id: "introduction", label: "Introduction" },
Expand All @@ -21,5 +27,11 @@ module.exports = {
link: { type: "generated-index", title: "Palette API V1" },
items: sidebarItems,
},
{
type: "category",
label: "Edge Host API V1",
link: { type: "generated-index", title: "Edge Host API V1" },
items: emcSidebarItems,
},
],
};
1 change: 1 addition & 0 deletions archiveVersions.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"v4.1.x": "https://version-4-1.legacy.docs.spectrocloud.com",
"v4.0.x": "https://version-4-0.legacy.docs.spectrocloud.com",
"v3.4.x and prior": "https://version-3-4.legacy.docs.spectrocloud.com"
}
Loading

0 comments on commit ec1b523

Please sign in to comment.