mirror of
https://github.com/ForkAwesome/Fork-Awesome.git
synced 2024-12-26 21:41:31 +08:00
Revert "add plugin to calc SRI hash; add CDN to 'Get Started' page"
This reverts commit d564996430
.
This commit is contained in:
parent
d564996430
commit
df3e7916c0
@ -1,20 +0,0 @@
|
||||
##
|
||||
# Generate an SRI hash for a given file
|
||||
|
||||
require 'digest'
|
||||
|
||||
module Jekyll
|
||||
class GetSriHash < Liquid::Tag
|
||||
def initialize(tag_name, text, tokens)
|
||||
super
|
||||
@filename = text
|
||||
end
|
||||
|
||||
def render(context)
|
||||
sha256 = Digest::SHA256.file '@filename'
|
||||
"sha256-#{sha256.base64digest}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Liquid::Template.register_tag('sri_hash', Jekyll::GetSriHash)
|
@ -69,21 +69,6 @@ relative_path: ../
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="get-started-CDN margin-top-lg" id="get-started-CDN">
|
||||
<h2 class="page-header">Using {{ site.forkawesome.name }} with a CDN</h2>
|
||||
</section>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<p>Thanks to <a href="https://www.jsdelivr.com">jsDelivr</a>, {{ site.forkawesome.name }} is available via a CDN as well.</p>
|
||||
<p>
|
||||
{% highlight html %}
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/fork-awesome@{{ site.forkawesome.version }}/css/fork-awesome.min.css" integrity="{% sri_hash /css/fork-awesome.min.css %}" crossorigin="anonymous">
|
||||
{% endhighlight %}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<section class="get-started-more margin-top-lg" id="get-started-more">
|
||||
<h2 class="page-header">More Information</h2>
|
||||
</section>
|
||||
|
Loading…
Reference in New Issue
Block a user