rawfeed 0.1.4 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/LICENSE.txt +20 -21
- data/README.md +12 -130
- data/_data/options.yml +270 -0
- data/_data/resume.yml +8 -8
- data/_includes/alert +3 -1
- data/_includes/chart +13 -32
- data/_includes/details +1 -57
- data/_includes/image +12 -4
- data/_includes/layout/blog_search.html +6 -4
- data/_includes/layout/data.liquid +21 -3
- data/_includes/layout/disqus.html +12 -26
- data/_includes/layout/footer.html +33 -17
- data/_includes/layout/giscus.html +27 -19
- data/_includes/layout/head.html +41 -41
- data/_includes/layout/header.html +127 -101
- data/_includes/layout/maintenance.html +6 -10
- data/_includes/layout/paginator.html +6 -4
- data/_includes/socials +7 -5
- data/_includes/tabs +1 -94
- data/_includes/toc +11 -194
- data/_includes/video +4 -1
- data/_layouts/blog.html +8 -7
- data/_layouts/contact.html +90 -196
- data/_layouts/default.html +42 -341
- data/_layouts/error.html +6 -4
- data/_layouts/home.html +45 -36
- data/_layouts/licenses.html +10 -0
- data/_layouts/page.html +4 -4
- data/_layouts/pixel.html +48 -0
- data/_layouts/pixels.html +71 -1
- data/_layouts/post.html +28 -29
- data/_layouts/resume.html +41 -34
- data/_layouts/tag.html +14 -3
- data/_layouts/tag_posts.html +3 -3
- data/_sass/base/_index.scss +39 -3
- data/_sass/components/_badges.scss +10 -0
- data/_sass/components/_markdown.scss +8 -5
- data/_sass/includes/_footer.scss +5 -2
- data/_sass/includes/_header.scss +23 -19
- data/_sass/includes/_highlight.scss +20 -7
- data/_sass/includes/_maintenance.scss +2 -3
- data/_sass/includes/_terminal.scss +35 -12
- data/_sass/layouts/_blog.scss +13 -9
- data/_sass/layouts/_contact.scss +6 -5
- data/_sass/layouts/_default.scss +5 -5
- data/_sass/layouts/_index.scss +3 -0
- data/_sass/layouts/_licenses.scss +7 -0
- data/_sass/layouts/_page.scss +1 -0
- data/_sass/layouts/_pixel.scss +61 -0
- data/_sass/layouts/_pixels.scss +86 -0
- data/_sass/layouts/_post.scss +4 -11
- data/_sass/layouts/_resume.scss +16 -3
- data/_sass/layouts/_tag-posts.scss +1 -2
- data/_sass/layouts/_tag.scss +12 -1
- data/_sass/main.scss +16 -1
- data/_sass/theme/_dark.scss +8 -1
- data/_sass/theme/_light.scss +8 -1
- data/assets/images/blog/.keep +0 -0
- data/assets/images/pixels/luffy.jpg +0 -0
- data/assets/js/blog.coffee +102 -0
- data/assets/js/contact.coffee +105 -0
- data/assets/js/default.coffee +172 -0
- data/assets/js/discus.coffee +30 -0
- data/assets/js/fallback/README.md +3 -0
- data/assets/js/fallback/blog.js +113 -0
- data/assets/js/fallback/contact.js +116 -0
- data/assets/js/{default.js → fallback/default.js} +50 -0
- data/assets/js/fallback/discus.js +32 -0
- data/{_includes/layout/google_analytics.html → assets/js/fallback/google_analytics.js} +7 -3
- data/assets/js/fallback/home.js +275 -0
- data/assets/js/fallback/no_inframe.js +4 -0
- data/assets/js/fallback/page.js +423 -0
- data/assets/js/fallback/pixels.js +1 -0
- data/assets/js/fallback/resume.js +13 -0
- data/assets/js/fallback/tags.js +1 -0
- data/{_includes/layout/capture_scripts.liquid → assets/js/fallback/theme_load.js} +0 -2
- data/assets/js/google_analytics.coffee +24 -0
- data/assets/js/home.coffee +250 -0
- data/assets/js/no_inframe.coffee +9 -0
- data/assets/js/page.coffee +379 -0
- data/assets/js/pixels.coffee +2 -0
- data/assets/js/resume.coffee +9 -0
- data/assets/js/tags.coffee +2 -0
- data/assets/js/theme_load.coffee +6 -0
- data/assets/json/blog_search.json +2 -2
- data/lib/rawfeed/author.rb +59 -0
- data/lib/rawfeed/csp_filters.rb +3 -0
- data/lib/rawfeed/draft.rb +1 -1
- data/lib/rawfeed/layout.rb +7 -0
- data/lib/rawfeed/page.rb +2 -2
- data/lib/rawfeed/pixel.rb +32 -0
- data/lib/rawfeed/post.rb +2 -2
- data/lib/rawfeed/resume.rb +1 -0
- data/lib/rawfeed/typescript_liquid.rb +172 -0
- data/lib/rawfeed/utils.rb +1 -0
- data/lib/rawfeed/version.rb +1 -1
- data/lib/rawfeed/with_class.rb +20 -0
- data/lib/rawfeed.rb +5 -1
- metadata +44 -12
- data/assets/js/avatar.js +0 -59
- data/assets/js/terminal.js +0 -18
    
        data/_includes/image
    CHANGED
    
    | @@ -1,3 +1,5 @@ | |
| 1 | 
            +
            {%- include layout/data.liquid -%}
         | 
| 2 | 
            +
             | 
| 1 3 | 
             
            {%- assign right_style = "float: right; margin-left: 10px;" -%}
         | 
| 2 4 | 
             
            {%- assign left_style  = "float: left; margin-right: 10px;" -%}
         | 
| 3 5 | 
             
            {%- assign bottom_style = "margin-bottom: 15px;" -%}
         | 
| @@ -20,7 +22,9 @@ | |
| 20 22 | 
             
                <img
         | 
| 21 23 | 
             
                  src="{{ include.src }}"
         | 
| 22 24 | 
             
                  alt="{{ include.title | default: include.caption | escape }}"
         | 
| 23 | 
            -
                  style="display:block; width:100%; height: {{ include.height | default: 'auto' }}; border-radius: {{ include.border-radius | default: 0 }}px; border:  | 
| 25 | 
            +
                  style="display:block; width:100%; height: {{ include.height | default: 'auto' }}; border-radius: {{ include.border-radius | default: 0 }}px; border: 1px solid {{ include.border-color | default: '#757575' }};"
         | 
| 26 | 
            +
                  class="{% if default_.rounding %}rounding-plugins{% endif %}"
         | 
| 27 | 
            +
                  />
         | 
| 24 28 | 
             
                {%- if include.caption -%}
         | 
| 25 29 | 
             
                  <figcaption class="img-include-caption">{{ include.caption }}</figcaption>
         | 
| 26 30 | 
             
                {%- endif -%}
         | 
| @@ -31,7 +35,9 @@ | |
| 31 35 | 
             
                <img
         | 
| 32 36 | 
             
                  src="{{ include.src }}"
         | 
| 33 37 | 
             
                  alt="{{ include.title | default: include.caption | escape }}"
         | 
| 34 | 
            -
                  style="display:block; width:100%; height: {{ include.height | default: 'auto' }}; border-radius: {{ include.border-radius | default: 0 }}px; border:  | 
| 38 | 
            +
                  style="display:block; width:100%; height: {{ include.height | default: 'auto' }}; border-radius: {{ include.border-radius | default: 0 }}px; border: 1px solid {{ include.border-color | default: '#ddd' }};"
         | 
| 39 | 
            +
                  class="{% if default_.rounding %}rounding-plugins{% endif %}"
         | 
| 40 | 
            +
                  />
         | 
| 35 41 | 
             
                {%- if include.caption -%}
         | 
| 36 42 | 
             
                  <figcaption class="img-include-caption">{{ include.caption }}</figcaption>
         | 
| 37 43 | 
             
                {%- endif -%}
         | 
| @@ -42,7 +48,9 @@ | |
| 42 48 | 
             
                <img
         | 
| 43 49 | 
             
                  src="{{ include.src }}"
         | 
| 44 50 | 
             
                  alt="{{ include.title | default: include.caption | escape }}"
         | 
| 45 | 
            -
                  style="display:block; width:100%; height: {{ include.height | default: 'auto' }}; border-radius: {{ include.border-radius | default: 0 }}px; border:  | 
| 51 | 
            +
                  style="display:block; width:100%; height: {{ include.height | default: 'auto' }}; border-radius: {{ include.border-radius | default: 0 }}px; border: 1px solid {{ include.border-color | default: '#ddd' }};"
         | 
| 52 | 
            +
                  class="{% if default_.rounding %}rounding-plugins{% endif %}"
         | 
| 53 | 
            +
                  />
         | 
