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
mention a recommended meta generator tag #1217
Comments
There also is the plugin that @Ryuno-Ki created: https://github.com/Ryuno-Ki/eleventy-plugin-meta-generator. I haven't used it but agree with its spelling out "Eleventy" rather than just "11ty," so as to cover all search possibilities. On a separate but related subject: would be nice if the version number were exposed in the Eleventy API for just this purpose, for easy insertion in one's |
I was about to update my plugin for v0.11. I just came up with something to make it somehow discoverable. |
Any chance you could add some Edit: In the meantime, I added the following to my
|
Sure. Fill an issue at https://github.com/Ryuno-Ki/eleventy-plugin-meta-generator/issues/new so I can keep a reference to it, please. |
Done. Thanks! |
@brycewray You can require 11ty's version directly with module.exports = function (config) {
config.addShortcode(`addGenerator`, () => {
return `<meta name="generator" content="Eleventy - 11ty - https://11ty.dev - v${require(`@11ty/eleventy/package.json`).version}" />`;
})
} |
[Slapping own forehead] Ah. Thanks, @denisbrodbeck ! |
...thanks to 11ty/eleventy#1217 (comment)
Related to #1283 |
I'm now using |
@nhoizey I use that format as well. Note that if you use the latest (unstable) version of Eleventy from GitHub (ie. with |
@binyamin you're right, if we use the optional version number, it should be accurate! 👍 |
Proving once again that it does pay to look through the documentation (and I’m talking to myself on that one 😄 ), here is a method that works just fine in Nunjucks templates and uses Eleventy’s built-in <!-- from `head.njk` -->
{% set eleventyVersion = pkg.devDependencies['@11ty/eleventy'] | replace("^", "") %}
<head>
<meta name="generator" content="Eleventy v{{ eleventyVersion }}" /> I suspect it would be equally useful, with obvious alterations, in other templating options. Of course, you must change that |
@binyamin Could you also advise where to find docs (such as they may be) for the beta? Your post here is the first I’ve seen that gives the |
@brycewray I don't know that they exist, to be honest. |
Shipping here, docs already up #2293 (comment) |
Docs: https://www.11ty.dev/docs/data-eleventy-supplied/#eleventy-variable Pending addition to |
The small benefit to using the |
Not yet in 2.0.0-canary.4, correct? Or does it have to be exposed in |
@brycewray Looks like this was added today in 089ab8f, npm info @11ty/eleventy time --json | grep "canary" | tail -3
"2.0.0-canary.3": "2022-03-10T22:12:06.738Z",
"2.0.0-canary.4": "2022-03-17T15:21:10.123Z",
"1.0.1-canary.4": "2022-04-15T20:57:45.575Z" UPDATE: OK, disregard, looks like 2.0.0-canary.5 was just pushed: npm info @11ty/eleventy dist-tags --json
{
"latest": "1.0.0",
"beta": "1.0.0-beta.10",
"canary": "2.0.0-canary.5"
}
npm info @11ty/eleventy time --json | grep "canary" | tail -3
"2.0.0-canary.4": "2022-03-17T15:21:10.123Z",
"1.0.1-canary.4": "2022-04-15T20:57:45.575Z",
"2.0.0-canary.5": "2022-04-15T21:01:55.133Z" |
Looking for meta generator values elsewhere, I saw most don't add a But I couldn't find any specification about the meta value. 🤷♂️ |
The specification would be https://html.spec.whatwg.org/multipage/semantics.html#meta-generator
(Content Warning: Could bring back memories) |
@Ryuno-Ki awesome work! thank you |
Apologies for bumping an old/closed issue, but since Wappalyzer was specifically highlighted as motivation for this change, I wanted to mention that I submitted a technology suggestion to the Wappalyzer team that was just approved so keep an eye out for that shortly:
|
Automated website stack detection tools like wappalyzer currently don't recognise 11ty. The "official" way to recognise the static generator is by
<meta generator="x">
tag.meta
generator tag's value. I propose it to be in format:value format being:
11ty
+ space +v
+ (semver inx.y.z
format)The text was updated successfully, but these errors were encountered: