Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reference to other Embedded github content does not always work #24

Closed
Baasie opened this issue Aug 13, 2020 · 2 comments
Closed

Reference to other Embedded github content does not always work #24

Baasie opened this issue Aug 13, 2020 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@Baasie
Copy link
Collaborator

Baasie commented Aug 13, 2020

At the moment we embed github repo's through the gatsby-source-git pluging in the gatsby-config.js like:

      resolve: `gatsby-source-git`,
      options: {
        name: `github-repo-ddd-crew-starter-modelling`,
        remote: `https://github.com/ddd-crew/ddd-starter-modelling-process.git`,
      },
    },```

Then on the `gatsyb-node.js` file we created pages for all markdown files in the repo except license and licence:
We link the new MD file to the `./src/templates/github-repo-layout.tsx` that will display those MD files from github.

From here we use the `markdown-link.tsx` component so that we can change the links that are used in the github markdown files.

The problem is, these links are usually relative to the github repo, like /example. This does not work with gatsby because it will create a link to virtualddd.com/example. The behaviour we need is to have the virtualddd.com/{currentpath}/example.

It now works for the current situation, but it needs to be extended for more examples in the future so all links possible will work.
@Baasie Baasie added the bug Something isn't working label Mar 2, 2021
@yellowbrickc yellowbrickc self-assigned this Mar 24, 2021
@yellowbrickc
Copy link
Contributor

I assume, this issue is partly fixed with #47

@yellowbrickc
Copy link
Contributor

The relative links work now, the static images, pdfs, mir backup files too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants