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

@@ -16,6 +16,11 @@ Superset's public **REST API** follows the
documented here. The docs below are generated using
[Swagger React UI](https://www.npmjs.com/package/swagger-ui-react).
:::resources
- [Blog: The Superset REST API](https://preset.io/blog/2020-10-01-superset-api/)
- [Blog: Accessing APIs with Superset](https://preset.io/blog/accessing-apis-with-superset/)
:::
<Alert
type="info"
message={

View File

@@ -398,3 +398,8 @@ the user can add the metadata required for scheduling the query.
This information can then be retrieved from the endpoint `/api/v1/saved_query/` and used to
schedule the queries that have `schedule_info` in their JSON metadata. For schedulers other than
Airflow, additional fields can be easily added to the configuration file above.
:::resources
- [Tutorial: Automated Alerts and Reporting via Slack/Email in Superset](https://dev.to/ngtduc693/apache-superset-topic-5-automated-alerts-and-reporting-via-slackemail-in-superset-2gbe)
- [Blog: Integrating Slack alerts and Apache Superset for better data observability](https://medium.com/affinityanswers-tech/integrating-slack-alerts-and-apache-superset-for-better-data-observability-fd2f9a12c350)
:::

View File

@@ -102,3 +102,7 @@ You can run flower using:
```bash
celery --app=superset.tasks.celery_app:app flower
```
:::resources
- [Blog: How to Set Up Global Async Queries (GAQ) in Apache Superset](https://medium.com/@ngigilevis/how-to-set-up-global-async-queries-gaq-in-apache-superset-a-complete-guide-9d2f4a047559)
:::

View File

@@ -152,3 +152,8 @@ Then on configuration:
```
WEBDRIVER_AUTH_FUNC = auth_driver
```
:::resources
- [Blog: The Data Engineer's Guide to Lightning-Fast Superset Dashboards](https://preset.io/blog/the-data-engineers-guide-to-lightning-fast-apache-superset-dashboards/)
- [Blog: Accelerating Dashboards with Materialized Views](https://preset.io/blog/accelerating-apache-superset-dashboards-with-materialized-views/)
:::

View File

@@ -442,3 +442,7 @@ FEATURE_FLAGS = {
```
A current list of feature flags can be found in [RESOURCES/FEATURE_FLAGS.md](https://github.com/apache/superset/blob/master/RESOURCES/FEATURE_FLAGS.md).
:::resources
- [Blog: Feature Flags in Apache Superset](https://preset.io/blog/feature-flags-in-apache-superset-and-preset/)
:::

View File

@@ -99,8 +99,9 @@ exists, please file an issue on the
[Superset GitHub repo](https://github.com/apache/superset/issues), so we can work on documenting and
supporting it.
If you'd like to build a database connector for Superset integration,
read the [following tutorial](https://preset.io/blog/building-database-connector/).
:::resources
- [Tutorial: Building a Database Connector for Superset](https://preset.io/blog/building-database-connector/)
:::
### Installing Drivers in Docker Images
@@ -219,6 +220,10 @@ Here's what the connection string looks like:
doris://<User>:<Password>@<Host>:<Port>/<Catalog>.<Database>
```
:::resources
- [Apache Doris Docs: Superset Integration](https://doris.apache.org/docs/ecosystem/bi/apache-superset/)
:::
#### AWS Athena
##### PyAthenaJDBC
@@ -360,6 +365,13 @@ uses the default user without a password (and doesn't encrypt the connection):
clickhousedb://localhost/default
```
:::resources
- [ClickHouse Docs: Superset Integration](https://clickhouse.com/docs/integrations/superset)
- [Altinity: Connect ClickHouse to Superset](https://docs.altinity.com/integrations/clickhouse-and-superset/connect-clickhouse-to-superset/)
- [Instaclustr: Connecting to ClickHouse from Superset](https://www.instaclustr.com/support/documentation/clickhouse/using-a-clickhouse-cluster/connecting-to-clickhouse-from-apache-superset/)
- [Blog: ClickHouse and Apache Superset](https://preset.io/blog/2021-5-26-clickhouse-superset/)
:::
#### Cloudflare D1
To use Cloudflare D1 with superset, install the [superset-engine-d1](https://github.com/sqlalchemy-cf-d1/superset-engine-d1) library.
@@ -432,6 +444,11 @@ Docker Compose.
echo "sqlalchemy-cratedb" >> ./docker/requirements-local.txt
```
:::resources
- [CrateDB Docs: Apache Superset Integration](https://cratedb.com/docs/guide/integrate/apache-superset/index.html)
- [Blog: Visualizing Time-Series Data with CrateDB and Superset](https://preset.io/blog/timeseries-cratedb-superset/)
:::
[CrateDB Cloud]: https://cratedb.com/product/cloud
[CrateDB Self-Managed]: https://cratedb.com/product/self-managed
[sqlalchemy-cratedb]: https://pypi.org/project/sqlalchemy-cratedb/
@@ -564,8 +581,10 @@ The expected connection string for Arrow Flight (Dremio 4.9.1+. Default port is
dremio+flight://{username}:{password}@{host}:{port}/dremio
```
This [blog post by Dremio](https://www.dremio.com/tutorials/dremio-apache-superset/) has some
additional helpful instructions on connecting Superset to Dremio.
:::resources
- [Dremio Docs: Superset Integration](https://docs.dremio.com/current/client-applications/superset/)
- [Blog: Connecting Dremio to Apache Superset](https://www.dremio.com/tutorials/dremio-apache-superset/)
:::
#### Apache Drill
@@ -608,6 +627,10 @@ We recommend reading the
the [GitHub README](https://github.com/JohnOmernik/sqlalchemy-drill#usage-with-odbc) to learn how to
work with Drill through ODBC.
:::resources
- [Tutorial: Query MongoDB in Superset with Apache Drill](https://medium.com/@thoren.lederer/query-data-from-mongodb-in-apache-superset-with-the-help-of-apache-drill-full-tutorial-b34c33eac6c1)
:::
import useBaseUrl from "@docusaurus/useBaseUrl";
#### Apache Druid
@@ -674,6 +697,10 @@ much like you would create an aggregation manually, but specify `postagg` as a `
then have to provide a valid json post-aggregation definition (as specified in the Druid docs) in
the JSON field.
:::resources
- [Blog: Real-Time Business Insights with Apache Druid and Superset](https://www.deep.bi/blog/real-time-business-insights-with-apache-druid-and-apache-superset)
:::
#### Elasticsearch
The recommended connector library for Elasticsearch is
@@ -744,6 +771,10 @@ To disable SSL verification, add the following to the **SQLALCHEMY URI** field:
elasticsearch+https://{user}:{password}@{host}:9200/?verify_certs=False
```
:::resources
- [Blog: Superset Announces Elasticsearch Support](https://preset.io/blog/2019-12-16-elasticsearch-in-superset/)
:::
#### Exasol
The recommended connector library for Exasol is
@@ -792,6 +823,10 @@ or
firebolt://{client_id}:{client_secret}@{database}/{engine_name}?account_name={name}
```
:::resources
- [Firebolt Docs: Connecting to Apache Superset](https://docs.firebolt.io/guides/integrations/connecting-to-apache-superset)
:::
#### Google BigQuery
The recommended connector library for BigQuery is
@@ -878,15 +913,21 @@ To be able to upload CSV or Excel files to BigQuery in Superset, you'll need to
Currently, the Google BigQuery Python SDK is not compatible with `gevent`, due to some dynamic monkeypatching on python core library by `gevent`.
So, when you deploy Superset with `gunicorn` server, you have to use worker type except `gevent`.
:::resources
- [Tutorial: Build A StackOverflow Dashboard — Connecting Superset to BigQuery](https://preset.io/blog/2020-08-04-google-bigquery/)
:::
#### Google Sheets
Google Sheets has a very limited
[SQL API](https://developers.google.com/chart/interactive/docs/querylanguage). The recommended
connector library for Google Sheets is [shillelagh](https://github.com/betodealmeida/shillelagh).
There are a few steps involved in connecting Superset to Google Sheets. This
[tutorial](https://preset.io/blog/2020-06-01-connect-superset-google-sheets/) has the most up to date
instructions on setting up this connection.
There are a few steps involved in connecting Superset to Google Sheets.
:::resources
- [Tutorial: Connect Superset to Google Sheets](https://preset.io/blog/2020-06-01-connect-superset-google-sheets/)
:::
#### Hana
@@ -908,6 +949,10 @@ The expected connection string is formatted as follows:
hive://hive@{hostname}:{port}/{database}
```
:::resources
- [Cloudera: Connect Apache Hive to Superset](https://docs-archive.cloudera.com/HDPDocuments/HDP3/HDP-3.0.0/integrating-hive/content/hive_connect_hive_to_apache_superset.html)
:::
#### Hologres
Hologres is a real-time interactive analytics service developed by Alibaba Cloud. It is fully compatible with PostgreSQL 11 and integrates seamlessly with the big data ecosystem.
@@ -1059,6 +1104,10 @@ The connection string is formatted as follows:
oracle://<username>:<password>@<hostname>:<port>
```
:::resources
- [Oracle Developers: Steps to use Apache Superset and Oracle Database](https://medium.com/oracledevs/steps-to-use-apache-superset-and-oracle-database-ae0858b4f134)
:::
#### Parseable
[Parseable](https://www.parseable.io) is a distributed log analytics database that provides SQL-like query interface for log data. The recommended connector library is [sqlalchemy-parseable](https://github.com/parseablehq/sqlalchemy-parseable).
@@ -1077,7 +1126,10 @@ parseable://admin:admin@demo.parseable.com:443/ingress-nginx
Note: The stream_name in the URI represents the Parseable logstream you want to query. You can use both HTTP (port 80) and HTTPS (port 443) connections.
>>>>>>>
:::resources
- [Blog: Parseable with Apache Superset](https://www.parseable.com/blog/parseable-with-apache-superset)
:::
#### Apache Pinot
The recommended connector library for Apache Pinot is [pinotdb](https://pypi.org/project/pinotdb/).
@@ -1101,6 +1153,11 @@ Add below argument while creating database connection in Advanced -> Other -> EN
{"connect_args":{"use_multistage_engine":"true"}}
```
:::resources
- [Apache Pinot Docs: Superset Integration](https://docs.pinot.apache.org/integrations/superset)
- [StarTree: Data Visualization with Apache Superset and Pinot](https://startree.ai/resources/data-visualization-with-apache-superset-and-pinot)
:::
#### Postgres
Note that, if you're using docker compose, the Postgres connector library [psycopg2](https://www.psycopg.org/docs/)
@@ -1137,6 +1194,28 @@ More information about PostgreSQL connection options can be found in the
and the
[PostgreSQL docs](https://www.postgresql.org/docs/9.1/libpq-connect.html#LIBPQ-PQCONNECTDBPARAMS).
:::resources
- [Blog: Data Visualization in PostgreSQL With Apache Superset](https://www.tigerdata.com/blog/data-visualization-in-postgresql-with-apache-superset)
:::
#### QuestDB
[QuestDB](https://questdb.io/) is a high-performance, open-source time-series database with SQL support.
The recommended connector library is the PostgreSQL driver [psycopg2](https://www.psycopg.org/docs/),
as QuestDB supports the PostgreSQL wire protocol.
The connection string is formatted as follows:
```
postgresql+psycopg2://{username}:{password}@{hostname}:{port}/{database}
```
The default port for QuestDB's PostgreSQL interface is `8812`.
:::resources
- [QuestDB Docs: Apache Superset Integration](https://questdb.com/docs/third-party-tools/superset/)
:::
#### Presto
The [pyhive](https://pypi.org/project/PyHive/) library is the recommended way to connect to Presto through SQLAlchemy.
@@ -1179,6 +1258,10 @@ SSL Secure extra add json config to extra connection information.
}
```
:::resources
- [Tutorial: Presto SQL + S3 Data + Superset Data Lake](https://hackernoon.com/presto-sql-s3-data-superset-data-lake)
:::
#### RisingWave
The recommended connector library for RisingWave is
@@ -1252,6 +1335,10 @@ If your private key is stored on server, you can replace "privatekey_body" with
}
```
:::resources
- [Snowflake Builders Blog: Building Real-Time Operational Dashboards with Apache Superset and Snowflake](https://medium.com/snowflake/building-real-time-operational-dashboards-with-apache-superset-and-snowflake-23f625e07d7c)
:::
#### Apache Solr
The [sqlalchemy-solr](https://pypi.org/project/sqlalchemy-solr/) library provides a
@@ -1273,6 +1360,10 @@ The expected connection string is formatted as follows:
hive://hive@{hostname}:{port}/{database}
```
:::resources
- [Tutorial: How to Connect Apache Superset with Apache SparkSQL](https://medium.com/free-or-open-source-software/how-to-connect-apache-superset-with-apache-sparksql-50efe48ac0e4)
:::
#### Arc
There are two ways to connect Superset to Arc:
@@ -1356,8 +1447,8 @@ Here's what the connection string looks like:
starrocks://<User>:<Password>@<Host>:<Port>/<Catalog>.<Database>
```
:::note
StarRocks maintains their Superset docuementation [here](https://docs.starrocks.io/docs/integrations/BI_integrations/Superset/).
:::resources
- [StarRocks Docs: Superset Integration](https://docs.starrocks.io/docs/integrations/BI_integrations/Superset/)
:::
#### TDengine
@@ -1441,6 +1532,11 @@ postgresql://{username}:{password}@{host}:{port}/{database name}?sslmode=require
[Learn more about TimescaleDB!](https://docs.timescale.com/)
:::resources
- [Timescale DevRel: Visualize time series data with TimescaleDB and Apache Superset](https://attilatoth.dev/speaking/timescaledb-superset/)
- [Tutorial: PostgreSQL with TimescaleDB — Visualizing Real-Time Data with Superset](https://www.slingacademy.com/article/postgresql-with-timescaledb-visualizing-real-time-data-with-superset/)
:::
#### Trino
Supported trino version 352 and higher
@@ -1566,9 +1662,11 @@ or factory function (which returns an `Authentication` instance) to `auth_method
All fields in `auth_params` are passed directly to your class/function.
**Reference**:
- [Trino-Superset-Podcast](https://trino.io/episodes/12.html)
:::resources
- [Starburst Docs: Superset Integration](https://docs.starburst.io/clients/superset.html)
- [Podcast: Trino and Superset](https://trino.io/episodes/12.html)
- [Blog: Trino and Apache Superset](https://preset.io/blog/2021-6-22-trino-superset/)
:::
#### Vertica
@@ -1680,6 +1778,10 @@ The connection string looks like:
postgresql://{username}:{password}@{host}:{port}/{database}
```
:::resources
- [Blog: Introduction to YugabyteDB and Apache Superset](https://preset.io/blog/introduction-yugabytedb-apache-superset/)
:::
## Connecting through the UI
Here is the documentation on how to leverage the new DB Connection UI. This will provide admins the ability to enhance the UX for users who want to connect to new databases.

View File

@@ -590,3 +590,7 @@ Loads a string as a `datetime` object. This is useful when performing date opera
do something else
{% endif %}
```
:::resources
- [Blog: Intro to Jinja Templating in Apache Superset](https://preset.io/blog/intro-jinja-templating-apache-superset/)
:::

View File

@@ -395,3 +395,11 @@ For programmatic theme management, Superset provides REST endpoints:
- `POST /api/v1/theme/import/` - Import themes from YAML
These endpoints require appropriate permissions and are subject to RBAC controls.
:::resources
- [Video: Live Demo — Theming Apache Superset](https://www.youtube.com/watch?v=XsZAsO9tC3o)
- [CSS and Theming](https://docs.preset.io/docs/css-and-theming) - Additional theming techniques and CSS customization
- [Blog: Customizing Apache Superset Dashboards with CSS](https://preset.io/blog/customizing-superset-dashboards-with-css/)
- [Blog: Customizing Dashboards with CSS — Tips and Tricks](https://preset.io/blog/customizing-apache-superset-dashboards-with-css-additional-tips-and-tricks/)
- [Blog: Customizing Chart Colors](https://preset.io/blog/customizing-chart-colors-with-superset-and-preset/)
:::

View File

@@ -136,3 +136,7 @@ Security team members should also follow these general expectations:
- Actively participate in assessing, discussing, fixing, and releasing security issues in Superset.
- Avoid discussing security fixes in public forums. Pull request (PR) descriptions should not contain any information about security issues. The corresponding JIRA ticket should contain a link to the PR.
- Security team members who contribute to a fix may be listed as remediation developers in the CVE report, along with their job affiliation (if they choose to include it).
:::resources
- [Blog: Comprehensive Tutorial for Contributing Code to Apache Superset](https://preset.io/blog/tutorial-contributing-code-to-apache-superset/)
:::

View File

@@ -972,7 +972,12 @@ The `test-storybook` job runs automatically in CI on every pull request, ensurin
The topic of authoring new plugins, whether you'd like to contribute
it back or not has been well documented in the
[the documentation](https://superset.apache.org/docs/contributing/creating-viz-plugins), and in [this blog post](https://preset.io/blog/building-custom-viz-plugins-in-superset-v2).
[documentation](https://superset.apache.org/docs/contributing/creating-viz-plugins).
:::resources
- [Blog: Building Custom Viz Plugins in Superset v2](https://preset.io/blog/building-custom-viz-plugins-in-superset-v2)
- [Blog: Enhancing Superset Visualization Plugins](https://preset.io/blog/enhancing-superset-visualization-plugins-part-1/)
:::
To contribute a plugin to Superset, your plugin must meet the following criteria:

View File

@@ -444,3 +444,8 @@ To load the examples, add the following to the `my_values.yaml` file:
init:
loadExamples: true
```
:::resources
- [Tutorial: Mastering Data Visualization — Installing Superset on Kubernetes with Helm Chart](https://mahira-technology.medium.com/mastering-data-visualization-installing-superset-on-kubernetes-cluster-using-helm-chart-e4ec99199e1e)
- [Tutorial: Installing Apache Superset in Kubernetes](https://aws.plainenglish.io/installing-apache-superset-in-kubernetes-1aec192ac495)
:::

View File

@@ -80,3 +80,9 @@ From this point on, you can head on to:
- [Installing on Kubernetes](/docs/installation/kubernetes/)
Or just explore our [Documentation](https://superset.apache.org/docs/intro)!
:::resources
- [Video: Superset in 2 Minutes](https://www.youtube.com/watch?v=AqousXQ7YHw)
- [Video: Superset 101](https://www.youtube.com/watch?v=mAIH3hUoxEE)
- [Tutorial: Creating Your First Dashboard](/docs/using-superset/creating-your-first-dashboard)
:::

View File

@@ -172,3 +172,8 @@ Rotating the `SUPERSET_SECRET_KEY` is a critical security procedure. It is manda
**Procedure for Rotating the Key**
The procedure for safely rotating the SECRET_KEY must be followed precisely to avoid locking yourself out of your instance. The official Apache Superset documentation maintains the correct, up-to-date procedure. Please follow the official guide here:
https://superset.apache.org/docs/configuration/configuring-superset/#rotating-to-a-newer-secret_key
:::resources
- [Blog: Running Apache Superset on the Open Internet](https://preset.io/blog/running-apache-superset-on-the-open-internet-a-report-from-the-fireline/)
- [Blog: How Security Vulnerabilities are Reported & Handled in Apache Superset](https://preset.io/blog/how-security-vulnerabilities-are-reported-and-handled-in-apache-superset/)
:::

View File

@@ -114,6 +114,12 @@ Aggregate functions aren't allowed in calculated columns.
<img src={useBaseUrl("/img/tutorial/tutorial_calculated_column.png" )} />
:::resources
- [Using Metrics and Calculated Columns](https://docs.preset.io/docs/using-metrics-and-calculated-columns) - In-depth guide to the semantic layer
- [Blog: Understanding the Superset Semantic Layer](https://preset.io/blog/understanding-superset-semantic-layer/)
- [Blog: Unlocking the Power of Virtual Datasets](https://preset.io/blog/unlocking-the-power-of-virtual-datasets-in-apache-superset/)
:::
### Creating charts in Explore view
Superset has 2 main interfaces for exploring data:
@@ -227,3 +233,8 @@ The following URL parameters can be used to modify how the dashboard is rendered
For example, when running the local development build, the following will disable the
Top Nav and remove the Filter Bar:
`http://localhost:8088/superset/dashboard/my-dashboard/?standalone=1&show_filters=0`
:::resources
- [Dashboard Customization](https://docs.preset.io/docs/dashboard-customization) - Advanced dashboard styling and layout options
- [Blog: BI Dashboard Best Practices](https://preset.io/blog/bi-dashboard-best-practices/)
:::

View File

@@ -326,3 +326,12 @@ various options in this section, refer to the
Lastly, save your chart as Tutorial Resample and add it to the Tutorial Dashboard. Go to the
tutorial dashboard to see the four charts side by side and compare the different outputs.
:::resources
- [Chart Walkthroughs](https://docs.preset.io/docs/chart-walkthroughs) - Detailed guides for most chart types
- [Blog: Why Apache ECharts is the Future of Apache Superset](https://preset.io/blog/2021-4-1-why-echarts/)
- [Blog: ECharts Time-Series Visualizations in Superset](https://preset.io/blog/echarts-time-series-visualizations-in-superset/)
- [Blog: Finding New Insights with Drill By](https://preset.io/blog/drill-by/)
- [Blog: From Drill Down to Drill By](https://preset.io/blog/drill-down-and-drill-by/)
- [Blog: Cross-Filtering in Apache Superset](https://preset.io/blog/cross-filtering-in-Superset-and-Preset/)
:::

View File

@@ -46,6 +46,10 @@ if (!versionsConfig.components.disabled) {
editUrl:
'https://github.com/apache/superset/edit/master/docs/components',
remarkPlugins: [remarkImportPartial, remarkLocalizeBadges],
admonitions: {
keywords: ['note', 'tip', 'info', 'warning', 'danger', 'resources'],
extendDefaults: true,
},
docItemComponent: '@theme/DocItem',
includeCurrentVersion: versionsConfig.components.includeCurrentVersion,
lastVersion: versionsConfig.components.lastVersion,
@@ -70,6 +74,10 @@ if (!versionsConfig.developer_portal.disabled) {
editUrl:
'https://github.com/apache/superset/edit/master/docs/developer_portal',
remarkPlugins: [remarkImportPartial, remarkLocalizeBadges],
admonitions: {
keywords: ['note', 'tip', 'info', 'warning', 'danger', 'resources'],
extendDefaults: true,
},
docItemComponent: '@theme/DocItem',
includeCurrentVersion: versionsConfig.developer_portal.includeCurrentVersion,
lastVersion: versionsConfig.developer_portal.lastVersion,
@@ -343,6 +351,10 @@ const config: Config = {
return `https://github.com/apache/superset/edit/master/docs/${versionDocsDirPath}/${docPath}`;
},
remarkPlugins: [remarkImportPartial, remarkLocalizeBadges],
admonitions: {
keywords: ['note', 'tip', 'info', 'warning', 'danger', 'resources'],
extendDefaults: true,
},
includeCurrentVersion: versionsConfig.docs.includeCurrentVersion,
lastVersion: versionsConfig.docs.lastVersion, // Make 'next' the default
onlyIncludeVersions: versionsConfig.docs.onlyIncludeVersions,

View File

@@ -134,3 +134,42 @@ ul.dropdown__menu svg {
--ifm-font-base-color: #bbb5ac;
--ifm-border-color: #797063;
}
/* Custom "resources" admonition for additional resources/links */
.alert--resources {
--ifm-alert-background-color: #f8f9fa;
--ifm-alert-border-color: #6c757d;
--ifm-alert-foreground-color: #495057;
background-color: var(--ifm-alert-background-color);
border-left: 5px solid var(--ifm-alert-border-color);
}
.alert--resources .admonition-heading h5 {
color: var(--ifm-alert-foreground-color);
}
.alert--resources .admonition-icon svg {
fill: var(--ifm-alert-foreground-color);
stroke: var(--ifm-alert-foreground-color);
}
/* Resources admonition - dark mode */
[data-theme='dark'] .alert--resources {
--ifm-alert-background-color: #2d3748;
--ifm-alert-border-color: #718096;
--ifm-alert-foreground-color: #e2e8f0;
}
/* Style links within resources admonition */
.alert--resources a {
color: var(--ifm-link-color);
text-decoration: none;
}
.alert--resources a:hover {
text-decoration: underline;
}
[data-theme='dark'] .alert--resources a {
color: var(--ifm-color-primary-light);
}

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;