Skip to content
Discussion options

You must be logged in to vote

Does this work?

const { EleventyHtmlBasePlugin } = require("@11ty/eleventy");

module.exports = function(eleventyConfig) {
  eleventyConfig.addPlugin(EleventyHtmlBasePlugin);

  eleventyConfig.addShortcode("blah", () => {
    let htmlBaseUrlFilter = eleventyConfig.getFilter("htmlBaseUrl");
    return `<a href="${htmlBaseUrlFilter(theLink)}">test</a>`
  });
};

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@zachleat
Comment options

@mendhak
Comment options

@mendhak
Comment options

@mendhak
Comment options

Answer selected by mendhak
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants