Skip to content

Commit 9f19976

Browse files
committed
fix: Uses rehype-external-links to open external links in a new tab.
1 parent 350d8e6 commit 9f19976

File tree

4 files changed

+40
-2
lines changed

4 files changed

+40
-2
lines changed

astro.config.mjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
// @ts-check
22
import { defineConfig } from 'astro/config';
33
import starlight from '@astrojs/starlight';
4+
import rehypeExternalLinks from 'rehype-external-links';
45

56
// https://astro.build/config
67
export default defineConfig({
78
site: 'https://JaneliaSciComp.github.io',
89
base: '/fileglancer-user-docs',
10+
markdown: {
11+
rehypePlugins: [
12+
[rehypeExternalLinks, { target: '_blank', rel: ['noopener', 'noreferrer'] }]
13+
]
14+
},
915
integrations: [
1016
starlight({
1117
title: 'Fileglancer User Guide',

package-lock.json

Lines changed: 31 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"dependencies": {
1313
"@astrojs/starlight": "^0.36.0",
1414
"astro": "^5.6.1",
15+
"rehype-external-links": "^3.0.0",
1516
"sharp": "^0.34.2"
1617
}
17-
}
18+
}

src/content/docs/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,4 @@ If you encounter issues or need assistance, chat with us in the [#fileglancer-su
6464

6565
## Interested in using Fileglancer outside of Janelia?
6666

67-
We welcome interest from other institutions and are excited to collaborate on making Fileglancer more broadly accessible! While the application was initially developed for use at Janelia, were eager to help adapt it for different environments. If youd like to use Fileglancer at your organization, or have ideas for improvements, we encourage you to [open an issue](https://github.com/JaneliaSciComp/fileglancer/issues) or [submit a pull request](https://github.com/JaneliaSciComp/fileglancer/pulls). Your feedback and contributions are greatly appreciated and will help to make Fileglancer even better for the scientific community!
67+
We welcome interest from other institutions and are excited to collaborate on making Fileglancer more broadly accessible! While the application was initially developed for use at Janelia, we're eager to help adapt it for different environments. If you'd like to use Fileglancer at your organization, or have ideas for improvements, we encourage you to [open an issue](https://github.com/JaneliaSciComp/fileglancer/issues) or [submit a pull request](https://github.com/JaneliaSciComp/fileglancer/pulls). Your feedback and contributions are greatly appreciated and will help to make Fileglancer even better for the scientific community!

0 commit comments

Comments
 (0)