| 46 54 | 
             
                {%- if include.caption -%}
         | 
| 47 55 | 
             
                  <figcaption class="img-include-caption">{{ include.caption }}</figcaption>
         | 
| 48 56 | 
             
                {%- endif -%}
         | 
| @@ -53,7 +61,7 @@ | |
| 53 61 | 
             
                <img
         | 
| 54 62 | 
             
                  src="{{ include.src }}"
         | 
| 55 63 | 
             
                  alt="{{ include.title | default: include.caption | escape }}"
         | 
| 56 | 
            -
                  style="display:block; width:100%; height: {{ include.height | default: 'auto' }}; border-radius: {{ include.border-radius | default: 0 }}px; border:  | 
| 64 | 
            +
                  style="display:block; width:100%; height: {{ include.height | default: 'auto' }}; border-radius: {{ include.border-radius | default: 0 }}px; border: 1px solid {{ include.border-color | default: '#ddd' }};" />
         | 
| 57 65 | 
             
                {%- if include.caption -%}
         | 
| 58 66 | 
             
                  <figcaption class="img-include-caption">{{ include.caption }}</figcaption>
         | 
| 59 67 | 
             
                {%- endif -%}
         | 
| @@ -1,16 +1,18 @@ | |
| 1 | 
            -
            {%-  | 
| 1 | 
            +
            {%- include layout/data.liquid -%}
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            {%- if blog_.search.enable -%}
         | 
| 2 4 | 
             
            <div class="row blog-search" inert>
         | 
| 3 5 | 
             
              <div class="col-sm">
         | 
| 4 6 | 
             
                <div class="blog-search__wapper">
         | 
| 5 | 
            -
                  <strong>»</strong><input id="blog-search__input" type="text" class="blog-search__input" placeholder="{{  | 
| 7 | 
            +
                  <strong>»</strong><input id="blog-search__input" type="text" class="blog-search__input" placeholder="{{ blog_.search.placeholder }}" aria-label="{{ blog_.search.placeholder }}">
         | 
| 6 8 | 
             
                  <button id="blog-search__btn-clean" class="blog-search__btn-clean" type="button">
         | 
| 7 | 
            -
                    {{  | 
| 9 | 
            +
                    {{ blog_.search.button_clean.text }}
         | 
| 8 10 | 
             
                  </button>
         | 
| 9 11 | 
             
                </div>
         | 
| 10 12 | 
             
              </div>
         | 
| 11 13 |  | 
| 12 14 | 
             
              <div id="blog-search__results-wrapper" class="row disabled">
         | 
| 13 | 
            -
                <h2 class="blog-subtitle">[ {{  | 
| 15 | 
            +
                <h2 class="blog-subtitle">[ {{ blog_.search.results | default: "results" }} ]</h2>
         | 
| 14 16 | 
             
                <ul id="blog-search__results" class="row blog-list"></ul>
         | 
| 15 17 | 
             
              </div>
         | 
| 16 18 |  | 
| @@ -1,9 +1,27 @@ | |
| 1 | 
            -
            {%- assign project_url = "https://github.com/williamcanin/rawfeed" -%}
         | 
| 2 1 | 
             
            {%- assign theme_name = "rawfeed" -%}
         | 
| 3 | 
            -
            {%- assign  | 
| 2 | 
            +
            {%- assign project_url = "https://rawfeed.github.io/rawfeed-jekyll" -%}
         | 
| 4 3 | 
             
            {%- assign home_url = "/" | relative_url -%}
         | 
| 5 4 | 
             
            {%- assign blog_url = "/blog/" | relative_url -%}
         | 
| 5 | 
            +
            {%- assign pixels_url = "/pixels/" | relative_url -%}
         | 
| 6 6 | 
             
            {%- assign search_url = "/blog/?search=open" | relative_url -%}
         | 
| 7 7 | 
             
            {%- assign tags_url = "/blog/tags/" | relative_url -%}
         | 
| 8 8 | 
             
            {%- assign feed_url = "/feed.xml" | relative_url -%}
         | 
| 9 | 
            -
            {%- assign  | 
| 9 | 
            +
            {%- assign head_ = site.data.options.head -%}
         | 
| 10 | 
            +
            {%- assign site_title = site.data.options.title -%}
         | 
| 11 | 
            +
            {%- assign author_ = site.data.options.author -%}
         | 
| 12 | 
            +
            {%- assign header_ = site.data.options.header -%}
         | 
| 13 | 
            +
            {%- assign blog_ = site.data.options.blog -%}
         | 
| 14 | 
            +
            {%- assign pixels_ = site.data.options.pixels -%}
         | 
| 15 | 
            +
            {%- assign home_ = site.data.options.home -%}
         | 
| 16 | 
            +
            {%- assign default_ = site.data.options.default -%}
         | 
| 17 | 
            +
            {%- assign page_ = site.data.options.page -%}
         | 
| 18 | 
            +
            {%- assign contact_ = site.data.options.contact -%}
         | 
| 19 | 
            +
            {%- assign footer_ = site.data.options.footer -%}
         | 
| 20 | 
            +
            {%- assign socials_ = site.data.options.socials -%}
         | 
| 21 | 
            +
            {%- assign datelang_ = site.data.options.datelang -%}
         | 
| 22 | 
            +
            {%- assign maintenance_ = site.data.options.maintenance -%}
         | 
| 23 | 
            +
            {%- assign reading_time_ = site.data.options.reading_time -%}
         | 
| 24 | 
            +
             | 
| 25 | 
            +
             | 
| 26 | 
            +
             | 
| 27 | 
            +
             | 
| @@ -1,30 +1,16 @@ | |
| 1 | 
            -
            { | 
| 2 | 
            -
            <div class="row comments">
         | 
| 3 | 
            -
              <h1 class="comments-title">[ {{ site.strings.post.comments | default: "comments" }} ]</h1>
         | 
| 4 | 
            -
              <div class="comments-content">
         | 
| 5 | 
            -
                <div id="disqus_thread"></div>
         | 
| 6 | 
            -
                <script>
         | 
| 7 | 
            -
                    /**
         | 
| 8 | 
            -
                     * RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES
         | 
| 9 | 
            -
                     */
         | 
| 10 | 
            -
                    var disqus_shortname = '{{ site.blog.post.comments.disqus.shortname }}';
         | 
| 1 | 
            +
            {%- include layout/data.liquid -%}
         | 
| 11 2 |  | 
| 12 | 
            -
             | 
| 13 | 
            -
             | 
| 14 | 
            -
             | 
| 15 | 
            -
             | 
| 16 | 
            -
                        this.page.disable_ads = true; // disabled ads
         | 
| 17 | 
            -
                        this.page.recommendations = false; // disabled recommendations
         | 
| 18 | 
            -
                    };
         | 
| 3 | 
            +
            {%- if page.comments != false
         | 
| 4 | 
            +
              and jekyll.environment == 'production'
         | 
| 5 | 
            +
              and blog_.post.comments.provider == 'disqus'
         | 
| 6 | 
            +
              and blog_.post.comments.disqus.shortname != "" -%}
         | 
| 19 7 |  | 
| 20 | 
            -
             | 
| 21 | 
            -
             | 
| 22 | 
            -
             | 
| 23 | 
            -
             | 
| 24 | 
            -
             | 
| 25 | 
            -
             | 
| 26 | 
            -
                </ | 
| 27 | 
            -
                <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>
         | 
| 8 | 
            +
              <div class="row comments">
         | 
| 9 | 
            +
                <h1 class="comments-title">[ {{ blog_.post.comments.title | default: "comments" }} ]</h1>
         | 
| 10 | 
            +
                <div class="comments-content">
         | 
| 11 | 
            +
                  <div id="disqus_thread"></div>
         | 
| 12 | 
            +
                  <script src="{{ '/assets/js/discus.js' | relative_url }}"></script>
         | 
| 13 | 
            +
                  <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>
         | 
| 14 | 
            +
                </div>
         | 
| 28 15 | 
             
              </div>
         | 
| 29 | 
            -
            </div>
         | 
| 30 16 | 
             
            {% endif %}
         | 
| @@ -1,36 +1,52 @@ | |
| 1 | 
            +
            <!-- [Footer] NOTE: Removing or hiding this credit violates the license terms and copyright.
         | 
| 2 | 
            +
            Please preserve this credit according to the license terms.
         | 
| 3 | 
            +
            Creative Commons Attribution 4.0 International (CC BY 4.0)
         | 
| 4 | 
            +
            See: https://rawfeed.github.io/rawfeed-jekyll/license/
         | 
| 5 | 
            +
            -->
         | 
| 6 | 
            +
             | 
| 1 7 | 
             
            {%- include layout/data.liquid -%}
         | 
| 2 8 |  | 
| 3 | 
            -
            <footer class=" | 
| 4 | 
            -
             | 
| 5 | 
            -
               | 
| 6 | 
            -
             | 
| 7 | 
            -
             | 
| 8 | 
            -
             | 
| 9 | 
            +
            <footer class="fixed-bottom footer">
         | 
| 10 | 
            +
             | 
| 11 | 
            +
              <!-- line top button  -->
         | 
| 12 | 
            +
              {%- if footer_.top_button.enable -%}
         | 
| 13 | 
            +
                <div class="row top">
         | 
| 14 | 
            +
                  <div class="col-md d-flex justify-content-end">
         | 
| 15 | 
            +
                    <a id="top-link" class="top-link" href="#top">{{ footer_.top_button.icon }}</a>
         | 
| 16 | 
            +
                  </div>
         | 
| 9 17 | 
             
                </div>
         | 
| 10 | 
            -
              </div>
         | 
| 11 18 | 
             
              {%- endif -%}
         | 
| 19 | 
            +
              <!-- line top button  -->
         | 
| 12 20 |  | 
| 21 | 
            +
              <!-- line footer content  -->
         | 
| 13 22 | 
             
              <div class="row footer-wrapper">
         | 
| 14 23 |  | 
| 15 | 
            -
                 | 
| 16 | 
            -
                 | 
| 17 | 
            -
                   | 
| 18 | 
            -
             | 
| 19 | 
            -
             | 
| 20 | 
            -
             | 
| 24 | 
            +
                <!-- column copyright  -->
         | 
| 25 | 
            +
                {%- if footer_.copyright -%}
         | 
| 26 | 
            +
                  <div class="col-md footer-copyright-wrap">
         | 
| 27 | 
            +
                    {%- assign year = site.time | date: "%Y" -%}
         | 
| 28 | 
            +
                    {%- assign since = footer_.copyright.since -%}
         | 
| 29 | 
            +
                  <div class="footer-copyright">© {{ footer_.copyright.title | default: theme_name }} {{ since }}{%- if since -%}-{%- endif -%}{{year}} {%- if footer_.copyright.message -%}- {{ footer_.copyright.message }} {%- endif -%}| <a href="{{  footer_.licenses.page_url | relative_url  }}">{{ footer_.licenses.title }}</a></div>
         | 
| 30 | 
            +
                  </div>
         | 
| 21 31 | 
             
                {%- endif -%}
         | 
| 32 | 
            +
                <!-- column copyright  -->
         | 
| 22 33 |  | 
| 23 | 
            -
                 | 
| 24 | 
            -
                 | 
| 25 | 
            -
             | 
| 26 | 
            -
             | 
| 34 | 
            +
                <!-- column message  -->
         | 
| 35 | 
            +
                {%- if footer_.message -%}
         | 
| 36 | 
            +
                  <div class="col-md footer-message-wrap">
         | 
| 37 | 
            +
                      <div class="footer-message">{{ footer_.message | markdownify }}</div>
         | 
| 38 | 
            +
                  </div>
         | 
| 27 39 | 
             
                {%- endif -%}
         | 
| 40 | 
            +
                <!-- column message  -->
         | 
| 28 41 |  | 
| 42 | 
            +
                <!-- column made-by  -->
         | 
| 29 43 | 
             
                <div class="col-md footer-made-by-wrap">
         | 
| 30 44 | 
             
                  <div class="footer-made-by">
         | 
| 31 45 | 
             
                    Using the <a href="{{ project_url }}" target="_blank" rel="noopener noreferrer">{{ theme_name }}</a> theme for <a href="https://jekyllrb.com" target="_blank" rel="noopener noreferrer">Jekyll</a>.
         | 
| 32 46 | 
             
                  </div>
         | 
| 33 47 | 
             
                </div>
         | 
| 48 | 
            +
                <!-- column made-by  -->
         | 
| 34 49 |  | 
| 35 50 | 
             
              </div>
         | 
| 51 | 
            +
              <!-- line footer content  -->
         | 
| 36 52 | 
             
            </footer>
         | 
| @@ -1,21 +1,29 @@ | |
| 1 | 
            -
            {%-  | 
| 2 | 
            -
             | 
| 3 | 
            -
             | 
| 4 | 
            -
               | 
| 5 | 
            -
             | 
| 6 | 
            -
             | 
| 7 | 
            -
             | 
| 8 | 
            -
             | 
| 9 | 
            -
             | 
| 10 | 
            -
             | 
| 11 | 
            -
             | 
| 12 | 
            -
                   | 
| 13 | 
            -
             | 
| 14 | 
            -
             | 
| 15 | 
            -
             | 
| 16 | 
            -
             | 
| 17 | 
            -
             | 
| 18 | 
            -
             | 
| 1 | 
            +
            {%- include layout/data.liquid -%}
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            {%- if page.comments != false
         | 
| 4 | 
            +
              and jekyll.environment == 'production'
         | 
| 5 | 
            +
              and blog_.post.comments.provider == 'giscus'
         | 
| 6 | 
            +
              and blog_.post.comments.giscus.repo != ""
         | 
| 7 | 
            +
              and blog_.post.comments.giscus.category_id != "" -%}
         | 
| 8 | 
            +
             | 
| 9 | 
            +
              <div id="giscus" class="row comments">
         | 
| 10 | 
            +
                <h1 class="comments-title">[ {{ blog_.post.comments.title | default: "comments" }} ]</h1>
         | 
| 11 | 
            +
                <div class="row comments-content">
         | 
| 12 | 
            +
                  <script src="https://giscus.app/client.js"
         | 
| 13 | 
            +
                    data-repo="{{ blog_.post.comments.giscus.repo }}"
         | 
| 14 | 
            +
                    data-repo-id="{{ blog_.post.comments.giscus.repo_id }}"
         | 
| 15 | 
            +
                    data-repo-category="{{ blog_.post.comments.giscus.repo_category }}"
         | 
| 16 | 
            +
                    data-category-id="{{ blog_.post.comments.giscus.category_id }}"
         | 
| 17 | 
            +
                    data-mapping="{{ blog_.post.comments.giscus.mapping | default: 'pathname' }}"
         | 
| 18 | 
            +
                    data-strict="0"
         | 
| 19 | 
            +
                    data-reactions-enabled="{{ blog_.post.comments.giscus.reactions_enabled | default: 1 }}"
         | 
| 20 | 
            +
                    data-emit-metadata="0"
         | 
| 21 | 
            +
                    data-input-position="bottom"
         | 
| 22 | 
            +
                    data-theme="{{ blog_.post.comments.giscus.theme_light | default: 'light' }}"
         | 
| 23 | 
            +
                    data-lang="{{ blog_.post.comments.giscus.lang | default: 'en' }}"
         | 
| 24 | 
            +
                    crossorigin="anonymous"
         | 
| 25 | 
            +
                    async>
         | 
| 26 | 
            +
                  </script>
         | 
| 27 | 
            +
                </div>
         | 
| 19 28 | 
             
              </div>
         | 
| 20 | 
            -
            </div>
         | 
| 21 29 | 
             
            {%- endif -%}
         | 
    
        data/_includes/layout/head.html
    CHANGED
    
    | @@ -4,40 +4,43 @@ | |
| 4 4 | 
             
              <meta name="viewport" content="width=device-width, initial-scale=1">
         | 
| 5 5 | 
             
              <meta charset="utf-8">
         | 
| 6 6 | 
             
              {%- if page.url == "/" -%}
         | 
| 7 | 
            -
                <title>{{  | 
| 7 | 
            +
                <title>{{ site_title | replace: "/", "" | default: theme_name }} | {{ site.baseurl | prepend: site.url }}</title>
         | 
| 8 8 | 
             
              {%- else -%}
         | 
| 9 | 
            -
                <title>{{ page.title }} | {{  | 
| 9 | 
            +
                <title>{{ page.title | replace: "/", "" |  capitalize }} | {{ site_title | default: theme_name }}</title>
         | 
| 10 10 | 
             
              {%- endif -%}
         | 
| 11 11 |  | 
| 12 | 
            +
              <!-- SEO -->
         | 
| 13 | 
            +
              <meta name="description" content="{{ page.description | capitalize | default: header_.description | strip_html | truncate: 50 }}">
         | 
| 14 | 
            +
              <meta name="author" content="{{ page.author | default: author_ }}">
         | 
| 15 | 
            +
              <meta property="og:title" content="{{ page.title | capitalize | default: site_title }}">
         | 
| 16 | 
            +
              <meta property="og:locale" content="{{ default_.lang | replace: "-", "_" | default: "en_US" }}">
         | 
| 17 | 
            +
              <meta property="og:locale:alternate" content="en_US">
         | 
| 18 | 
            +
              <meta property="og:description" content="{{ page.description | capitalize | default: header_.description | strip_html | truncate: 50 }}">
         | 
| 19 | 
            +
              <link rel="canonical" href="{{ page.url | prepend: site.url }}">
         | 
| 20 | 
            +
              <meta property="og:url" content="{{ page.url | prepend: site.url }}">
         | 
| 21 | 
            +
              <meta property="og:site_name" content="{{ site_title }}">
         | 
| 22 | 
            +
              <meta property="og:type" content="website">
         | 
| 23 | 
            +
              <meta name="twitter:card" content="summary">
         | 
| 24 | 
            +
              <meta property="twitter:title" content="{{ site_title }}">
         | 
| 25 | 
            +
              <meta name="robots" content="index, follow">
         | 
| 26 | 
            +
              <script type="application/ld+json">
         | 
| 27 | 
            +
              {"@context":"https://schema.org","@type":"WebSite","description":"{{ page.description | capitalize | default: header_.description | strip_html | truncate: 50 }}","headline":"{{ site_title }}","name":"{{ site_title }}","url":"{{ page.url | prepend: site.url }}"}</script>
         | 
| 28 | 
            +
              <!-- SEO -->
         | 
| 29 | 
            +
             | 
| 12 30 | 
             
              {% comment %} Security {% endcomment %}
         | 
| 13 31 | 
             
              {%- if jekyll.environment == 'production' %}
         | 
| 14 | 
            -
                {% comment %} { %- include layout/capture_scripts.liquid -% } {% endcomment %}
         | 
| 15 32 |  | 
| 16 | 
            -
                <script>
         | 
| 17 | 
            -
             | 
| 18 | 
            -
                    // Prevents the site from being displayed inside an <iframe>
         | 
| 19 | 
            -
                    window.top.location = window.self.location;
         | 
| 20 | 
            -
                  }
         | 
| 21 | 
            -
                </script>
         | 
| 22 | 
            -
                <!-- TODO: Colocar os script inline <script> todos em .js para evistar o uso de 'unsafe-inline' em script-src -->
         | 
| 33 | 
            +
                <script src="{{ '/assets/js/no_inframe.js' | relative_url }}"></script>
         | 
| 34 | 
            +
             | 
| 23 35 | 
             
                <meta http-equiv="Content-Security-Policy"
         | 
| 24 36 | 
             
                  content="
         | 
| 25 37 | 
             
                    default-src 'self';
         | 
| 26 | 
            -
                    img-src 'self' data: {{  | 
| 27 | 
            -
                    script-src 'self'  | 
| 28 | 
            -
             | 
| 29 | 
            -
             | 
| 30 | 
            -
             | 
| 31 | 
            -
                     | 
| 32 | 
            -
                    style-src 'self' 'unsafe-inline'
         | 
| 33 | 
            -
                    https://cdnjs.cloudflare.com
         | 
| 34 | 
            -
                    https://fonts.googleapis.com
         | 
| 35 | 
            -
                    https://cdn.jsdelivr.net
         | 
| 36 | 
            -
                    https://giscus.app
         | 
| 37 | 
            -
                    https://disqus.com;
         | 
| 38 | 
            -
                    font-src 'self' https://fonts.gstatic.com https://cdnjs.cloudflare.com data:;
         | 
| 39 | 
            -
                    connect-src 'self' {{ site.csp.connect-src | join: ' ' }};
         | 
| 40 | 
            -
                    frame-src {{ site.csp.frame-src | join: ' ' }};
         | 
| 38 | 
            +
                    img-src 'self' data: {{ head_.csp.img-src | join: ' ' }};
         | 
| 39 | 
            +
                    script-src 'self' {{ head_.csp.script-src | join: ' ' }};
         | 
| 40 | 
            +
                    style-src 'self' 'unsafe-inline' {{ head_.csp.style-src | join: ' ' }};
         | 
| 41 | 
            +
                    font-src 'self' {{ head_.csp.font-src | join: ' ' }} data:;
         | 
| 42 | 
            +
                    connect-src 'self' {{ head_.csp.connect-src | join: ' ' }};
         | 
| 43 | 
            +
                    frame-src {{ head_.csp.frame-src | join: ' ' }};
         | 
| 41 44 | 
             
                    object-src 'none';
         | 
| 42 45 | 
             
                    base-uri 'self';
         | 
| 43 46 | 
             
                    form-action 'self';
         | 
| @@ -53,19 +56,15 @@ | |
| 53 56 | 
             
              <link rel="icon" type="image/png" href="{{ '/assets/images/favicon.png' | relative_url }}">
         | 
| 54 57 | 
             
              <link rel="apple-touch-icon" href="{{ '/assets/images/favicon.png' | relative_url }}">
         | 
| 55 58 |  | 
| 56 | 
            -
              { | 
| 57 | 
            -
              {%- seo -%}
         | 
| 58 | 
            -
              <meta property="og:locale:alternate" content="en_US">
         | 
| 59 | 
            -
             | 
| 60 | 
            -
              {%- if site.google.site_verification != "" -%}
         | 
| 59 | 
            +
              {%- if head_.google.site_verification != "" -%}
         | 
| 61 60 | 
             
                <!-- Google Site Verification -->
         | 
| 62 | 
            -
                <meta name="google-site-verification" content="{{  | 
| 61 | 
            +
                <meta name="google-site-verification" content="{{ head_.google.site_verification }}">
         | 
| 63 62 | 
             
                <!-- Google Site Verification -->
         | 
| 64 63 | 
             
              {%- endif -%}
         | 
| 65 64 |  | 
| 66 65 | 
             
              {% comment %} Fonts {% endcomment %}
         | 
| 67 66 | 
             
              {%- comment -%}
         | 
| 68 | 
            -
              TODO: version: 0. | 
| 67 | 
            +
              TODO: version: 0.3.0: place fonts used in the project instead of using Google Fonts.
         | 
| 69 68 | 
             
              {%- endcomment -%}
         | 
| 70 69 | 
             
              <link rel="preconnect" href="https://fonts.googleapis.com">
         | 
| 71 70 | 
             
              <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
         | 
| @@ -73,26 +72,27 @@ | |
| 73 72 | 
             
              <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Inconsolata:400,700&display=swap">
         | 
| 74 73 | 
             
              <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css"/>
         | 
| 75 74 |  | 
| 75 | 
            +
              <!-- Google Fonts -->
         | 
| 76 | 
            +
              <link rel="preconnect" href="https://fonts.googleapis.com">
         | 
| 77 | 
            +
              <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
         | 
| 78 | 
            +
              <link href="https://fonts.googleapis.com/css2?family=Inconsolata:wght@200..900&family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&family=Open+Sans:ital,wght@0,300..800;1,300..800&family=Roboto+Mono:ital,wght@0,100..700;1,100..700&family=Ubuntu:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap" rel="stylesheet">
         | 
| 79 | 
            +
              <!-- Google Fonts -->
         | 
| 80 | 
            +
             | 
| 76 81 | 
             
              {% comment %} bootstrap {% endcomment %}
         | 
| 77 82 | 
             
              <link rel="stylesheet" href="{{ '/assets/vendor/bootstrap/css/bootstrap.min.css' | relative_url }}">
         | 
| 78 83 |  | 
| 79 84 | 
             
              {% comment %} fixes FOUC/flicker in firefox {% endcomment %}
         | 
| 80 | 
            -
              <script>
         | 
| 81 | 
            -
                (function() {
         | 
| 82 | 
            -
                  const savedTheme = localStorage.getItem('theme') || 'light';
         | 
| 83 | 
            -
                  document.documentElement.setAttribute('data-theme', savedTheme);
         | 
| 84 | 
            -
                })();
         | 
| 85 | 
            -
              </script>
         | 
| 85 | 
            +
              <script src="{{ '/assets/js/theme_load.js' | relative_url }}"></script>
         | 
| 86 86 |  | 
| 87 87 | 
             
              {% comment %} load theme {% endcomment %}
         | 
| 88 88 | 
             
              <link rel="stylesheet" href="{{ '/assets/css/style.css' | relative_url }}">
         | 
| 89 89 |  | 
| 90 90 | 
             
              {% comment %} feed {% endcomment %}
         | 
| 91 | 
            -
              <link rel="alternate" type="application/atom+xml" title="{{  | 
| 91 | 
            +
              <link rel="alternate" type="application/atom+xml" title="{{ site_title }}" href="{{ '/feed.xml' | relative_url }}">
         | 
| 92 92 |  | 
| 93 | 
            -
              {%- if jekyll.environment == 'production' and  | 
| 93 | 
            +
              {%- if jekyll.environment == 'production' and head_.google.analytics.enable == true and head_.google.analytics.id != "" -%}
         | 
| 94 94 | 
             
                <!-- Google Analytics -->
         | 
| 95 | 
            -
                { | 
| 95 | 
            +
                <script src="{{ '/assets/js/google_analytics.js' | relative_url }}"></script>
         | 
| 96 96 | 
             
                <!-- Google Analytics -->
         | 
| 97 97 | 
             
              {%- endif -%}
         | 
| 98 98 | 
             
            </head>
         |