Skip to content

Commit

Permalink
Fix full link to google drive feedback form
Browse files Browse the repository at this point in the history
soywiz committed Feb 23, 2024
1 parent a9ad4ce commit 3dbd4d6
Showing 3 changed files with 16 additions and 3 deletions.
4 changes: 2 additions & 2 deletions _includes/article_bottom.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div style="margin-top:32px;margin-bottom: 16px;">
Was this article useful?
<div style="display:inline-block;" class="btn btn-group">
<a class="btn btn-outline-success" href="https://docs.google.com/forms/d/e/1FAIpQLSclcND_ZoRdwqW-GvBus9gAaA9Ek-130M3FcC6qk7huWxCfvA/viewform?usp=pp_url&entry.743568020={{ page.url }}&entry.593163446=5" target="_blank"><i class="bi bi-hand-thumbs-up"></i></a>
<a class="btn btn-outline-danger" href="https://docs.google.com/forms/d/e/1FAIpQLSclcND_ZoRdwqW-GvBus9gAaA9Ek-130M3FcC6qk7huWxCfvA/viewform?usp=pp_url&entry.743568020={{ page.url }}&entry.593163446=1" target="_blank"><i class="bi bi-hand-thumbs-down"></i></a>
<a class="btn btn-outline-success" href="https://docs.google.com/forms/d/e/1FAIpQLSclcND_ZoRdwqW-GvBus9gAaA9Ek-130M3FcC6qk7huWxCfvA/viewform?usp=pp_url&entry.743568020={{ page.url | absolute_url | url_encode }}&entry.593163446=5" target="_blank"><i class="bi bi-hand-thumbs-up"></i></a>
<a class="btn btn-outline-danger" href="https://docs.google.com/forms/d/e/1FAIpQLSclcND_ZoRdwqW-GvBus9gAaA9Ek-130M3FcC6qk7huWxCfvA/viewform?usp=pp_url&entry.743568020={{ page.url | absolute_url | url_encode }}&entry.593163446=1" target="_blank"><i class="bi bi-hand-thumbs-down"></i></a>
</div>
</div>
13 changes: 13 additions & 0 deletions _plugins/url_encode.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# _plugins/url_encode.rb
require 'liquid'
require 'uri'

# Percent encoding for URI conforming to RFC 3986.
# Ref: http://tools.ietf.org/html/rfc3986#page-12
module URLEncoding
def url_encode(url)
return URI.escape(url, Regexp.new("[^#{URI::PATTERN::UNRESERVED}]"))
end
end

Liquid::Template.register_filter(URLEncoding)
2 changes: 1 addition & 1 deletion jekyll2.bat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
docker run -v "%CD%:/srv/jekyll" -v "%CD%/vendor/bundle:/usr/local/bundle" -p 4000:4000 -it jekyll/jekyll jekyll serve %* -H 0.0.0.0
docker run -v "%CD%:/srv/jekyll" -v "%CD%/vendor/bundle:/usr/local/bundle" -p 4000:4000 -it jekyll/jekyll:3.8 jekyll serve %* -H 0.0.0.0

0 comments on commit 3dbd4d6

Please sign in to comment.