Comments (3)
@benkrikler - Hi, definitely a PR is welcome. I think initially it has been written to always open in a new tab. But a choice between internal and external links make sense.
Check the code here for reference - https://github.com/hasura/gatsby-gitbook-starter/blob/master/src/components/mdxComponents/anchor.js#L6. Feel free to open a PR :)
from gatsby-gitbook-starter.
Here is the exact code to turn off the default Open in New Tab behavior:
in src/components/mdxComponents/anchor.js
import * as React from 'react';
const AnchorTag = ({ children: link, ...props }) => {
if (link) {
return (
<a href={props.href} target="_self" rel="noopener noreferrer">
{link}
</a>
);
} else {
return null;
}
};
export default AnchorTag;
from gatsby-gitbook-starter.
I needed relative links for my project so I've submitted a pull request for your consideration. Happy to address any feedback you may have.
from gatsby-gitbook-starter.
Related Issues (20)
- How to sort sidebar markdown pages in different order? HOT 4
- Update packages HOT 1
- Adding a possibility for customization HOT 1
- All the MD files are preloaded on site load HOT 1
- Is there a way to set the tree in the left side bar to "expand all" on first view? HOT 2
- How to a make alterations in the heading style. HOT 2
- How to display multiple documents independently? HOT 2
- Potential Error in appendString in mdxComponents/index.js
- Table Of Contents - not catching all h tags HOT 1
- Last file in folder under content gets Runtime Error HOT 7
- Why do we need both styled-components and emotion
- Error: MDB_BAD_RSLOT: Invalid reuse of reader locktable slot ?
- issue) broken docker file `routines::unsupported` error
- KaTeX support HOT 1
- How to remove the display /index in the address bar?
- `gatsby develop` script won't start my dev server - GraphQL error HOT 5
- node: --openssl-legacy-provider is not allowed in NODE_OPTIONS HOT 3
- CVEs found
- Migrating to Markdown 5 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gatsby-gitbook-starter.