diff --git a/README.md b/README.md index e587674..a486a5f 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ For example, DocVersionRedirector can automatically redirect: https://docs.pytho | Project | Site | | ----------- | -------------------------------- | +| Airflow | airflow.apache.org/docs | | Bazel | docs.bazel.build | | Django | docs.djangoproject.com | | Java SE | docs.oracle.com/en | @@ -48,3 +49,4 @@ The extension is built with [WXT](https://github.com/wxt-dev/wxt) which will aut ## Adding sites If you'd like to add a site, see the definitions in [`site_data.ts`](https://github.com/leos/DocVersionRedirector/blob/master/src/utils/site_data.ts) and feel free to submit a PR. Make sure to add a glob to `host_permissions` in `wxt.config.ts`. + diff --git a/src/utils/site_data.ts b/src/utils/site_data.ts index 1a7dd86..e7371bf 100644 --- a/src/utils/site_data.ts +++ b/src/utils/site_data.ts @@ -40,8 +40,8 @@ export const siteDefinitions: SiteDefinition[] = [ }, { id: 104, - host: 'docs.djangoproject.com', name: 'Django', + host: 'docs.djangoproject.com', regexFilter: '/en/([^/]*)/', substitutionTemplate: '/en/${version}/', options: { @@ -51,8 +51,8 @@ export const siteDefinitions: SiteDefinition[] = [ }, { id: 105, - host: 'docs.oracle.com', name: 'Java SE', + host: 'docs.oracle.com', regexFilter: '/en/java/javase/([^/]*)/', substitutionTemplate: '/en/java/javase/${version}/', options: { @@ -61,8 +61,8 @@ export const siteDefinitions: SiteDefinition[] = [ }, { id: 106, - host: 'docs.bazel.build', name: 'Bazel', + host: 'docs.bazel.build', regexFilter: '/versions/([^/]*)/', substitutionTemplate: '/versions/${version}/', options: { @@ -115,6 +115,70 @@ export const siteDefinitions: SiteDefinition[] = [ '0.17.1', ] } + }, + { + id: 107, + name: 'Airflow', + host: 'airflow.apache.org', + regexFilter: '/docs/apache-airflow/([^/]*)/', + substitutionTemplate: '/docs/apache-airflow/${version}/', + options: { + versions: [ + '2.8.1', + '2.8.0', + '2.7.3', + '2.7.2', + '2.7.1', + '2.7.0', + '2.6.3', + '2.6.2', + '2.6.1', + '2.6.0', + '2.5.3', + '2.5.2', + '2.5.1', + '2.5.0', + '2.4.3', + '2.4.2', + '2.4.1', + '2.4.0', + '2.3.4', + '2.3.3', + '2.3.2', + '2.3.1', + '2.3.0', + '2.2.5', + '2.2.4', + '2.2.3', + '2.2.2', + '2.2.1', + '2.2.0', + '2.1.4', + '2.1.3', + '2.1.2', + '2.1.1', + '2.1.0', + '2.0.3', + '2.0.2', + '2.0.1', + '2.0.0', + '1.10.15', + '1.10.14', + '1.10.13', + '1.10.12', + '1.10.11', + '1.10.10', + '1.10.9', + '1.10.8', + '1.10.7', + '1.10.6', + '1.10.5', + '1.10.4', + '1.10.3', + '1.10.2', + '1.10.1', + ] + } } ] diff --git a/wxt.config.ts b/wxt.config.ts index ec87728..a6f985d 100644 --- a/wxt.config.ts +++ b/wxt.config.ts @@ -5,6 +5,7 @@ import react from '@vitejs/plugin-react' export default defineConfig({ manifest: { host_permissions: [ + "*://airflow.apache.org/docs/*", "*://dev.mysql.com/doc/refman/*", "*://docs.bazel.build/*", "*://docs.djangoproject.com/*",