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

option to skip meta tag generator #404

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

option to skip meta tag generator #404

wants to merge 4 commits into from

Conversation

Sena
Copy link

@Sena Sena commented Jun 22, 2020

With this option we allow the dev choose if they wanna show this meta tag or not

@rjd22
Copy link

rjd22 commented Jun 27, 2020

👍 I would also like this option.

@Sena
Copy link
Author

Sena commented Jun 30, 2020

@DirtyF can you help this PR

@mrdaliri
Copy link

mrdaliri commented Jul 4, 2020

I like to have this option. But I prefer something more general which allows you to disable any of generated tags. Like {% seo generator=false %}

BIST86 referenced this pull request Sep 19, 2020
Copy link

@davorpa davorpa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ref #355 #396

Skip generator meta tag is a good idea (or at least doesn't show version).

It's well-known to be used to know if site has any vulnerability.

The less information is given about frameworks, application servers, libraries ... the better.

@@ -3,7 +3,9 @@
<title>{{ seo_tag.title }}</title>
{% endif %}

{% unless site.skip_generator %}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you change it by

{% unless seo_tag.skip_generator %}

It's more general

@davorpa
Copy link

davorpa commented Jul 27, 2021

Unit tests must be also provided to check right working

it "outputs the plugin version" do
version = Jekyll::SeoTag::VERSION
expect(output).to match(%r!Jekyll SEO tag v#{version}!i)
end
it "outputs meta generator" do
expect(output).to match(%r!Jekyll v#{Jekyll::VERSION}!i)
end

it "minifies the output" do
version = Jekyll::SeoTag::VERSION
expected = <<~HTML
<!-- Begin Jekyll SEO tag v#{version} -->
<title>Foo</title>
<meta name="generator" content="Jekyll v#{Jekyll::VERSION}" />
<meta property="og:title" content="Foo" />
<meta property="og:locale" content="en_US" />
<link rel="canonical" href="http://example.invalid/page.html" />
<meta property="og:url" content="http://example.invalid/page.html" />
<meta property="og:site_name" content="Foo" />
HTML
expect(output).to match(expected)
end

@mattr- mattr- mentioned this pull request Jun 19, 2022
@mattr-
Copy link
Member

mattr- commented Jun 19, 2022

Should we simply leave out the generator tag completely?

@rafaelbiriba
Copy link

Any solution on this?

@melroy89
Copy link

Follow-up, PR: #481

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants