question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Markdown links are not being prefixed

See original GitHub issue

Links in my markdown files are not being prefixed when running gatsby build --prefix-paths. I am on gatsby@v1.9.142.

Any ideas about why this might be the case?

Here is my gatsby-config.js:

module.exports = {
  pathPrefix: config.pathPrefix,
  siteMetadata: {
    siteUrl: config.siteUrl + pathPrefix,
    rssMetadata: {
      site_url: config.siteUrl + pathPrefix,
      feed_url: config.siteUrl + pathPrefix + config.siteRss,
      title: config.siteTitle,
      description: config.siteDescription,
      image_url: `${config.siteUrl + pathPrefix}/logos/favicon.ico`,
      copyright: config.copyright
    }
  },
  plugins: [
    "gatsby-plugin-react-helmet",
    {
      resolve: "gatsby-source-filesystem",
      options: {
        name: "pages",
        path: `${__dirname}/src/pages/`
      }
    },
    {
      resolve: "gatsby-plugin-postcss-sass",
      options: {
        postCssPlugins: [
          require("postcss-import")(),
          require("postcss-url")({ url: "inline" }),
          require("postcss-cssnext")(),
          // Add plugins here:
          require("postcss-inline-svg")(),
          require("postcss-browser-reporter"),
          require("postcss-reporter")
        ]
      }
    },
    {
      resolve: "gatsby-transformer-remark",
      options: {
        plugins: [
          {
            resolve: "gatsby-remark-images",
            options: {
              linkImagesToOriginal: false
            }
          },
          "gatsby-remark-responsive-iframe",
          "gatsby-remark-copy-linked-files",
          "gatsby-remark-autolink-headers",
          "gatsby-remark-smartypants",
          {
            resolve: "gatsby-remark-playground",
            options: {
              customCodeLang: "playground"
            }
          },
          "gatsby-remark-prismjs"
        ]
      }
    },
    {
      resolve: "gatsby-plugin-google-analytics",
      options: {
        trackingId: config.googleAnalyticsID
      }
    },
    {
      resolve: "gatsby-plugin-nprogress",
      options: {
        color: config.themeColor
      }
    },
    "gatsby-plugin-catch-links",
    "gatsby-plugin-sharp",
    "gatsby-plugin-sitemap"
  ]
};

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:9 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
bodia-uzcommented, Feb 2, 2018
0reactions
nadiiacommented, Feb 7, 2018

@bodia-uz yes, I have it fixed with an additional local plugin. And thank you for the PR with a fix to the gatsby-transformer-remark.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is there a syntax for links with no text in Markdown?
Yes, here is the relevant section of the documentation: AUTOMATIC LINKS. Markdown supports a shortcut style for creating “automatic” links for URLs and ......
Read more >
Ways to write markdown links without language prefix? - HUGO
Drop language prefix in internal links in Markdown · Create a link render hook that resolves these using .Page.GetPage · The above should...
Read more >
Fossil Forum: Markdown Formatting Rules - Fossil SCM
A pathname starting with "/" in which case the Fossil server URL prefix is prepended; A wiki page name, or a wiki page...
Read more >
Markdown editing with Visual Studio Code
VS Code will then analyze Markdown links to headers, images, and other local files. Invalid links will be reported as either warnings or...
Read more >
Use markdown to format Power Automate approvals
Client Support; Headers; Paragraphs and line breaks; Lists; Links ... Markdown is not currently supported for the Approvals app on Microsoft ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found