-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'HDDS-9225-website-v2' into HDDS-10449-simplify-contribu…
…ting-guide * HDDS-9225-website-v2: HDDS-9567. Add GitHub Actions license header check for relevant files. (#86) HDDS-10506. Reduce directory iterations in sidebar check (#85) HDDS-9866. Add GitHub Actions checks for consistent Docusaurus formatting. (#84)
- Loading branch information
Showing
25 changed files
with
491 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "https://ozone.apache.org/category.schema.json", | ||
"title": "Category", | ||
"description": "Validates an allowed subset of keys in Docusaurus _category_.yml files.", | ||
"type": "object", | ||
"properties": { | ||
"label": { | ||
"description": "The name of this section shown in the docs sidebar.", | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"label" | ||
], | ||
"additionalProperties": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "https://ozone.apache.org/frontmatter.schema.json", | ||
"title": "Frontmatter", | ||
"description": "Validates an allowed subset of Docusaurus docs frontmatter.", | ||
"type": [ "object", "null" ], | ||
"properties": { | ||
"sidebar_label": { | ||
"type": "string" | ||
}, | ||
"slug": { | ||
"description": "Only use slug to specify the base URL for documentation.", | ||
"type": "string", | ||
"enum": [ "/" ] | ||
}, | ||
"draft": { | ||
"description": "Makes pages for incomplete features only visible in development mode.", | ||
"type": "boolean" | ||
} | ||
}, | ||
"additionalProperties": false | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/usr/bin/env sh | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
|
||
# Validates docusaurus _category_.yml files used to configure the docs sidebar. | ||
# Each docs subdirectory should have a _category_.yml file, and it must follow the defined schema. | ||
# The schema is more restrictive than what Docusaurus allows, and can be used to disallow keys or require all category | ||
# files to define the same keys. | ||
|
||
rc=0 | ||
|
||
root="$(git rev-parse --show-toplevel)" | ||
schema="$root"/.github/resource/category.schema.json | ||
|
||
# Make sure all docs directories have a category sidebar file. | ||
for child in $(find "$root"/docs/* -type d); do | ||
category_file="$child/_category_.yml" | ||
if [ ! -f "$category_file" ]; then | ||
echo "_category_.yml is required for docs subdirectory $child" 1>&2 | ||
rc=1 | ||
fi | ||
done | ||
|
||
[ "$rc" = 0 ] || exit $rc | ||
|
||
# If all category files are present, make sure they follow the schema. | ||
if ! pnpm ajv validate -s "$schema" -d "$root/docs/**/_category_.yml" 1>/dev/null; then | ||
rc=1 | ||
echo "Sidebar configuration validation failed against JSON schema $schema" 1>&2 | ||
fi | ||
|
||
exit "$rc" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
|
||
header: | ||
license: | ||
spdx-id: Apache-2.0 | ||
copyright-owner: Apache Software Foundation | ||
|
||
# See https://www.apache.org/legal/src-headers.html#faq-exceptions | ||
# Files already in .gitignore are ignored by default. | ||
paths-ignore: | ||
- LICENSE.txt | ||
# Json does not support comments. | ||
- "**/*.json" | ||
# Docs content does not require headers. | ||
# See examples on https://github.com/apache/www-site and the skywalking-eyes recommended configuration for | ||
# Apache projects at https://github.com/apache/skywalking-eyes?tab=readme-ov-file#github-actions | ||
- "**/*.md" | ||
- "**/_category_.yml" | ||
- pnpm-lock.yaml | ||
|
||
# Do not comment on pull requests. | ||
comment: never | ||
|
||
dependency: | ||
files: | ||
- package.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,22 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
module.exports = { | ||
presets: [require.resolve('@docusaurus/core/lib/babel/preset')], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -78,7 +78,6 @@ words: | |
- gpg | ||
- sed | ||
- mds | ||
- frontmatter | ||
- javadoc | ||
# Misc words | ||
- acking | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.