bridgetown-seo-tag 6.0.0 → 7.0.1
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/.github/workflows/tests.yml +33 -0
 - data/.gitignore +0 -1
 - data/.rubocop.yml +1 -1
 - data/CHANGELOG.md +12 -0
 - data/Gemfile +7 -1
 - data/Gemfile.lock +288 -0
 - data/README.md +18 -7
 - data/bridgetown-seo-tag.gemspec +2 -8
 - data/lib/bridgetown-seo-tag/author_drop.rb +2 -2
 - data/lib/bridgetown-seo-tag/builder.rb +1 -1
 - data/lib/bridgetown-seo-tag/drop.rb +7 -19
 - data/lib/bridgetown-seo-tag/filters.rb +1 -1
 - data/lib/bridgetown-seo-tag/image_drop.rb +2 -2
 - data/lib/bridgetown-seo-tag/mastodon_drop.rb +84 -0
 - data/lib/bridgetown-seo-tag/url_helper.rb +3 -3
 - data/lib/bridgetown-seo-tag/version.rb +2 -5
 - data/lib/bridgetown-seo-tag.rb +76 -75
 - data/lib/template.html +5 -0
 - metadata +9 -82
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 482ed8646582d17fc781f226fe1c8b4b2bbca7952e8f16dfd236c2e41c37edf1
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 2006e957bca458404ad513b5d8a1bd324549fc2b6f2d2a7a2dc1009a74a27b1c
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 2f5cfec77b75f408052180602c361b1bc44c125491002e30d9faffe88e008501d1865453a274b4aa63374bbd986c6474b8ee29e9ecfdb4e9ebf17137800541ef
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 0a2d3f70a6763517e442523f5f01f2ae2aaab7007a9cf479ffe3255e392c67d76caa54137e7bd290846c338705d57a77b4a58a357cb2b5524b555d02e55b072c
         
     | 
| 
         @@ -0,0 +1,33 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            name: Tests
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            on:
         
     | 
| 
      
 4 
     | 
    
         
            +
              pull_request:
         
     | 
| 
      
 5 
     | 
    
         
            +
                branches:
         
     | 
| 
      
 6 
     | 
    
         
            +
                  - "*"
         
     | 
| 
      
 7 
     | 
    
         
            +
              push:
         
     | 
| 
      
 8 
     | 
    
         
            +
                branches:
         
     | 
| 
      
 9 
     | 
    
         
            +
                  - master
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
            jobs:
         
     | 
| 
      
 12 
     | 
    
         
            +
              build:
         
     | 
| 
      
 13 
     | 
    
         
            +
                runs-on: ubuntu-latest
         
     | 
| 
      
 14 
     | 
    
         
            +
                strategy:
         
     | 
| 
      
 15 
     | 
    
         
            +
                  matrix:
         
     | 
| 
      
 16 
     | 
    
         
            +
                    # TODO: 3.4.0 was blowing up with html-proofer / ffi issues
         
     | 
| 
      
 17 
     | 
    
         
            +
                    ruby_version: [3.1.3, 3.2.0, 3.3.0]
         
     | 
| 
      
 18 
     | 
    
         
            +
                    bridgetown_version: [1.3.0]
         
     | 
| 
      
 19 
     | 
    
         
            +
                continue-on-error: ${{ endsWith(matrix.ruby, 'head') || matrix.ruby == 'debug' }}
         
     | 
| 
      
 20 
     | 
    
         
            +
                # Has to be top level to cache properly
         
     | 
| 
      
 21 
     | 
    
         
            +
                env:
         
     | 
| 
      
 22 
     | 
    
         
            +
                  BUNDLE_JOBS: 3
         
     | 
| 
      
 23 
     | 
    
         
            +
                  BUNDLE_PATH: "vendor/bundle"
         
     | 
| 
      
 24 
     | 
    
         
            +
                  BRIDGETOWN_VERSION: ${{ matrix.bridgetown_version }}
         
     | 
| 
      
 25 
     | 
    
         
            +
                steps:
         
     | 
| 
      
 26 
     | 
    
         
            +
                  - uses: actions/checkout@master
         
     | 
| 
      
 27 
     | 
    
         
            +
                  - name: Setup Ruby
         
     | 
| 
      
 28 
     | 
    
         
            +
                    uses: ruby/setup-ruby@v1
         
     | 
| 
      
 29 
     | 
    
         
            +
                    with:
         
     | 
| 
      
 30 
     | 
    
         
            +
                      ruby-version: ${{ matrix.ruby_version }}
         
     | 
| 
      
 31 
     | 
    
         
            +
                      bundler-cache: true
         
     | 
| 
      
 32 
     | 
    
         
            +
                  - name: Test with Rake
         
     | 
| 
      
 33 
     | 
    
         
            +
                    run: script/cibuild
         
     | 
    
        data/.gitignore
    CHANGED
    
    
    
        data/.rubocop.yml
    CHANGED
    
    
    
        data/CHANGELOG.md
    CHANGED
    
    | 
         @@ -1,5 +1,17 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            # Changelog
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
      
 3 
     | 
    
         
            +
            ## 7.0.1 / 2025/10-26
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            - Remove `blank?` and `present?` references which aren't available once Active Support is removed as a Bridgetown dependency
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
            ## 7.0.0 / 2025-08-15
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
            - Add support for Bridgetown 2.0
         
     | 
| 
      
 10 
     | 
    
         
            +
              - minimum requirement of Ruby 3.1
         
     | 
| 
      
 11 
     | 
    
         
            +
            - Refactor internals so `Bridgetown::SeoTag` is a module, with a `LiquidTag` class inside
         
     | 
| 
      
 12 
     | 
    
         
            +
            - Add GH workflow and fix failing items (@jclusso)
         
     | 
| 
      
 13 
     | 
    
         
            +
            - Parse Mastodon handle to add attribution and verification metadata (@goulvench)
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
       3 
15 
     | 
    
         
             
            ## 6.0.0 / 2023-01-08
         
     | 
| 
       4 
16 
     | 
    
         | 
| 
       5 
17 
     | 
    
         
             
            - Fix bug where prev/next rel links for paginated pages were missing
         
     | 
    
        data/Gemfile
    CHANGED
    
    | 
         @@ -4,4 +4,10 @@ source "https://rubygems.org" 
     | 
|
| 
       4 
4 
     | 
    
         | 
| 
       5 
5 
     | 
    
         
             
            gemspec
         
     | 
| 
       6 
6 
     | 
    
         | 
| 
       7 
     | 
    
         
            -
            gem "bridgetown",  
     | 
| 
      
 7 
     | 
    
         
            +
            gem "bridgetown", "2.0.3"
         
     | 
| 
      
 8 
     | 
    
         
            +
            gem "bundler", ">= 1.15"
         
     | 
| 
      
 9 
     | 
    
         
            +
            gem "ffi"
         
     | 
| 
      
 10 
     | 
    
         
            +
            gem "html-proofer", "~> 5.0"
         
     | 
| 
      
 11 
     | 
    
         
            +
            gem "rake", "~> 13.0"
         
     | 
| 
      
 12 
     | 
    
         
            +
            gem "rspec", "~> 3.5"
         
     | 
| 
      
 13 
     | 
    
         
            +
            gem "rubocop-bridgetown", "~> 0.3"
         
     | 
    
        data/Gemfile.lock
    ADDED
    
    | 
         @@ -0,0 +1,288 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            PATH
         
     | 
| 
      
 2 
     | 
    
         
            +
              remote: .
         
     | 
| 
      
 3 
     | 
    
         
            +
              specs:
         
     | 
| 
      
 4 
     | 
    
         
            +
                bridgetown-seo-tag (7.0.1)
         
     | 
| 
      
 5 
     | 
    
         
            +
                  bridgetown (>= 1.3)
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
            GEM
         
     | 
| 
      
 8 
     | 
    
         
            +
              remote: https://rubygems.org/
         
     | 
| 
      
 9 
     | 
    
         
            +
              specs:
         
     | 
| 
      
 10 
     | 
    
         
            +
                Ascii85 (2.0.1)
         
     | 
| 
      
 11 
     | 
    
         
            +
                activesupport (7.2.2.2)
         
     | 
| 
      
 12 
     | 
    
         
            +
                  base64
         
     | 
| 
      
 13 
     | 
    
         
            +
                  benchmark (>= 0.3)
         
     | 
| 
      
 14 
     | 
    
         
            +
                  bigdecimal
         
     | 
| 
      
 15 
     | 
    
         
            +
                  concurrent-ruby (~> 1.0, >= 1.3.1)
         
     | 
| 
      
 16 
     | 
    
         
            +
                  connection_pool (>= 2.2.5)
         
     | 
| 
      
 17 
     | 
    
         
            +
                  drb
         
     | 
| 
      
 18 
     | 
    
         
            +
                  i18n (>= 1.6, < 2)
         
     | 
| 
      
 19 
     | 
    
         
            +
                  logger (>= 1.4.2)
         
     | 
| 
      
 20 
     | 
    
         
            +
                  minitest (>= 5.1)
         
     | 
| 
      
 21 
     | 
    
         
            +
                  securerandom (>= 0.3)
         
     | 
| 
      
 22 
     | 
    
         
            +
                  tzinfo (~> 2.0, >= 2.0.5)
         
     | 
| 
      
 23 
     | 
    
         
            +
                addressable (2.8.7)
         
     | 
| 
      
 24 
     | 
    
         
            +
                  public_suffix (>= 2.0.2, < 7.0)
         
     | 
| 
      
 25 
     | 
    
         
            +
                afm (0.2.2)
         
     | 
| 
      
 26 
     | 
    
         
            +
                amazing_print (1.8.1)
         
     | 
| 
      
 27 
     | 
    
         
            +
                ast (2.4.3)
         
     | 
| 
      
 28 
     | 
    
         
            +
                async (2.24.0)
         
     | 
| 
      
 29 
     | 
    
         
            +
                  console (~> 1.29)
         
     | 
| 
      
 30 
     | 
    
         
            +
                  fiber-annotation
         
     | 
| 
      
 31 
     | 
    
         
            +
                  io-event (~> 1.9)
         
     | 
| 
      
 32 
     | 
    
         
            +
                  metrics (~> 0.12)
         
     | 
| 
      
 33 
     | 
    
         
            +
                  traces (~> 0.15)
         
     | 
| 
      
 34 
     | 
    
         
            +
                base64 (0.3.0)
         
     | 
| 
      
 35 
     | 
    
         
            +
                benchmark (0.5.0)
         
     | 
| 
      
 36 
     | 
    
         
            +
                bigdecimal (3.3.1)
         
     | 
| 
      
 37 
     | 
    
         
            +
                bridgetown (2.0.3)
         
     | 
| 
      
 38 
     | 
    
         
            +
                  bridgetown-builder (= 2.0.3)
         
     | 
| 
      
 39 
     | 
    
         
            +
                  bridgetown-core (= 2.0.3)
         
     | 
| 
      
 40 
     | 
    
         
            +
                  bridgetown-foundation (= 2.0.3)
         
     | 
| 
      
 41 
     | 
    
         
            +
                  bridgetown-paginate (= 2.0.3)
         
     | 
| 
      
 42 
     | 
    
         
            +
                bridgetown-builder (2.0.3)
         
     | 
| 
      
 43 
     | 
    
         
            +
                  bridgetown-core (= 2.0.3)
         
     | 
| 
      
 44 
     | 
    
         
            +
                bridgetown-core (2.0.3)
         
     | 
| 
      
 45 
     | 
    
         
            +
                  activesupport (>= 6.0, < 8.0)
         
     | 
| 
      
 46 
     | 
    
         
            +
                  addressable (~> 2.4)
         
     | 
| 
      
 47 
     | 
    
         
            +
                  amazing_print (~> 1.2)
         
     | 
| 
      
 48 
     | 
    
         
            +
                  bridgetown-foundation (= 2.0.3)
         
     | 
| 
      
 49 
     | 
    
         
            +
                  csv (~> 3.2)
         
     | 
| 
      
 50 
     | 
    
         
            +
                  dry-inflector (>= 1.0)
         
     | 
| 
      
 51 
     | 
    
         
            +
                  erubi (~> 1.9)
         
     | 
| 
      
 52 
     | 
    
         
            +
                  faraday (~> 2.0)
         
     | 
| 
      
 53 
     | 
    
         
            +
                  faraday-follow_redirects (~> 0.3)
         
     | 
| 
      
 54 
     | 
    
         
            +
                  i18n (~> 1.0)
         
     | 
| 
      
 55 
     | 
    
         
            +
                  irb (>= 1.14)
         
     | 
| 
      
 56 
     | 
    
         
            +
                  kramdown (~> 2.1)
         
     | 
| 
      
 57 
     | 
    
         
            +
                  kramdown-parser-gfm (~> 1.0)
         
     | 
| 
      
 58 
     | 
    
         
            +
                  liquid (>= 5.0, < 5.5)
         
     | 
| 
      
 59 
     | 
    
         
            +
                  listen (~> 3.0)
         
     | 
| 
      
 60 
     | 
    
         
            +
                  rack (>= 3.0)
         
     | 
| 
      
 61 
     | 
    
         
            +
                  rackup (~> 2.0)
         
     | 
| 
      
 62 
     | 
    
         
            +
                  rake (>= 13.0)
         
     | 
| 
      
 63 
     | 
    
         
            +
                  roda (~> 3.46)
         
     | 
| 
      
 64 
     | 
    
         
            +
                  rouge (>= 3.0, < 5.0)
         
     | 
| 
      
 65 
     | 
    
         
            +
                  serbea (~> 2.1)
         
     | 
| 
      
 66 
     | 
    
         
            +
                  signalize (~> 1.3)
         
     | 
| 
      
 67 
     | 
    
         
            +
                  streamlined (>= 0.6.0)
         
     | 
| 
      
 68 
     | 
    
         
            +
                  thor (~> 1.1)
         
     | 
| 
      
 69 
     | 
    
         
            +
                  tilt (~> 2.0)
         
     | 
| 
      
 70 
     | 
    
         
            +
                  zeitwerk (~> 2.5)
         
     | 
| 
      
 71 
     | 
    
         
            +
                bridgetown-foundation (2.0.3)
         
     | 
| 
      
 72 
     | 
    
         
            +
                  hash_with_dot_access (~> 2.0)
         
     | 
| 
      
 73 
     | 
    
         
            +
                  inclusive (~> 1.0)
         
     | 
| 
      
 74 
     | 
    
         
            +
                  zeitwerk (~> 2.5)
         
     | 
| 
      
 75 
     | 
    
         
            +
                bridgetown-paginate (2.0.3)
         
     | 
| 
      
 76 
     | 
    
         
            +
                  bridgetown-core (= 2.0.3)
         
     | 
| 
      
 77 
     | 
    
         
            +
                cgi (0.5.0)
         
     | 
| 
      
 78 
     | 
    
         
            +
                concurrent-ruby (1.3.5)
         
     | 
| 
      
 79 
     | 
    
         
            +
                connection_pool (2.5.4)
         
     | 
| 
      
 80 
     | 
    
         
            +
                console (1.30.2)
         
     | 
| 
      
 81 
     | 
    
         
            +
                  fiber-annotation
         
     | 
| 
      
 82 
     | 
    
         
            +
                  fiber-local (~> 1.1)
         
     | 
| 
      
 83 
     | 
    
         
            +
                  json
         
     | 
| 
      
 84 
     | 
    
         
            +
                csv (3.3.5)
         
     | 
| 
      
 85 
     | 
    
         
            +
                date (3.4.1)
         
     | 
| 
      
 86 
     | 
    
         
            +
                diff-lcs (1.6.2)
         
     | 
| 
      
 87 
     | 
    
         
            +
                drb (2.2.3)
         
     | 
| 
      
 88 
     | 
    
         
            +
                dry-inflector (1.2.0)
         
     | 
| 
      
 89 
     | 
    
         
            +
                erb (4.0.4)
         
     | 
| 
      
 90 
     | 
    
         
            +
                  cgi (>= 0.3.3)
         
     | 
| 
      
 91 
     | 
    
         
            +
                erubi (1.13.1)
         
     | 
| 
      
 92 
     | 
    
         
            +
                ethon (0.17.0)
         
     | 
| 
      
 93 
     | 
    
         
            +
                  ffi (>= 1.15.0)
         
     | 
| 
      
 94 
     | 
    
         
            +
                faraday (2.14.0)
         
     | 
| 
      
 95 
     | 
    
         
            +
                  faraday-net_http (>= 2.0, < 3.5)
         
     | 
| 
      
 96 
     | 
    
         
            +
                  json
         
     | 
| 
      
 97 
     | 
    
         
            +
                  logger
         
     | 
| 
      
 98 
     | 
    
         
            +
                faraday-follow_redirects (0.4.0)
         
     | 
| 
      
 99 
     | 
    
         
            +
                  faraday (>= 1, < 3)
         
     | 
| 
      
 100 
     | 
    
         
            +
                faraday-net_http (3.4.1)
         
     | 
| 
      
 101 
     | 
    
         
            +
                  net-http (>= 0.5.0)
         
     | 
| 
      
 102 
     | 
    
         
            +
                ffi (1.17.2-aarch64-linux-gnu)
         
     | 
| 
      
 103 
     | 
    
         
            +
                ffi (1.17.2-aarch64-linux-musl)
         
     | 
| 
      
 104 
     | 
    
         
            +
                ffi (1.17.2-arm-linux-gnu)
         
     | 
| 
      
 105 
     | 
    
         
            +
                ffi (1.17.2-arm-linux-musl)
         
     | 
| 
      
 106 
     | 
    
         
            +
                ffi (1.17.2-arm64-darwin)
         
     | 
| 
      
 107 
     | 
    
         
            +
                ffi (1.17.2-x86_64-darwin)
         
     | 
| 
      
 108 
     | 
    
         
            +
                ffi (1.17.2-x86_64-linux-gnu)
         
     | 
| 
      
 109 
     | 
    
         
            +
                ffi (1.17.2-x86_64-linux-musl)
         
     | 
| 
      
 110 
     | 
    
         
            +
                fiber-annotation (0.2.0)
         
     | 
| 
      
 111 
     | 
    
         
            +
                fiber-local (1.1.0)
         
     | 
| 
      
 112 
     | 
    
         
            +
                  fiber-storage
         
     | 
| 
      
 113 
     | 
    
         
            +
                fiber-storage (1.0.1)
         
     | 
| 
      
 114 
     | 
    
         
            +
                hash_with_dot_access (2.2.0)
         
     | 
| 
      
 115 
     | 
    
         
            +
                hashery (2.1.2)
         
     | 
| 
      
 116 
     | 
    
         
            +
                html-proofer (5.0.10)
         
     | 
| 
      
 117 
     | 
    
         
            +
                  addressable (~> 2.3)
         
     | 
| 
      
 118 
     | 
    
         
            +
                  async (~> 2.1)
         
     | 
| 
      
 119 
     | 
    
         
            +
                  nokogiri (~> 1.13)
         
     | 
| 
      
 120 
     | 
    
         
            +
                  pdf-reader (~> 2.11)
         
     | 
| 
      
 121 
     | 
    
         
            +
                  rainbow (~> 3.0)
         
     | 
| 
      
 122 
     | 
    
         
            +
                  typhoeus (~> 1.3)
         
     | 
| 
      
 123 
     | 
    
         
            +
                  yell (~> 2.0)
         
     | 
| 
      
 124 
     | 
    
         
            +
                  zeitwerk (~> 2.5)
         
     | 
| 
      
 125 
     | 
    
         
            +
                i18n (1.14.7)
         
     | 
| 
      
 126 
     | 
    
         
            +
                  concurrent-ruby (~> 1.0)
         
     | 
| 
      
 127 
     | 
    
         
            +
                inclusive (1.1.0)
         
     | 
| 
      
 128 
     | 
    
         
            +
                io-console (0.8.1)
         
     | 
| 
      
 129 
     | 
    
         
            +
                io-event (1.11.2)
         
     | 
| 
      
 130 
     | 
    
         
            +
                irb (1.15.2)
         
     | 
| 
      
 131 
     | 
    
         
            +
                  pp (>= 0.6.0)
         
     | 
| 
      
 132 
     | 
    
         
            +
                  rdoc (>= 4.0.0)
         
     | 
| 
      
 133 
     | 
    
         
            +
                  reline (>= 0.4.2)
         
     | 
| 
      
 134 
     | 
    
         
            +
                json (2.15.2)
         
     | 
| 
      
 135 
     | 
    
         
            +
                kramdown (2.5.1)
         
     | 
| 
      
 136 
     | 
    
         
            +
                  rexml (>= 3.3.9)
         
     | 
| 
      
 137 
     | 
    
         
            +
                kramdown-parser-gfm (1.1.0)
         
     | 
| 
      
 138 
     | 
    
         
            +
                  kramdown (~> 2.0)
         
     | 
| 
      
 139 
     | 
    
         
            +
                language_server-protocol (3.17.0.5)
         
     | 
| 
      
 140 
     | 
    
         
            +
                lint_roller (1.1.0)
         
     | 
| 
      
 141 
     | 
    
         
            +
                liquid (5.4.0)
         
     | 
| 
      
 142 
     | 
    
         
            +
                listen (3.9.0)
         
     | 
| 
      
 143 
     | 
    
         
            +
                  rb-fsevent (~> 0.10, >= 0.10.3)
         
     | 
| 
      
 144 
     | 
    
         
            +
                  rb-inotify (~> 0.9, >= 0.9.10)
         
     | 
| 
      
 145 
     | 
    
         
            +
                logger (1.7.0)
         
     | 
| 
      
 146 
     | 
    
         
            +
                metrics (0.12.2)
         
     | 
| 
      
 147 
     | 
    
         
            +
                minitest (5.26.0)
         
     | 
| 
      
 148 
     | 
    
         
            +
                net-http (0.6.0)
         
     | 
| 
      
 149 
     | 
    
         
            +
                  uri
         
     | 
| 
      
 150 
     | 
    
         
            +
                nokogiri (1.18.10-aarch64-linux-gnu)
         
     | 
| 
      
 151 
     | 
    
         
            +
                  racc (~> 1.4)
         
     | 
| 
      
 152 
     | 
    
         
            +
                nokogiri (1.18.10-aarch64-linux-musl)
         
     | 
| 
      
 153 
     | 
    
         
            +
                  racc (~> 1.4)
         
     | 
| 
      
 154 
     | 
    
         
            +
                nokogiri (1.18.10-arm-linux-gnu)
         
     | 
| 
      
 155 
     | 
    
         
            +
                  racc (~> 1.4)
         
     | 
| 
      
 156 
     | 
    
         
            +
                nokogiri (1.18.10-arm-linux-musl)
         
     | 
| 
      
 157 
     | 
    
         
            +
                  racc (~> 1.4)
         
     | 
| 
      
 158 
     | 
    
         
            +
                nokogiri (1.18.10-arm64-darwin)
         
     | 
| 
      
 159 
     | 
    
         
            +
                  racc (~> 1.4)
         
     | 
| 
      
 160 
     | 
    
         
            +
                nokogiri (1.18.10-x86_64-darwin)
         
     | 
| 
      
 161 
     | 
    
         
            +
                  racc (~> 1.4)
         
     | 
| 
      
 162 
     | 
    
         
            +
                nokogiri (1.18.10-x86_64-linux-gnu)
         
     | 
| 
      
 163 
     | 
    
         
            +
                  racc (~> 1.4)
         
     | 
| 
      
 164 
     | 
    
         
            +
                nokogiri (1.18.10-x86_64-linux-musl)
         
     | 
| 
      
 165 
     | 
    
         
            +
                  racc (~> 1.4)
         
     | 
| 
      
 166 
     | 
    
         
            +
                parallel (1.27.0)
         
     | 
| 
      
 167 
     | 
    
         
            +
                parser (3.3.10.0)
         
     | 
| 
      
 168 
     | 
    
         
            +
                  ast (~> 2.4.1)
         
     | 
| 
      
 169 
     | 
    
         
            +
                  racc
         
     | 
| 
      
 170 
     | 
    
         
            +
                pdf-reader (2.15.0)
         
     | 
| 
      
 171 
     | 
    
         
            +
                  Ascii85 (>= 1.0, < 3.0, != 2.0.0)
         
     | 
| 
      
 172 
     | 
    
         
            +
                  afm (>= 0.2.1, < 2)
         
     | 
| 
      
 173 
     | 
    
         
            +
                  hashery (~> 2.0)
         
     | 
| 
      
 174 
     | 
    
         
            +
                  ruby-rc4
         
     | 
| 
      
 175 
     | 
    
         
            +
                  ttfunk
         
     | 
| 
      
 176 
     | 
    
         
            +
                pp (0.6.3)
         
     | 
| 
      
 177 
     | 
    
         
            +
                  prettyprint
         
     | 
| 
      
 178 
     | 
    
         
            +
                prettyprint (0.2.0)
         
     | 
| 
      
 179 
     | 
    
         
            +
                prism (1.6.0)
         
     | 
| 
      
 180 
     | 
    
         
            +
                psych (5.2.6)
         
     | 
| 
      
 181 
     | 
    
         
            +
                  date
         
     | 
| 
      
 182 
     | 
    
         
            +
                  stringio
         
     | 
| 
      
 183 
     | 
    
         
            +
                public_suffix (6.0.2)
         
     | 
| 
      
 184 
     | 
    
         
            +
                racc (1.8.1)
         
     | 
| 
      
 185 
     | 
    
         
            +
                rack (3.2.3)
         
     | 
| 
      
 186 
     | 
    
         
            +
                rackup (2.2.1)
         
     | 
| 
      
 187 
     | 
    
         
            +
                  rack (>= 3)
         
     | 
| 
      
 188 
     | 
    
         
            +
                rainbow (3.1.1)
         
     | 
| 
      
 189 
     | 
    
         
            +
                rake (13.3.0)
         
     | 
| 
      
 190 
     | 
    
         
            +
                rb-fsevent (0.11.2)
         
     | 
| 
      
 191 
     | 
    
         
            +
                rb-inotify (0.11.1)
         
     | 
| 
      
 192 
     | 
    
         
            +
                  ffi (~> 1.0)
         
     | 
| 
      
 193 
     | 
    
         
            +
                rdoc (6.15.0)
         
     | 
| 
      
 194 
     | 
    
         
            +
                  erb
         
     | 
| 
      
 195 
     | 
    
         
            +
                  psych (>= 4.0.0)
         
     | 
| 
      
 196 
     | 
    
         
            +
                  tsort
         
     | 
| 
      
 197 
     | 
    
         
            +
                regexp_parser (2.11.3)
         
     | 
| 
      
 198 
     | 
    
         
            +
                reline (0.6.2)
         
     | 
| 
      
 199 
     | 
    
         
            +
                  io-console (~> 0.5)
         
     | 
| 
      
 200 
     | 
    
         
            +
                rexml (3.4.4)
         
     | 
| 
      
 201 
     | 
    
         
            +
                roda (3.97.0)
         
     | 
| 
      
 202 
     | 
    
         
            +
                  rack
         
     | 
| 
      
 203 
     | 
    
         
            +
                rouge (4.6.1)
         
     | 
| 
      
 204 
     | 
    
         
            +
                rspec (3.13.2)
         
     | 
| 
      
 205 
     | 
    
         
            +
                  rspec-core (~> 3.13.0)
         
     | 
| 
      
 206 
     | 
    
         
            +
                  rspec-expectations (~> 3.13.0)
         
     | 
| 
      
 207 
     | 
    
         
            +
                  rspec-mocks (~> 3.13.0)
         
     | 
| 
      
 208 
     | 
    
         
            +
                rspec-core (3.13.6)
         
     | 
| 
      
 209 
     | 
    
         
            +
                  rspec-support (~> 3.13.0)
         
     | 
| 
      
 210 
     | 
    
         
            +
                rspec-expectations (3.13.5)
         
     | 
| 
      
 211 
     | 
    
         
            +
                  diff-lcs (>= 1.2.0, < 2.0)
         
     | 
| 
      
 212 
     | 
    
         
            +
                  rspec-support (~> 3.13.0)
         
     | 
| 
      
 213 
     | 
    
         
            +
                rspec-mocks (3.13.6)
         
     | 
| 
      
 214 
     | 
    
         
            +
                  diff-lcs (>= 1.2.0, < 2.0)
         
     | 
| 
      
 215 
     | 
    
         
            +
                  rspec-support (~> 3.13.0)
         
     | 
| 
      
 216 
     | 
    
         
            +
                rspec-support (3.13.6)
         
     | 
| 
      
 217 
     | 
    
         
            +
                rubocop (1.81.6)
         
     | 
| 
      
 218 
     | 
    
         
            +
                  json (~> 2.3)
         
     | 
| 
      
 219 
     | 
    
         
            +
                  language_server-protocol (~> 3.17.0.2)
         
     | 
| 
      
 220 
     | 
    
         
            +
                  lint_roller (~> 1.1.0)
         
     | 
| 
      
 221 
     | 
    
         
            +
                  parallel (~> 1.10)
         
     | 
| 
      
 222 
     | 
    
         
            +
                  parser (>= 3.3.0.2)
         
     | 
| 
      
 223 
     | 
    
         
            +
                  rainbow (>= 2.2.2, < 4.0)
         
     | 
| 
      
 224 
     | 
    
         
            +
                  regexp_parser (>= 2.9.3, < 3.0)
         
     | 
| 
      
 225 
     | 
    
         
            +
                  rubocop-ast (>= 1.47.1, < 2.0)
         
     | 
| 
      
 226 
     | 
    
         
            +
                  ruby-progressbar (~> 1.7)
         
     | 
| 
      
 227 
     | 
    
         
            +
                  unicode-display_width (>= 2.4.0, < 4.0)
         
     | 
| 
      
 228 
     | 
    
         
            +
                rubocop-ast (1.47.1)
         
     | 
| 
      
 229 
     | 
    
         
            +
                  parser (>= 3.3.7.2)
         
     | 
| 
      
 230 
     | 
    
         
            +
                  prism (~> 1.4)
         
     | 
| 
      
 231 
     | 
    
         
            +
                rubocop-bridgetown (0.7.0)
         
     | 
| 
      
 232 
     | 
    
         
            +
                  rubocop (~> 1.72)
         
     | 
| 
      
 233 
     | 
    
         
            +
                  rubocop-performance (~> 1.24)
         
     | 
| 
      
 234 
     | 
    
         
            +
                rubocop-performance (1.26.1)
         
     | 
| 
      
 235 
     | 
    
         
            +
                  lint_roller (~> 1.1)
         
     | 
| 
      
 236 
     | 
    
         
            +
                  rubocop (>= 1.75.0, < 2.0)
         
     | 
| 
      
 237 
     | 
    
         
            +
                  rubocop-ast (>= 1.47.1, < 2.0)
         
     | 
| 
      
 238 
     | 
    
         
            +
                ruby-progressbar (1.13.0)
         
     | 
| 
      
 239 
     | 
    
         
            +
                ruby-rc4 (0.1.5)
         
     | 
| 
      
 240 
     | 
    
         
            +
                securerandom (0.4.1)
         
     | 
| 
      
 241 
     | 
    
         
            +
                serbea (2.3.0)
         
     | 
| 
      
 242 
     | 
    
         
            +
                  erubi (>= 1.11)
         
     | 
| 
      
 243 
     | 
    
         
            +
                  tilt (>= 2.1)
         
     | 
| 
      
 244 
     | 
    
         
            +
                signalize (1.3.1)
         
     | 
| 
      
 245 
     | 
    
         
            +
                  concurrent-ruby (~> 1.2)
         
     | 
| 
      
 246 
     | 
    
         
            +
                streamlined (0.6.1)
         
     | 
| 
      
 247 
     | 
    
         
            +
                  serbea (>= 2.1)
         
     | 
| 
      
 248 
     | 
    
         
            +
                  zeitwerk (~> 2.5)
         
     | 
| 
      
 249 
     | 
    
         
            +
                stringio (3.1.7)
         
     | 
| 
      
 250 
     | 
    
         
            +
                thor (1.4.0)
         
     | 
| 
      
 251 
     | 
    
         
            +
                tilt (2.6.1)
         
     | 
| 
      
 252 
     | 
    
         
            +
                traces (0.15.2)
         
     | 
| 
      
 253 
     | 
    
         
            +
                tsort (0.2.0)
         
     | 
| 
      
 254 
     | 
    
         
            +
                ttfunk (1.8.0)
         
     | 
| 
      
 255 
     | 
    
         
            +
                  bigdecimal (~> 3.1)
         
     | 
| 
      
 256 
     | 
    
         
            +
                typhoeus (1.4.1)
         
     | 
| 
      
 257 
     | 
    
         
            +
                  ethon (>= 0.9.0)
         
     | 
| 
      
 258 
     | 
    
         
            +
                tzinfo (2.0.6)
         
     | 
| 
      
 259 
     | 
    
         
            +
                  concurrent-ruby (~> 1.0)
         
     | 
| 
      
 260 
     | 
    
         
            +
                unicode-display_width (3.2.0)
         
     | 
| 
      
 261 
     | 
    
         
            +
                  unicode-emoji (~> 4.1)
         
     | 
| 
      
 262 
     | 
    
         
            +
                unicode-emoji (4.1.0)
         
     | 
| 
      
 263 
     | 
    
         
            +
                uri (1.0.4)
         
     | 
| 
      
 264 
     | 
    
         
            +
                yell (2.2.2)
         
     | 
| 
      
 265 
     | 
    
         
            +
                zeitwerk (2.6.18)
         
     | 
| 
      
 266 
     | 
    
         
            +
             
     | 
| 
      
 267 
     | 
    
         
            +
            PLATFORMS
         
     | 
| 
      
 268 
     | 
    
         
            +
              aarch64-linux-gnu
         
     | 
| 
      
 269 
     | 
    
         
            +
              aarch64-linux-musl
         
     | 
| 
      
 270 
     | 
    
         
            +
              arm-linux-gnu
         
     | 
| 
      
 271 
     | 
    
         
            +
              arm-linux-musl
         
     | 
| 
      
 272 
     | 
    
         
            +
              arm64-darwin
         
     | 
| 
      
 273 
     | 
    
         
            +
              x86_64-darwin
         
     | 
| 
      
 274 
     | 
    
         
            +
              x86_64-linux-gnu
         
     | 
| 
      
 275 
     | 
    
         
            +
              x86_64-linux-musl
         
     | 
| 
      
 276 
     | 
    
         
            +
             
     | 
| 
      
 277 
     | 
    
         
            +
            DEPENDENCIES
         
     | 
| 
      
 278 
     | 
    
         
            +
              bridgetown (= 2.0.3)
         
     | 
| 
      
 279 
     | 
    
         
            +
              bridgetown-seo-tag!
         
     | 
| 
      
 280 
     | 
    
         
            +
              bundler (>= 1.15)
         
     | 
| 
      
 281 
     | 
    
         
            +
              ffi
         
     | 
| 
      
 282 
     | 
    
         
            +
              html-proofer (~> 5.0)
         
     | 
| 
      
 283 
     | 
    
         
            +
              rake (~> 13.0)
         
     | 
| 
      
 284 
     | 
    
         
            +
              rspec (~> 3.5)
         
     | 
| 
      
 285 
     | 
    
         
            +
              rubocop-bridgetown (~> 0.3)
         
     | 
| 
      
 286 
     | 
    
         
            +
             
     | 
| 
      
 287 
     | 
    
         
            +
            BUNDLED WITH
         
     | 
| 
      
 288 
     | 
    
         
            +
               2.5.6
         
     | 
    
        data/README.md
    CHANGED
    
    | 
         @@ -4,21 +4,31 @@ A Bridgetown plugin to add metadata tags for search engines and social networks 
     | 
|
| 
       4 
4 
     | 
    
         | 
| 
       5 
