feat(docs): add resources admonition with external links (#36761)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Evan Rusackas
2026-01-07 11:11:53 -08:00
committed by GitHub
parent dfdf8e75d8
commit f9be2b816a
18 changed files with 310 additions and 14 deletions

View File

@@ -0,0 +1,63 @@
/**
* 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.
*/
import React from 'react';
import DefaultAdmonitionTypes from '@theme-original/Admonition/Types';
function ResourcesIcon() {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
width="16"
height="16"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
>
{/* Bookmark/link icon */}
<path d="M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z" />
</svg>
);
}
function ResourcesAdmonition(props) {
return (
<div className="admonition admonition-resources alert alert--resources">
<div className="admonition-heading">
<h5>
<span className="admonition-icon">
<ResourcesIcon />
</span>
{props.title || 'Additional Resources'}
</h5>
</div>
<div className="admonition-content">{props.children}</div>
</div>
);
}
const AdmonitionTypes = {
...DefaultAdmonitionTypes,
resources: ResourcesAdmonition,
};
export default AdmonitionTypes;