Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
hahwul committed Feb 18, 2024
1 parent b5d7fba commit 762beb7
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion jekyll-securitytxt.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ Gem::Specification.new do |spec|
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]
spec.add_dependency "jekyll", "~> 3.9.0"
spec.add_dependency "jekyll"
end
4 changes: 2 additions & 2 deletions lib/jekyll/securitytxt.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def a_verification_file_exist?
file_pattern = %r{.well-known/security\.txt?}
exists = @site.static_files.any? { |p| p.url =~ file_pattern }
warn_msg = "Found a security.txt file in source tree matching /#{file_pattern.source}/; not generating one..."
Jekyll.logger.warn "jekyll-securitytxt", warn_msg if exists
Jekyll.logger.warn "Jekyll-securitytxt", warn_msg if exists
exists
end

Expand All @@ -39,7 +39,7 @@ def securitytxt_path

# Construct a file object from a template with content that can be added to generated pages
def verification_file
Jekyll.logger.info "jekyll-securitytxt", "Generating #{securitytxt_path}"
Jekyll.logger.info "Jekyll-securitytxt", "Generating #{securitytxt_path}"
page = PageWithoutAFile.new(@site, __dir__, "", securitytxt_path)
page.content = File.read(source_path)
page.data["layout"] = nil
Expand Down
2 changes: 1 addition & 1 deletion lib/jekyll/securitytxt/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

module Jekyll
module Securitytxt
VERSION = "0.1.0-pre.2"
VERSION = "0.1.0-pre.6"
end
end
36 changes: 18 additions & 18 deletions lib/jekyll/template.html
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
{{ if site.security_txt.contact }}
{% if site.security_txt.contact %}
Contact: {{ site.security_txt.contact }}
{{ end }}
{% end %}

{{ if site.security_txt.expires}}
{% if site.security_txt.expires %}
Expires: {{ site.security_txt.expires }}
{{ end }}
{% end %}

{{ if site.security_txt.encryption }}
{% if site.security_txt.encryption %}
Encryption: {{ site.security_txt.encryption }}
{{ end }}
{% end %}

{{ if site.security_txt.preferred_languages }}
{% if site.security_txt.preferred_languages %}
Preferred-Languages: {{ site.security_txt.preferred_languages }}
{{ end }}
{% end %}

{{ if site.security_txt.acknowledgments }}
{% if site.security_txt.acknowledgments %}
Acknowledgments: {{ site.security_txt.acknowledgments }}
{{ end }}
{% end %}

{{ if site.security_txt.policy }}
{% if site.security_txt.policy %}
Policy: {{ site.security_txt.policy }}
{{ end }}
{% end %}

{{ if site.security_txt.hiring }}
{% if site.security_txt.hiring %}
Hiring: {{ site.security_txt.hiring }}
{{ end }}
{% end %}

{{ if site.security_txt.csaf }}
{% if site.security_txt.csaf %}
CSAF: {{ site.security_txt.csaf }}
{{ end }}
{% end %}

{{ if site.security_txt.canonical }}
{% if site.security_txt.canonical %}
Canonical: {{ site.security_txt.canonical }}
{{ end }}
{% end %}

0 comments on commit 762beb7

Please sign in to comment.