5 
     | 
    
         
             
            [](https://badge.fury.io/rb/bridgetown-seo-tag)
         
     | 
| 
       6 
6 
     | 
    
         | 
| 
       7 
     | 
    
         
            -
            ## Installation
         
     | 
| 
      
 7 
     | 
    
         
            +
            ## Installation for Bridgetown 1.2+
         
     | 
| 
       8 
8 
     | 
    
         | 
| 
       9 
9 
     | 
    
         
             
            Run this command to add this plugin to your site's Gemfile:
         
     | 
| 
       10 
10 
     | 
    
         | 
| 
       11 
11 
     | 
    
         
             
            ```shell
         
     | 
| 
       12 
     | 
    
         
            -
            $ bundle add bridgetown-seo-tag 
     | 
| 
      
 12 
     | 
    
         
            +
            $ bundle add bridgetown-seo-tag
         
     | 
| 
       13 
13 
     | 
    
         
             
            ```
         
     | 
| 
       14 
14 
     | 
    
         | 
| 
       15 
15 
     | 
    
         
             
            Or simply add this line to your Gemfile:
         
     | 
| 
       16 
16 
     | 
    
         | 
| 
       17 
17 
     | 
    
         
             
            ```ruby
         
     | 
| 
       18 
     | 
    
         
            -
            gem 'bridgetown-seo-tag' 
     | 
| 
      
 18 
     | 
    
         
            +
            gem 'bridgetown-seo-tag'
         
     | 
| 
       19 
19 
     | 
    
         
             
            ```
         
     | 
| 
       20 
20 
     | 
    
         | 
| 
       21 
     | 
    
         
            -
            And then add the  
     | 
| 
      
 21 
     | 
    
         
            +
            And then add the initializer to your configuration in `config/initializers.rb`:
         
     | 
| 
      
 22 
     | 
    
         
            +
             
     | 
| 
      
 23 
     | 
    
         
            +
            ```ruby
         
     | 
| 
      
 24 
     | 
    
         
            +
            init :"bridgetown-seo-tag"
         
     | 
| 
      
 25 
     | 
    
         
            +
            ```
         
     | 
| 
      
 26 
     | 
    
         
            +
             
     | 
| 
      
 27 
     | 
    
         
            +
            (For Bridgetown 1.1 or earlier, [read these instructions](https://github.com/bridgetownrb/bridgetown-seo-tag/tree/v5.0.0).)
         
     | 
| 
      
 28 
     | 
    
         
            +
             
     | 
| 
      
 29 
     | 
    
         
            +
            ## Summary
         
     | 
| 
      
 30 
     | 
    
         
            +
             
     | 
| 
      
 31 
     | 
    
         
            +
            Add the Liquid tag to your HTML head:
         
     | 
| 
       22 
32 
     | 
    
         | 
| 
       23 
33 
     | 
    
         
             
            ```liquid
         
     | 
| 
       24 
34 
     | 
    
         
             
            {% seo %}
         
     | 
| 
         @@ -38,8 +48,6 @@ You can use the `seo` helper in Ruby templates as well: 
     | 
|
| 
       38 
48 
     | 
    
         
             
            <%= seo title: false %>
         
     | 
| 
       39 
49 
     | 
    
         
             
            ```
         
     | 
| 
       40 
50 
     | 
    
         | 
| 
       41 
     | 
    
         
            -
            ## Summary
         
     | 
| 
       42 
     | 
    
         
            -
             
     | 
| 
       43 
51 
     | 
    
         
             
            Bridgetown SEO Tag adds the following meta tags to your site:
         
     | 
| 
       44 
52 
     | 
    
         | 
| 
       45 
53 
     | 
    
         
             
            * Page title, with site title or description appended (optional)
         
     | 
| 
         @@ -47,6 +55,7 @@ Bridgetown SEO Tag adds the following meta tags to your site: 
     | 
|
| 
       47 
55 
     | 
    
         
             
            * Canonical URL
         
     | 
| 
       48 
56 
     | 
    
         
             
            * Next and previous URLs on paginated pages
         
     | 
| 
       49 
57 
     | 
    
         
             
            * [Open Graph](https://ogp.me/) title, description, site title, and URL (for Facebook, LinkedIn, etc.)
         
     | 
| 
      
 58 
     | 
    
         
            +
            * Mastodon [verification](https://docs.joinmastodon.org/user/profile/#verification) and [attribution](https://blog.joinmastodon.org/2024/07/highlighting-journalism-on-mastodon/)
         
     | 
| 
       50 
59 
     | 
    
         
             
            * [Twitter Summary Card](https://developer.twitter.com/en/docs/tweets/optimize-with-cards/guides/getting-started) metadata
         
     | 
| 
       51 
60 
     | 
    
         | 
| 
       52 
61 
     | 
    
         
             
            While you could theoretically add the necessary metadata tags yourself, Bridgetown SEO Tag provides a battle-tested template of crowdsourced best-practices.
         
     | 
| 
         @@ -67,6 +76,8 @@ The SEO tag will respect any of the following if included in your site's `site_m 
     | 
|
| 
       67 
76 
     | 
    
         
             
            * `description` - A longer description used for the description meta tag. Also used as fallback for documents that don't provide their own `description` and as part of the home page title tag if `tagline` is not defined.
         
     | 
| 
       68 
77 
     | 
    
         
             
            * `author` - global author information (see [Advanced usage](https://github.com/bridgetownrb/bridgetown-seo-tag/wiki/Advanced-Usage#author-information))
         
     | 
| 
       69 
78 
     | 
    
         | 
| 
      
 79 
     | 
    
         
            +
            * `mastodon` - Your Mastodon handle, to both verify your Mastodon profile, and link to your profile when someone shares your content on the network. If the page metadata contains a `mastodon` entry, it will take precedence over `site_metadata.yml`.
         
     | 
| 
      
 80 
     | 
    
         
            +
             
     | 
| 
       70 
81 
     | 
    
         
             
            * `twitter` - You can add a single Twitter handle to be used in Twitter card tags, like "bridgetownrb". Or you use a YAML mapping with additional details:
         
     | 
| 
       71 
82 
     | 
    
         
             
              * `twitter:card` - The site's default card type
         
     | 
| 
       72 
83 
     | 
    
         
             
              * `twitter:username` - The site's Twitter handle
         
     | 
| 
         @@ -117,7 +128,7 @@ The SEO tag will respect the following YAML front matter if included in a post, 
     | 
|
| 
       117 
128 
     | 
    
         | 
| 
       118 
129 
     | 
    
         
             
            ### Setting a default image
         
     | 
| 
       119 
130 
     | 
    
         | 
| 
       120 
     | 
    
         
            -
            You can define a default image using [Front Matter defaults](https://www.bridgetownrb.com/docs/ 
     | 
| 
      
 131 
     | 
    
         
            +
            You can define a default image using [Front Matter defaults](https://www.bridgetownrb.com/docs/content/front-matter-defaults/) to provide a default Twitter Card or Open Graph image to all of your documents.
         
     | 
| 
       121 
132 
     | 
    
         | 
| 
       122 
133 
     | 
    
         
             
            Here is a very basic example, that you are encouraged to adapt to your needs:
         
     | 
| 
       123 
134 
     | 
    
         | 
    
        data/bridgetown-seo-tag.gemspec
    CHANGED
    
    | 
         @@ -11,17 +11,11 @@ Gem::Specification.new do |spec| 
     | 
|
| 
       11 
11 
     | 
    
         
             
              spec.homepage      = "https://github.com/bridgetownrb/bridgetown-seo-tag"
         
     | 
| 
       12 
12 
     | 
    
         
             
              spec.license       = "MIT"
         
     | 
| 
       13 
13 
     | 
    
         | 
| 
       14 
     | 
    
         
            -
              spec.required_ruby_version = ">=  
     | 
| 
      
 14 
     | 
    
         
            +
              spec.required_ruby_version = ">= 3.1.0"
         
     | 
| 
       15 
15 
     | 
    
         | 
| 
       16 
16 
     | 
    
         
             
              spec.files         = `git ls-files -z`.split("\x0").reject { |f| f.match(%r!^(test|script|spec|features)/!) }
         
     | 
| 
       17 
17 
     | 
    
         
             
              spec.require_paths = ["lib"]
         
     | 
| 
       18 
18 
     | 
    
         | 
| 
       19 
     | 
    
         
            -
              spec.add_dependency "bridgetown", ">= 1. 
     | 
| 
       20 
     | 
    
         
            -
             
     | 
| 
       21 
     | 
    
         
            -
              spec.add_development_dependency "bundler", ">= 1.15"
         
     | 
| 
       22 
     | 
    
         
            -
              spec.add_development_dependency "html-proofer", "~> 3.7"
         
     | 
| 
       23 
     | 
    
         
            -
              spec.add_development_dependency "rake", "~> 13.0"
         
     | 
| 
       24 
     | 
    
         
            -
              spec.add_development_dependency "rspec", "~> 3.5"
         
     | 
| 
       25 
     | 
    
         
            -
              spec.add_development_dependency "rubocop-bridgetown", "~> 0.3"
         
     | 
| 
      
 19 
     | 
    
         
            +
              spec.add_dependency "bridgetown", ">= 1.3"
         
     | 
| 
       26 
20 
     | 
    
         
             
              spec.metadata["rubygems_mfa_required"] = "true"
         
     | 
| 
       27 
21 
     | 
    
         
             
            end
         
     | 
| 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            # frozen_string_literal: true
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
3 
     | 
    
         
             
            module Bridgetown
         
     | 
| 
       4 
     | 
    
         
            -
               
     | 
| 
      
 4 
     | 
    
         
            +
              module SeoTag
         
     | 
| 
       5 
5 
     | 
    
         
             
                # A drop representing the current page's author
         
     | 
| 
       6 
6 
     | 
    
         
             
                #
         
     | 
| 
       7 
7 
     | 
    
         
             
                # Author name will be pulled from:
         
     | 
| 
         @@ -55,7 +55,7 @@ module Bridgetown 
     | 
|
| 
       55 
55 
     | 
    
         
             
                    @resolved_author = sources.find { |s| !s.to_s.empty? }
         
     | 
| 
       56 
56 
     | 
    
         
             
                  end
         
     | 
| 
       57 
57 
     | 
    
         | 
| 
       58 
     | 
    
         
            -
                  # If resolved_author is a string, attempts to find  
     | 
| 
      
 58 
     | 
    
         
            +
                  # If resolved_author is a string, attempts to find corresponding author
         
     | 
| 
       59 
59 
     | 
    
         
             
                  # metadata in `site.data.authors`
         
     | 
| 
       60 
60 
     | 
    
         
             
                  #
         
     | 
| 
       61 
61 
     | 
    
         
             
                  # Returns a hash representing additional metadata or an empty hash
         
     | 
| 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            # frozen_string_literal: true
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
3 
     | 
    
         
             
            module Bridgetown
         
     | 
| 
       4 
     | 
    
         
            -
               
     | 
| 
      
 4 
     | 
    
         
            +
              module SeoTag
         
     | 
| 
       5 
5 
     | 
    
         
             
                class Drop < Bridgetown::Drops::Drop
         
     | 
| 
       6 
6 
     | 
    
         
             
                  include Bridgetown::SeoTag::UrlHelper
         
     | 
| 
       7 
7 
     | 
    
         | 
| 
         @@ -10,7 +10,7 @@ module Bridgetown 
     | 
|
| 
       10 
10 
     | 
    
         
             
                  FORMAT_STRING_METHODS = [
         
     | 
| 
       11 
11 
     | 
    
         
             
                    :markdownify, :strip_html, :normalize_whitespace, :escape_once,
         
     | 
| 
       12 
12 
     | 
    
         
             
                  ].freeze
         
     | 
| 
       13 
     | 
    
         
            -
                  HOMEPAGE_OR_ABOUT_REGEX = %r!^/(about/)?(index.html?) 
     | 
| 
      
 13 
     | 
    
         
            +
                  HOMEPAGE_OR_ABOUT_REGEX = %r!^/(about/)?(index.html?)?$!
         
     | 
| 
       14 
14 
     | 
    
         | 
| 
       15 
15 
     | 
    
         
             
                  def initialize(text, context)
         
     | 
| 
       16 
16 
     | 
    
         
             
                    @obj = {}
         
     | 
| 
         @@ -49,7 +49,7 @@ module Bridgetown 
     | 
|
| 
       49 
49 
     | 
    
         
             
                  # Page title without site title or description appended
         
     | 
| 
       50 
50 
     | 
    
         
             
                  def page_title
         
     | 
| 
       51 
51 
     | 
    
         
             
                    @page_title ||= format_string(
         
     | 
| 
       52 
     | 
    
         
            -
                      if (page["title"] == "Index" || page["title"]. 
     | 
| 
      
 52 
     | 
    
         
            +
                      if (page["title"] == "Index" || page["title"].to_s.empty?) &&
         
     | 
| 
       53 
53 
     | 
    
         
             
                          site_tagline_or_description
         
     | 
| 
       54 
54 
     | 
    
         
             
                        "#{site_title}#{TAGLINE_SEPARATOR}#{site_tagline_or_description}"
         
     | 
| 
       55 
55 
     | 
    
         
             
                      else
         
     | 
| 
         @@ -71,8 +71,6 @@ module Bridgetown 
     | 
|
| 
       71 
71 
     | 
    
         
             
                                 page_title || site_title
         
     | 
| 
       72 
72 
     | 
    
         
             
                               end
         
     | 
| 
       73 
73 
     | 
    
         | 
| 
       74 
     | 
    
         
            -
                    return page_number + @title if page_number
         
     | 
| 
       75 
     | 
    
         
            -
             
     | 
| 
       76 
74 
     | 
    
         
             
                    @title
         
     | 
| 
       77 
75 
     | 
    
         
             
                  end
         
     | 
| 
       78 
76 
     | 
    
         | 
| 
         @@ -102,7 +100,7 @@ module Bridgetown 
     | 
|
| 
       102 
100 
     | 
    
         
             
                  end
         
     | 
| 
       103 
101 
     | 
    
         | 
| 
       104 
102 
     | 
    
         
             
                  # Returns a Drop representing the page's image
         
     | 
| 
       105 
     | 
    
         
            -
                  # Returns nil if the image has no path, to preserve backwards  
     | 
| 
      
 103 
     | 
    
         
            +
                  # Returns nil if the image has no path, to preserve backwards compatibility
         
     | 
| 
       106 
104 
     | 
    
         
             
                  def image
         
     | 
| 
       107 
105 
     | 
    
         
             
                    @image ||= ImageDrop.new(page: page, context: @context)
         
     | 
| 
       108 
106 
     | 
    
         
             
                    @image if @image.path
         
     | 
| 
         @@ -159,10 +157,10 @@ module Bridgetown 
     | 
|
| 
       159 
157 
     | 
    
         
             
                    @page_lang ||= page["lang"] || site["lang"] || "en_US"
         
     | 
| 
       160 
158 
     | 
    
         
             
                  end
         
     | 
| 
       161 
159 
     | 
    
         | 
| 
       162 
     | 
    
         
            -
                  def canonical_url
         
     | 
| 
       163 
     | 
    
         
            -
                    @canonical_url ||= if page["canonical_url"].to_s. 
     | 
| 
      
 160 
     | 
    
         
            +
                  def canonical_url # rubocop:todo Metrics/AbcSize
         
     | 
| 
      
 161 
     | 
    
         
            +
                    @canonical_url ||= if page["canonical_url"].to_s.length.positive?
         
     | 
| 
       164 
162 
     | 
    
         
             
                                         page["canonical_url"]
         
     | 
| 
       165 
     | 
    
         
            -
                                       elsif page["url"].to_s. 
     | 
| 
      
 163 
     | 
    
         
            +
                                       elsif page["url"].to_s.length.positive?
         
     | 
| 
       166 
164 
     | 
    
         
             
                                         filters.absolute_url(page["url"]).to_s.gsub(%r!/index\.html$!, "/")
         
     | 
| 
       167 
165 
     | 
    
         
             
                                       else
         
     | 
| 
       168 
166 
     | 
    
         
             
                                         filters.absolute_url(page["relative_url"]).to_s.gsub(
         
     | 
| 
         @@ -189,16 +187,6 @@ module Bridgetown 
     | 
|
| 
       189 
187 
     | 
    
         
             
                    page["url"] =~ HOMEPAGE_OR_ABOUT_REGEX
         
     | 
| 
       190 
188 
     | 
    
         
             
                  end
         
     | 
| 
       191 
189 
     | 
    
         | 
| 
       192 
     | 
    
         
            -
                  def page_number
         
     | 
| 
       193 
     | 
    
         
            -
                    return unless @context["paginator"] && @context["paginator"]["page"]
         
     | 
| 
       194 
     | 
    
         
            -
             
     | 
| 
       195 
     | 
    
         
            -
                    current = @context["paginator"]["page"]
         
     | 
| 
       196 
     | 
    
         
            -
                    total = @context["paginator"]["total_pages"]
         
     | 
| 
       197 
     | 
    
         
            -
                    paginator_message = site["seo_paginator_message"] || "Page %<current>s of %<total>s for "
         
     | 
| 
       198 
     | 
    
         
            -
             
     | 
| 
       199 
     | 
    
         
            -
                    format(paginator_message, current: current, total: total) if current > 1
         
     | 
| 
       200 
     | 
    
         
            -
                  end
         
     | 
| 
       201 
     | 
    
         
            -
             
     | 
| 
       202 
190 
     | 
    
         
             
                  attr_reader :context
         
     | 
| 
       203 
191 
     | 
    
         | 
| 
       204 
192 
     | 
    
         
             
                  def fallback_data
         
     | 
| 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            # frozen_string_literal: true
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
3 
     | 
    
         
             
            module Bridgetown
         
     | 
| 
       4 
     | 
    
         
            -
               
     | 
| 
      
 4 
     | 
    
         
            +
              module SeoTag
         
     | 
| 
       5 
5 
     | 
    
         
             
                # A drop representing the page image
         
     | 
| 
       6 
6 
     | 
    
         
             
                # The image path will be pulled from:
         
     | 
| 
       7 
7 
     | 
    
         
             
                #
         
     | 
| 
         @@ -24,7 +24,7 @@ module Bridgetown 
     | 
|
| 
       24 
24 
     | 
    
         
             
                    @context = context
         
     | 
| 
       25 
25 
     | 
    
         
             
                  end
         
     | 
| 
       26 
26 
     | 
    
         | 
| 
       27 
     | 
    
         
            -
                  # Called path for backwards  
     | 
| 
      
 27 
     | 
    
         
            +
                  # Called path for backwards compatibility, this is really
         
     | 
| 
       28 
28 
     | 
    
         
             
                  # the escaped, absolute URL representing the page's image
         
     | 
| 
       29 
29 
     | 
    
         
             
                  # Returns nil if no image path can be determined
         
     | 
| 
       30 
30 
     | 
    
         
             
                  def path
         
     | 
| 
         @@ -0,0 +1,84 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # frozen_string_literal: true
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            module Bridgetown
         
     | 
| 
      
 4 
     | 
    
         
            +
              module SeoTag
         
     | 
| 
      
 5 
     | 
    
         
            +
                # A drop representing the current page's mastodon handle
         
     | 
| 
      
 6 
     | 
    
         
            +
                #
         
     | 
| 
      
 7 
     | 
    
         
            +
                # Mastodon handle will be pulled from:
         
     | 
| 
      
 8 
     | 
    
         
            +
                #
         
     | 
| 
      
 9 
     | 
    
         
            +
                # 1. The page's `mastodon` key
         
     | 
| 
      
 10 
     | 
    
         
            +
                # 2. The `mastodon` key in the site config
         
     | 
| 
      
 11 
     | 
    
         
            +
                class MastodonDrop < Bridgetown::Drops::Drop
         
     | 
| 
      
 12 
     | 
    
         
            +
                  HANDLE_REGEX = %r{\A@?(?<username>[^@]+)@(?<server>[^@]+)\z}
         
     | 
| 
      
 13 
     | 
    
         
            +
             
     | 
| 
      
 14 
     | 
    
         
            +
                  # Initialize a new MastodonDrop
         
     | 
| 
      
 15 
     | 
    
         
            +
                  #
         
     | 
| 
      
 16 
     | 
    
         
            +
                  # page - The page hash (e.g., Page#to_liquid)
         
     | 
| 
      
 17 
     | 
    
         
            +
                  # site - The Bridgetown::Drops::SiteDrop
         
     | 
| 
      
 18 
     | 
    
         
            +
                  def initialize(page: nil, site: nil)
         
     | 
| 
      
 19 
     | 
    
         
            +
                    raise ArgumentError unless page && site
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
                    @mutations = {}
         
     | 
| 
      
 22 
     | 
    
         
            +
                    @page = page
         
     | 
| 
      
 23 
     | 
    
         
            +
                    @site = site
         
     | 
| 
      
 24 
     | 
    
         
            +
                  end
         
     | 
| 
      
 25 
     | 
    
         
            +
             
     | 
| 
      
 26 
     | 
    
         
            +
                  def mastodon_handle
         
     | 
| 
      
 27 
     | 
    
         
            +
                    "@#{username}@#{server}" if handle?
         
     | 
| 
      
 28 
     | 
    
         
            +
                  end
         
     | 
| 
      
 29 
     | 
    
         
            +
                  alias_method :to_s, :mastodon_handle
         
     | 
| 
      
 30 
     | 
    
         
            +
             
     | 
| 
      
 31 
     | 
    
         
            +
                  def mastodon_url
         
     | 
| 
      
 32 
     | 
    
         
            +
                    "https://#{server}/@#{username}" if handle?
         
     | 
| 
      
 33 
     | 
    
         
            +
                  end
         
     | 
| 
      
 34 
     | 
    
         
            +
             
     | 
| 
      
 35 
     | 
    
         
            +
                  # Make the drop behave like a hash
         
     | 
| 
      
 36 
     | 
    
         
            +
                  def [](key)
         
     | 
| 
      
 37 
     | 
    
         
            +
                    mastodon_handle if key.to_sym == :mastodon
         
     | 
| 
      
 38 
     | 
    
         
            +
                  end
         
     | 
| 
      
 39 
     | 
    
         
            +
             
     | 
| 
      
 40 
     | 
    
         
            +
                  private
         
     | 
| 
      
 41 
     | 
    
         
            +
             
     | 
| 
      
 42 
     | 
    
         
            +
                  attr_reader :page, :site
         
     | 
| 
      
 43 
     | 
    
         
            +
             
     | 
| 
      
 44 
     | 
    
         
            +
                  # Finds the mastodon handle in page.metadata, or site.metadata
         
     | 
| 
      
 45 
     | 
    
         
            +
                  #
         
     | 
| 
      
 46 
     | 
    
         
            +
                  # Returns a string
         
     | 
| 
      
 47 
     | 
    
         
            +
                  def resolved_handle
         
     | 
| 
      
 48 
     | 
    
         
            +
                    return @resolved_handle if defined? @resolved_handle
         
     | 
| 
      
 49 
     | 
    
         
            +
             
     | 
| 
      
 50 
     | 
    
         
            +
                    sources = [page["mastodon"]]
         
     | 
| 
      
 51 
     | 
    
         
            +
                    sources << site.data.dig("site_metadata", "mastodon")
         
     | 
| 
      
 52 
     | 
    
         
            +
                    @resolved_handle = sources.find { |s| !s.to_s.empty? }
         
     | 
| 
      
 53 
     | 
    
         
            +
                  end
         
     | 
| 
      
 54 
     | 
    
         
            +
             
     | 
| 
      
 55 
     | 
    
         
            +
                  # Returns the username parsed from the resolved handle
         
     | 
| 
      
 56 
     | 
    
         
            +
                  def username
         
     | 
| 
      
 57 
     | 
    
         
            +
                    handle_hash["username"]
         
     | 
| 
      
 58 
     | 
    
         
            +
                  end
         
     | 
| 
      
 59 
     | 
    
         
            +
             
     | 
| 
      
 60 
     | 
    
         
            +
                  # Returns the server parsed from the resolved handle
         
     | 
| 
      
 61 
     | 
    
         
            +
                  def server
         
     | 
| 
      
 62 
     | 
    
         
            +
                    handle_hash["server"]
         
     | 
| 
      
 63 
     | 
    
         
            +
                  end
         
     | 
| 
      
 64 
     | 
    
         
            +
             
     | 
| 
      
 65 
     | 
    
         
            +
                  # Returns a hash containing username and server
         
     | 
| 
      
 66 
     | 
    
         
            +
                  # or an empty hash, if the handle cannot be parsed
         
     | 
| 
      
 67 
     | 
    
         
            +
                  def handle_hash
         
     | 
| 
      
 68 
     | 
    
         
            +
                    @handle_hash ||= case resolved_handle
         
     | 
| 
      
 69 
     | 
    
         
            +
                                     when String
         
     | 
| 
      
 70 
     | 
    
         
            +
                                       HANDLE_REGEX.match(resolved_handle)&.named_captures || {}
         
     | 
| 
      
 71 
     | 
    
         
            +
                                     else
         
     | 
| 
      
 72 
     | 
    
         
            +
                                       {}
         
     | 
| 
      
 73 
     | 
    
         
            +
                                     end
         
     | 
| 
      
 74 
     | 
    
         
            +
                  end
         
     | 
| 
      
 75 
     | 
    
         
            +
                  # Since author_hash is aliased to fallback_data, any values in the hash
         
     | 
| 
      
 76 
     | 
    
         
            +
                  # will be exposed via the drop, allowing support for arbitrary metadata
         
     | 
| 
      
 77 
     | 
    
         
            +
                  alias_method :fallback_data, :handle_hash
         
     | 
| 
      
 78 
     | 
    
         
            +
             
     | 
| 
      
 79 
     | 
    
         
            +
                  def handle?
         
     | 
| 
      
 80 
     | 
    
         
            +
                    handle_hash != {}
         
     | 
| 
      
 81 
     | 
    
         
            +
                  end
         
     | 
| 
      
 82 
     | 
    
         
            +
                end
         
     | 
| 
      
 83 
     | 
    
         
            +
              end
         
     | 
| 
      
 84 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            # frozen_string_literal: true
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
3 
     | 
    
         
             
            module Bridgetown
         
     | 
| 
       4 
     | 
    
         
            -
               
     | 
| 
      
 4 
     | 
    
         
            +
              module SeoTag
         
     | 
| 
       5 
5 
     | 
    
         
             
                # Mixin to share common URL-related methods between class
         
     | 
| 
       6 
6 
     | 
    
         
             
                module UrlHelper
         
     | 
| 
       7 
7 
     | 
    
         
             
                  private
         
     | 
| 
         @@ -9,10 +9,10 @@ module Bridgetown 
     | 
|
| 
       9 
9 
     | 
    
         
             
                  # Determines if the given string is an absolute URL
         
     | 
| 
       10 
10 
     | 
    
         
             
                  #
         
     | 
| 
       11 
11 
     | 
    
         
             
                  # Returns true if an absolute URL.
         
     | 
| 
       12 
     | 
    
         
            -
                  #  
     | 
| 
      
 12 
     | 
    
         
            +
                  # Returns false if it's a relative URL
         
     | 
| 
       13 
13 
     | 
    
         
             
                  # Returns nil if it is not a string or can't be parsed as a URL
         
     | 
| 
       14 
14 
     | 
    
         
             
                  def absolute_url?(string)
         
     | 
| 
       15 
     | 
    
         
            -
                    return unless string
         
     | 
| 
      
 15 
     | 
    
         
            +
                    return false unless string
         
     | 
| 
       16 
16 
     | 
    
         | 
| 
       17 
17 
     | 
    
         
             
                    Addressable::URI.parse(string).absolute?
         
     | 
| 
       18 
18 
     | 
    
         
             
                  rescue Addressable::URI::InvalidURIError
         
     | 
    
        data/lib/bridgetown-seo-tag.rb
    CHANGED
    
    | 
         @@ -3,97 +3,98 @@ 
     | 
|
| 
       3 
3 
     | 
    
         
             
            require "bridgetown"
         
     | 
| 
       4 
4 
     | 
    
         
             
            require "bridgetown-seo-tag/version"
         
     | 
| 
       5 
5 
     | 
    
         | 
| 
       6 
     | 
    
         
            -
            module Bridgetown
         
     | 
| 
       7 
     | 
    
         
            -
               
     | 
| 
       8 
     | 
    
         
            -
             
     | 
| 
       9 
     | 
    
         
            -
             
     | 
| 
       10 
     | 
    
         
            -
             
     | 
| 
       11 
     | 
    
         
            -
             
     | 
| 
       12 
     | 
    
         
            -
             
     | 
| 
       13 
     | 
    
         
            -
             
     | 
| 
       14 
     | 
    
         
            -
                attr_accessor :context
         
     | 
| 
       15 
     | 
    
         
            -
             
     | 
| 
       16 
     | 
    
         
            -
                # Matches all whitespace that follows either
         
     | 
| 
       17 
     | 
    
         
            -
                #   1. A '}', which closes a Liquid tag
         
     | 
| 
       18 
     | 
    
         
            -
                #   2. A '{', which opens a JSON block
         
     | 
| 
       19 
     | 
    
         
            -
                #   3. A '>' followed by a newline, which closes an XML tag or
         
     | 
| 
       20 
     | 
    
         
            -
                #   4. A ',' followed by a newline, which ends a JSON line
         
     | 
| 
       21 
     | 
    
         
            -
                # We will strip all of this whitespace to minify the template
         
     | 
| 
       22 
     | 
    
         
            -
                # We will not strip any whitespace if the next character is a '-'
         
     | 
| 
       23 
     | 
    
         
            -
                #   so that we do not interfere with the HTML comment at the
         
     | 
| 
       24 
     | 
    
         
            -
                #   very begining
         
     | 
| 
       25 
     | 
    
         
            -
                MINIFY_REGEX = %r!(?<=[{}]|[>,]\n)\s+(?\!-)!.freeze
         
     | 
| 
       26 
     | 
    
         
            -
             
     | 
| 
       27 
     | 
    
         
            -
                def initialize(_tag_name, text, _tokens)
         
     | 
| 
       28 
     | 
    
         
            -
                  super
         
     | 
| 
       29 
     | 
    
         
            -
                  @text = text
         
     | 
| 
       30 
     | 
    
         
            -
                end
         
     | 
| 
      
 6 
     | 
    
         
            +
            module Bridgetown::SeoTag
         
     | 
| 
      
 7 
     | 
    
         
            +
              autoload :AuthorDrop, "bridgetown-seo-tag/author_drop"
         
     | 
| 
      
 8 
     | 
    
         
            +
              autoload :MastodonDrop, "bridgetown-seo-tag/mastodon_drop"
         
     | 
| 
      
 9 
     | 
    
         
            +
              autoload :ImageDrop,  "bridgetown-seo-tag/image_drop"
         
     | 
| 
      
 10 
     | 
    
         
            +
              autoload :UrlHelper,  "bridgetown-seo-tag/url_helper"
         
     | 
| 
      
 11 
     | 
    
         
            +
              autoload :Drop,       "bridgetown-seo-tag/drop"
         
     | 
| 
      
 12 
     | 
    
         
            +
              autoload :Filters,    "bridgetown-seo-tag/filters"
         
     | 
| 
      
 13 
     | 
    
         
            +
            end
         
     | 
| 
       31 
14 
     | 
    
         | 
| 
       32 
     | 
    
         
            -
             
     | 
| 
       33 
     | 
    
         
            -
             
     | 
| 
       34 
     | 
    
         
            -
             
     | 
| 
       35 
     | 
    
         
            -
             
     | 
| 
      
 15 
     | 
    
         
            +
            class Bridgetown::SeoTag::LiquidTag < Liquid::Tag
         
     | 
| 
      
 16 
     | 
    
         
            +
              attr_accessor :context
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
      
 18 
     | 
    
         
            +
              # Matches all whitespace that follows either
         
     | 
| 
      
 19 
     | 
    
         
            +
              #   1. A '}', which closes a Liquid tag
         
     | 
| 
      
 20 
     | 
    
         
            +
              #   2. A '{', which opens a JSON block
         
     | 
| 
      
 21 
     | 
    
         
            +
              #   3. A '>' followed by a newline, which closes an XML tag or
         
     | 
| 
      
 22 
     | 
    
         
            +
              #   4. A ',' followed by a newline, which ends a JSON line
         
     | 
| 
      
 23 
     | 
    
         
            +
              # We will strip all of this whitespace to minify the template
         
     | 
| 
      
 24 
     | 
    
         
            +
              # We will not strip any whitespace if the next character is a '-'
         
     | 
| 
      
 25 
     | 
    
         
            +
              #   so that we do not interfere with the HTML comment at the
         
     | 
| 
      
 26 
     | 
    
         
            +
              #   very begining
         
     | 
| 
      
 27 
     | 
    
         
            +
              MINIFY_REGEX = %r!(?<=[{}]|[>,]\n)\s+(?\!-)!
         
     | 
| 
      
 28 
     | 
    
         
            +
             
     | 
| 
      
 29 
     | 
    
         
            +
              def initialize(_tag_name, text, _tokens)
         
     | 
| 
      
 30 
     | 
    
         
            +
                super
         
     | 
| 
      
 31 
     | 
    
         
            +
                @text = text
         
     | 
| 
      
 32 
     | 
    
         
            +
              end
         
     | 
| 
       36 
33 
     | 
    
         | 
| 
       37 
     | 
    
         
            -
             
     | 
| 
      
 34 
     | 
    
         
            +
              def render(context)
         
     | 
| 
      
 35 
     | 
    
         
            +
                @context = context
         
     | 
| 
      
 36 
     | 
    
         
            +
                self.class.template.render!(payload, info)
         
     | 
| 
      
 37 
     | 
    
         
            +
              end
         
     | 
| 
       38 
38 
     | 
    
         | 
| 
       39 
     | 
    
         
            -
             
     | 
| 
       40 
     | 
    
         
            -
                  {
         
     | 
| 
       41 
     | 
    
         
            -
                    "version" => Bridgetown::SeoTag::VERSION,
         
     | 
| 
       42 
     | 
    
         
            -
                    "title"   => title?,
         
     | 
| 
       43 
     | 
    
         
            -
                  }
         
     | 
| 
       44 
     | 
    
         
            -
                end
         
     | 
| 
      
 39 
     | 
    
         
            +
              private
         
     | 
| 
       45 
40 
     | 
    
         | 
| 
       46 
     | 
    
         
            -
             
     | 
| 
       47 
     | 
    
         
            -
             
     | 
| 
       48 
     | 
    
         
            -
             
     | 
| 
       49 
     | 
    
         
            -
                   
     | 
| 
       50 
     | 
    
         
            -
             
     | 
| 
       51 
     | 
    
         
            -
             
     | 
| 
       52 
     | 
    
         
            -
                  Bridgetown::Utils.deep_merge_hashes(
         
     | 
| 
       53 
     | 
    
         
            -
                    context.registers[:site].site_payload,
         
     | 
| 
       54 
     | 
    
         
            -
                    "page"      => context.registers[:page],
         
     | 
| 
       55 
     | 
    
         
            -
                    "paginator" => paginator,
         
     | 
| 
       56 
     | 
    
         
            -
                    "seo_tag"   => drop
         
     | 
| 
       57 
     | 
    
         
            -
                  )
         
     | 
| 
       58 
     | 
    
         
            -
                end
         
     | 
| 
      
 41 
     | 
    
         
            +
              def options
         
     | 
| 
      
 42 
     | 
    
         
            +
                {
         
     | 
| 
      
 43 
     | 
    
         
            +
                  "version" => Bridgetown::SeoTag::VERSION,
         
     | 
| 
      
 44 
     | 
    
         
            +
                  "title"   => title?,
         
     | 
| 
      
 45 
     | 
    
         
            +
                }
         
     | 
| 
      
 46 
     | 
    
         
            +
              end
         
     | 
| 
       59 
47 
     | 
    
         | 
| 
       60 
     | 
    
         
            -
             
     | 
| 
       61 
     | 
    
         
            -
             
     | 
| 
       62 
     | 
    
         
            -
             
     | 
| 
       63 
     | 
    
         
            -
                  else
         
     | 
| 
       64 
     | 
    
         
            -
                    @drop ||= Bridgetown::SeoTag::Drop.new(@text, context)
         
     | 
| 
       65 
     | 
    
         
            -
                  end
         
     | 
| 
      
 48 
     | 
    
         
            +
              def payload
         
     | 
| 
      
 49 
     | 
    
         
            +
                if context.registers[:page].respond_to?(:paginator)
         
     | 
| 
      
 50 
     | 
    
         
            +
                  paginator = context.registers[:page].paginator
         
     | 
| 
       66 
51 
     | 
    
         
             
                end
         
     | 
| 
       67 
52 
     | 
    
         | 
| 
       68 
     | 
    
         
            -
                 
     | 
| 
       69 
     | 
    
         
            -
             
     | 
| 
       70 
     | 
    
         
            -
             
     | 
| 
       71 
     | 
    
         
            -
             
     | 
| 
       72 
     | 
    
         
            -
             
     | 
| 
       73 
     | 
    
         
            -
             
     | 
| 
       74 
     | 
    
         
            -
             
     | 
| 
       75 
     | 
    
         
            -
             
     | 
| 
      
 53 
     | 
    
         
            +
                # site_payload is an instance of UnifiedPayloadDrop
         
     | 
| 
      
 54 
     | 
    
         
            +
                Bridgetown::Utils.deep_merge_hashes(
         
     | 
| 
      
 55 
     | 
    
         
            +
                  context.registers[:site].site_payload,
         
     | 
| 
      
 56 
     | 
    
         
            +
                  "page"      => context.registers[:page],
         
     | 
| 
      
 57 
     | 
    
         
            +
                  "paginator" => paginator,
         
     | 
| 
      
 58 
     | 
    
         
            +
                  "seo_tag"   => drop
         
     | 
| 
      
 59 
     | 
    
         
            +
                )
         
     | 
| 
      
 60 
     | 
    
         
            +
              end
         
     | 
| 
      
 61 
     | 
    
         
            +
             
     | 
| 
      
 62 
     | 
    
         
            +
              def drop
         
     | 
| 
      
 63 
     | 
    
         
            +
                if context.registers[:site].liquid_renderer.respond_to?(:cache)
         
     | 
| 
      
 64 
     | 
    
         
            +
                  Bridgetown::SeoTag::Drop.new(@text, context)
         
     | 
| 
      
 65 
     | 
    
         
            +
                else
         
     | 
| 
      
 66 
     | 
    
         
            +
                  @drop ||= Bridgetown::SeoTag::Drop.new(@text, context)
         
     | 
| 
       76 
67 
     | 
    
         
             
                end
         
     | 
| 
      
 68 
     | 
    
         
            +
              end
         
     | 
| 
      
 69 
     | 
    
         
            +
             
     | 
| 
      
 70 
     | 
    
         
            +
              def info
         
     | 
| 
      
 71 
     | 
    
         
            +
                {
         
     | 
| 
      
 72 
     | 
    
         
            +
                  registers: {
         
     | 
| 
      
 73 
     | 
    
         
            +
                    site: context.registers[:site],
         
     | 
| 
      
 74 
     | 
    
         
            +
                    page: context.registers[:page],
         
     | 
| 
      
 75 
     | 
    
         
            +
                  },
         
     | 
| 
      
 76 
     | 
    
         
            +
                  filters: [Bridgetown::Filters],
         
     | 
| 
      
 77 
     | 
    
         
            +
                }
         
     | 
| 
      
 78 
     | 
    
         
            +
              end
         
     | 
| 
       77 
79 
     | 
    
         | 
| 
       78 
     | 
    
         
            -
             
     | 
| 
       79 
     | 
    
         
            -
             
     | 
| 
       80 
     | 
    
         
            -
             
     | 
| 
       81 
     | 
    
         
            -
             
     | 
| 
      
 80 
     | 
    
         
            +
              class << self
         
     | 
| 
      
 81 
     | 
    
         
            +
                def template
         
     | 
| 
      
 82 
     | 
    
         
            +
                  @template ||= Liquid::Template.parse template_contents
         
     | 
| 
      
 83 
     | 
    
         
            +
                end
         
     | 
| 
       82 
84 
     | 
    
         | 
| 
       83 
     | 
    
         
            -
             
     | 
| 
      
 85 
     | 
    
         
            +
                private
         
     | 
| 
       84 
86 
     | 
    
         | 
| 
       85 
     | 
    
         
            -
             
     | 
| 
       86 
     | 
    
         
            -
             
     | 
| 
       87 
     | 
    
         
            -
             
     | 
| 
      
 87 
     | 
    
         
            +
                def template_contents
         
     | 
| 
      
 88 
     | 
    
         
            +
                  @template_contents ||= File.read(template_path).gsub(MINIFY_REGEX, "")
         
     | 
| 
      
 89 
     | 
    
         
            +
                end
         
     | 
| 
       88 
90 
     | 
    
         | 
| 
       89 
     | 
    
         
            -
             
     | 
| 
       90 
     | 
    
         
            -
             
     | 
| 
       91 
     | 
    
         
            -
                  end
         
     | 
| 
      
 91 
     | 
    
         
            +
                def template_path
         
     | 
| 
      
 92 
     | 
    
         
            +
                  @template_path ||= File.expand_path "./template.html", File.dirname(__FILE__)
         
     | 
| 
       92 
93 
     | 
    
         
             
                end
         
     | 
| 
       93 
94 
     | 
    
         
             
              end
         
     | 
| 
       94 
95 
     | 
    
         
             
            end
         
     | 
| 
       95 
96 
     | 
    
         | 
| 
       96 
     | 
    
         
            -
            Liquid::Template.register_tag("seo", Bridgetown::SeoTag)
         
     | 
| 
      
 97 
     | 
    
         
            +
            Liquid::Template.register_tag("seo", Bridgetown::SeoTag::LiquidTag)
         
     | 
| 
       97 
98 
     | 
    
         
             
            require "bridgetown-seo-tag/builder"
         
     | 
| 
       98 
99 
     | 
    
         | 
| 
       99 
100 
     | 
    
         
             
            Bridgetown.initializer :"bridgetown-seo-tag" do |config|
         
     | 
    
        data/lib/template.html
    CHANGED
    
    | 
         @@ -69,6 +69,11 @@ 
     | 
|
| 
       69 
69 
     | 
    
         
             
              <meta property="twitter:title" content="{{ seo_tag.page_title }}" />
         
     | 
| 
       70 
70 
     | 
    
         
             
            {% endif %}
         
     | 
| 
       71 
71 
     | 
    
         | 
| 
      
 72 
     | 
    
         
            +
            {% if seo_tag.mastodon_handle %}
         
     | 
| 
      
 73 
     | 
    
         
            +
              <meta name="fediverse:creator" content="{{ seo_tag.mastodon_handle }}" />
         
     | 
| 
      
 74 
     | 
    
         
            +
              <link rel="me" href="{{ seo_tag.mastodon_url }}" />
         
     | 
| 
      
 75 
     | 
    
         
            +
            {% endif %}
         
     | 
| 
      
 76 
     | 
    
         
            +
             
     | 
| 
       72 
77 
     | 
    
         
             
            {% if site.metadata.twitter %}
         
     | 
| 
       73 
78 
     | 
    
         
             
              <meta name="twitter:site" content="@{{ site.metadata.twitter.username | default: site.metadata.twitter | remove:'@' }}" />
         
     | 
| 
       74 
79 
     | 
    
         | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: bridgetown-seo-tag
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version:  
     | 
| 
      
 4 
     | 
    
         
            +
              version: 7.0.1
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Bridgetown Team
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire:
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date:  
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2025-10-27 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: bridgetown
         
     | 
| 
         @@ -16,102 +16,28 @@ dependencies: 
     | 
|
| 
       16 
16 
     | 
    
         
             
                requirements:
         
     | 
| 
       17 
17 
     | 
    
         
             
                - - ">="
         
     | 
| 
       18 
18 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       19 
     | 
    
         
            -
                    version: 1. 
     | 
| 
       20 
     | 
    
         
            -
                - - "<"
         
     | 
| 
       21 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       22 
     | 
    
         
            -
                    version: '2.0'
         
     | 
| 
      
 19 
     | 
    
         
            +
                    version: '1.3'
         
     | 
| 
       23 
20 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       24 
21 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       25 
22 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       26 
23 
     | 
    
         
             
                requirements:
         
     | 
| 
       27 
24 
     | 
    
         
             
                - - ">="
         
     | 
| 
       28 
25 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       29 
     | 
    
         
            -
                    version: 1. 
     | 
| 
       30 
     | 
    
         
            -
                - - "<"
         
     | 
| 
       31 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       32 
     | 
    
         
            -
                    version: '2.0'
         
     | 
| 
       33 
     | 
    
         
            -
            - !ruby/object:Gem::Dependency
         
     | 
| 
       34 
     | 
    
         
            -
              name: bundler
         
     | 
| 
       35 
     | 
    
         
            -
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       36 
     | 
    
         
            -
                requirements:
         
     | 
| 
       37 
     | 
    
         
            -
                - - ">="
         
     | 
| 
       38 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       39 
     | 
    
         
            -
                    version: '1.15'
         
     | 
| 
       40 
     | 
    
         
            -
              type: :development
         
     | 
| 
       41 
     | 
    
         
            -
              prerelease: false
         
     | 
| 
       42 
     | 
    
         
            -
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       43 
     | 
    
         
            -
                requirements:
         
     | 
| 
       44 
     | 
    
         
            -
                - - ">="
         
     | 
| 
       45 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       46 
     | 
    
         
            -
                    version: '1.15'
         
     | 
| 
       47 
     | 
    
         
            -
            - !ruby/object:Gem::Dependency
         
     | 
| 
       48 
     | 
    
         
            -
              name: html-proofer
         
     | 
| 
       49 
     | 
    
         
            -
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       50 
     | 
    
         
            -
                requirements:
         
     | 
| 
       51 
     | 
    
         
            -
                - - "~>"
         
     | 
| 
       52 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       53 
     | 
    
         
            -
                    version: '3.7'
         
     | 
| 
       54 
     | 
    
         
            -
              type: :development
         
     | 
| 
       55 
     | 
    
         
            -
              prerelease: false
         
     | 
| 
       56 
     | 
    
         
            -
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       57 
     | 
    
         
            -
                requirements:
         
     | 
| 
       58 
     | 
    
         
            -
                - - "~>"
         
     | 
| 
       59 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       60 
     | 
    
         
            -
                    version: '3.7'
         
     | 
| 
       61 
     | 
    
         
            -
            - !ruby/object:Gem::Dependency
         
     | 
| 
       62 
     | 
    
         
            -
              name: rake
         
     | 
| 
       63 
     | 
    
         
            -
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       64 
     | 
    
         
            -
                requirements:
         
     | 
| 
       65 
     | 
    
         
            -
                - - "~>"
         
     | 
| 
       66 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       67 
     | 
    
         
            -
                    version: '13.0'
         
     | 
| 
       68 
     | 
    
         
            -
              type: :development
         
     | 
| 
       69 
     | 
    
         
            -
              prerelease: false
         
     | 
| 
       70 
     | 
    
         
            -
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       71 
     | 
    
         
            -
                requirements:
         
     | 
| 
       72 
     | 
    
         
            -
                - - "~>"
         
     | 
| 
       73 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       74 
     | 
    
         
            -
                    version: '13.0'
         
     | 
| 
       75 
     | 
    
         
            -
            - !ruby/object:Gem::Dependency
         
     | 
| 
       76 
     | 
    
         
            -
              name: rspec
         
     | 
| 
       77 
     | 
    
         
            -
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       78 
     | 
    
         
            -
                requirements:
         
     | 
| 
       79 
     | 
    
         
            -
                - - "~>"
         
     | 
| 
       80 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       81 
     | 
    
         
            -
                    version: '3.5'
         
     | 
| 
       82 
     | 
    
         
            -
              type: :development
         
     | 
| 
       83 
     | 
    
         
            -
              prerelease: false
         
     | 
| 
       84 
     | 
    
         
            -
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       85 
     | 
    
         
            -
                requirements:
         
     | 
| 
       86 
     | 
    
         
            -
                - - "~>"
         
     | 
| 
       87 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       88 
     | 
    
         
            -
                    version: '3.5'
         
     | 
| 
       89 
     | 
    
         
            -
            - !ruby/object:Gem::Dependency
         
     | 
| 
       90 
     | 
    
         
            -
              name: rubocop-bridgetown
         
     | 
| 
       91 
     | 
    
         
            -
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       92 
     | 
    
         
            -
                requirements:
         
     | 
| 
       93 
     | 
    
         
            -
                - - "~>"
         
     | 
| 
       94 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       95 
     | 
    
         
            -
                    version: '0.3'
         
     | 
| 
       96 
     | 
    
         
            -
              type: :development
         
     | 
| 
       97 
     | 
    
         
            -
              prerelease: false
         
     | 
| 
       98 
     | 
    
         
            -
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       99 
     | 
    
         
            -
                requirements:
         
     | 
| 
       100 
     | 
    
         
            -
                - - "~>"
         
     | 
| 
       101 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       102 
     | 
    
         
            -
                    version: '0.3'
         
     | 
| 
      
 26 
     | 
    
         
            +
                    version: '1.3'
         
     | 
| 
       103 
27 
     | 
    
         
             
            description:
         
     | 
| 
       104 
28 
     | 
    
         
             
            email: maintainers@bridgetownrb.com
         
     | 
| 
       105 
29 
     | 
    
         
             
            executables: []
         
     | 
| 
       106 
30 
     | 
    
         
             
            extensions: []
         
     | 
| 
       107 
31 
     | 
    
         
             
            extra_rdoc_files: []
         
     | 
| 
       108 
32 
     | 
    
         
             
            files:
         
     | 
| 
      
 33 
     | 
    
         
            +
            - ".github/workflows/tests.yml"
         
     | 
| 
       109 
34 
     | 
    
         
             
            - ".gitignore"
         
     | 
| 
       110 
35 
     | 
    
         
             
            - ".rspec"
         
     | 
| 
       111 
36 
     | 
    
         
             
            - ".rubocop.yml"
         
     | 
| 
       112 
37 
     | 
    
         
             
            - ".rubocop_todo.yml"
         
     | 
| 
       113 
38 
     | 
    
         
             
            - CHANGELOG.md
         
     | 
| 
       114 
39 
     | 
    
         
             
            - Gemfile
         
     | 
| 
      
 40 
     | 
    
         
            +
            - Gemfile.lock
         
     | 
| 
       115 
41 
     | 
    
         
             
            - LICENSE.txt
         
     | 
| 
       116 
42 
     | 
    
         
             
            - README.md
         
     | 
| 
       117 
43 
     | 
    
         
             
            - Rakefile
         
     | 
| 
         @@ -122,6 +48,7 @@ files: 
     | 
|
| 
       122 
48 
     | 
    
         
             
            - lib/bridgetown-seo-tag/drop.rb
         
     | 
| 
       123 
49 
     | 
    
         
             
            - lib/bridgetown-seo-tag/filters.rb
         
     | 
| 
       124 
50 
     | 
    
         
             
            - lib/bridgetown-seo-tag/image_drop.rb
         
     | 
| 
      
 51 
     | 
    
         
            +
            - lib/bridgetown-seo-tag/mastodon_drop.rb
         
     | 
| 
       125 
52 
     | 
    
         
             
            - lib/bridgetown-seo-tag/url_helper.rb
         
     | 
| 
       126 
53 
     | 
    
         
             
            - lib/bridgetown-seo-tag/version.rb
         
     | 
| 
       127 
54 
     | 
    
         
             
            - lib/template.html
         
     | 
| 
         @@ -138,14 +65,14 @@ required_ruby_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       138 
65 
     | 
    
         
             
              requirements:
         
     | 
| 
       139 
66 
     | 
    
         
             
              - - ">="
         
     | 
| 
       140 
67 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       141 
     | 
    
         
            -
                  version:  
     | 
| 
      
 68 
     | 
    
         
            +
                  version: 3.1.0
         
     | 
| 
       142 
69 
     | 
    
         
             
            required_rubygems_version: !ruby/object:Gem::Requirement
         
     | 
| 
       143 
70 
     | 
    
         
             
              requirements:
         
     | 
| 
       144 
71 
     | 
    
         
             
              - - ">="
         
     | 
| 
       145 
72 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       146 
73 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       147 
74 
     | 
    
         
             
            requirements: []
         
     | 
| 
       148 
     | 
    
         
            -
            rubygems_version: 3.3. 
     | 
| 
      
 75 
     | 
    
         
            +
            rubygems_version: 3.3.26
         
     | 
| 
       149 
76 
     | 
    
         
             
            signing_key:
         
     | 
| 
       150 
77 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       151 
78 
     | 
    
         
             
            summary: A Bridgetown plugin to add metadata tags for search engines and social networks
         
     |