Skip to content

Commit

Permalink
adding Airflow support
Browse files Browse the repository at this point in the history
  • Loading branch information
leos committed Feb 22, 2024
1 parent 1ce7ccf commit 6bd3421
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 3 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down Expand Up @@ -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`.

70 changes: 67 additions & 3 deletions src/utils/site_data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand All @@ -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: {
Expand All @@ -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: {
Expand Down Expand Up @@ -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',
]
}
}
]

1 change: 1 addition & 0 deletions wxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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/*",
Expand Down

0 comments on commit 6bd3421

Please sign in to comment.