{"id":13612387,"url":"https://github.com/erikw/jekyll-google_search_console_verification_file","last_synced_at":"2025-07-12T16:05:07.085Z","repository":{"id":42913035,"uuid":"381051146","full_name":"erikw/jekyll-google_search_console_verification_file","owner":"erikw","description":"Jekyll plugin that generates a Google Search Console verification file from configuration.","archived":false,"fork":false,"pushed_at":"2025-05-03T09:07:13.000Z","size":196,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-02T14:50:35.764Z","etag":null,"topics":["generator","google-search-console","hacktoberfest","jekyll","jekyll-plugin","verification-code"],"latest_commit_sha":null,"homepage":"https://erikw.github.io/jekyll-google_search_console_verification_file/","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/erikw.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-06-28T14:00:24.000Z","updated_at":"2025-05-03T09:07:17.000Z","dependencies_parsed_at":"2025-04-13T08:03:33.234Z","dependency_job_id":null,"html_url":"https://github.com/erikw/jekyll-google_search_console_verification_file","commit_stats":{"total_commits":193,"total_committers":2,"mean_commits":96.5,"dds":0.005181347150259086,"last_synced_commit":"06f80636f54464114fb686307e8ee17e87abaecc"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/erikw/jekyll-google_search_console_verification_file","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erikw%2Fjekyll-google_search_console_verification_file","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erikw%2Fjekyll-google_search_console_verification_file/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erikw%2Fjekyll-google_search_console_verification_file/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erikw%2Fjekyll-google_search_console_verification_file/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/erikw","download_url":"https://codeload.github.com/erikw/jekyll-google_search_console_verification_file/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erikw%2Fjekyll-google_search_console_verification_file/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265016835,"owners_count":23698378,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["generator","google-search-console","hacktoberfest","jekyll","jekyll-plugin","verification-code"],"created_at":"2024-08-01T20:00:29.104Z","updated_at":"2025-07-12T16:05:07.056Z","avatar_url":"https://github.com/erikw.png","language":"Ruby","funding_links":[],"categories":["Search Engine Optimization (SEO) \u0026 Redirects"],"sub_categories":[],"readme":"# Jekyll Google Search Console Verification File Generator Plugin [![Post on X](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://x.com/intent/tweet?text=Generate%20a%20Google%20Search%20Console%20verification%20file%20for%20your%20Jekyll%20site%20with%20this%20plugin\u0026url=https://github.com/erikw/jekyll-google_search_console_verification_file\u0026via=erik_westrup\u0026hashtags=jekyll,plugin)\n[![Gem Version](https://badge.fury.io/rb/jekyll-google_search_console_verification_file.svg)](https://badge.fury.io/rb/jekyll-google_search_console_verification_file)\n[![Gem Downloads](https://img.shields.io/gem/dt/jekyll-google_search_console_verification_file?label=gem%20downloads)](https://rubygems.org/gems/jekyll-google_search_console_verification_file)\n[![Travis Build Status](https://img.shields.io/travis/com/erikw/jekyll-google_search_console_verification_file/main?logo=travis)](https://app.travis-ci.com/github/erikw/jekyll-google_search_console_verification_file)\n[![Code Climate Maintainability](https://api.codeclimate.com/v1/badges/59050f3f66ed1f1ee32e/maintainability)](https://codeclimate.com/github/erikw/jekyll-google_search_console_verification_file/maintainability)\n[![Code Climate Test Coverage](https://api.codeclimate.com/v1/badges/59050f3f66ed1f1ee32e/test_coverage)](https://codeclimate.com/github/erikw/jekyll-google_search_console_verification_file/test_coverage)\n[![CodeQL](https://github.com/erikw/jekyll-google_search_console_verification_file/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/erikw/jekyll-google_search_console_verification_file/actions/workflows/codeql-analysis.yml)\n[![SLOC](https://sloc.xyz/github/erikw/jekyll-google_search_console_verification_file?lower=true)](#)\n[![Number of programming languages used](https://img.shields.io/github/languages/count/erikw/jekyll-google_search_console_verification_file)](#)\n[![Top programming languages used](https://img.shields.io/github/languages/top/erikw/jekyll-google_search_console_verification_file)](#)\n[![License](https://img.shields.io/github/license/erikw/jekyll-google_search_console_verification_file)](LICENSE.txt)\n[![OSS Lifecycle](https://img.shields.io/osslifecycle/erikw/jekyll-google_search_console_verification_file)](https://github.com/Netflix/osstracker)\n\n\u003cp align=\"center\"\u003e\n    \u003c!-- Ref: https://dev.to/azure/adding-a-github-codespace-button-to-your-readme-5f6l --\u003e\n    \u003ca href=\"https://github.com/codespaces/new?hide_repo_select=true\u0026ref=main\u0026repo=381051146\" title=\"Open in GitHub Codespaces\" \u003e\u003cimg alt=\"Open in GitHub Codespaces\" src=\"https://github.com/codespaces/badge.svg\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003e [!TIP]\n\u003e :point_right: **Live demo**: https://erikw.github.io/jekyll-google_search_console_verification_file/\n\n\nThis is a very simple plugin that will generate a Google Search Console (GSC from here on) [verification file](https://support.google.com/webmasters/answer/9008080?hl=en) to your `_site/` directory in a Jekyll project. This file is used by GSC to verify that you own the site and looks for example like my [googlef47733b3288357e4.html](https://erikw.me/google47733b3288357e4.html).\n\n## Why?\nWhy use this plugin?\n\n### Tl;DR\n* Don't stuff bloating `\u003cmeta\u003e` tag to all your HTML pages; use simple file in the site's root\n* Generate what can be generated; keep your source tree clean!\n\n\n### !TL;DidRead\nThere are multiple ways to [verify](https://support.google.com/webmasters/answer/9008080?hl=en) the ownership of your site. The two simpler ways, both suitable for Github Pages owners, are to add an `\u003cmeta\u003e tag to your pages` or upload a special unique file to the root of the site. For adding the meta tag, there are excellent plugins making this very easy for example [jekyll-seo-tag](http://jekyll.github.io/jekyll-seo-tag/usage/). If you want to the meta tag, I recommend this plugin.\n\nHowever if you feel that it's bloated to add this `\u003cmeta\u003e` tag to the header all you pages, keeping file size and page load speed in mind, you may one to go for the file based verification method instead.\n\nSo with the file based method, why not just add the file you downloaded from GSC to your source directory and let Jekyll put it in `_site/` on generation? As we're using a SSG (Static Site Generator), we should generate everything we can. It's verdantly nice to keep the source tree clean and make everything that can be a configuration that generates what is needed.\n\nThus, this plugin exist to solve this problem. Give the plugin the unique code GSC provided you and it will generate the file for you in `_site/`!\n\nNote that if you do place a verification file in the root of the source tree, this will override the generation by this plugin.\n\n# Installation\n1. Add this gem to your Jekyll site's Gemfile in the `:jekyll_plugins` group:\n   * On CLI (in project root directory):\n   ```shell\n   bundle add --group jekyll_plugins jekyll-google_search_console_verification_file\n   ```\n   * Or manually:\n   ```ruby\n   group :jekyll_plugins do\n     [...]\n     gem 'jekyll-google_search_console_verification_file'\n   end\n   ```\n1. Run `$ bundle install`.\n1. In your site's `_config.yml`, enable the plugin:\n   ```yml\n   plugins:\n     - jekyll-google_search_console_verification_file\n   ```\n1. Get the GSC unique code for you website.\n   1. Register your website at [Google Search Console](https://search.google.com/search-console?resource_id=https://erikw.me/)\n   1. From the main dashboard of your site at GSC: _Settings \u003e Ownership Verification \u003e HTML File_ and download the unique file\n   1. Instead of putting this file in our jekyll site, just copy the unique code from the HTML file name e.g. from `googlef47733b3288357e4.html` copy `f47733b3288357e4`.\n1. In your site's `_config.yml`, configure this plugin with the code from the previous step:\n   ```yml\n   google_search_console:\n     verification_file_code: 47733b3288357e4\n   ```\n1. Now just build your site and verify that the verification file now exist!\n   ```console\n   $ bundle exec jekyll build\n   $ ls _site/ | grep \"google.*\\.html\"\n   google47733b3288357e4.html\n   ```\n\n# Development\nThe structure of this plugin was inspired by [https://ayastreb.me/writing-a-jekyll-plugin/](https://ayastreb.me/writing-a-jekyll-plugin/), the plugin jekyll-sitemap and the [Bundler Gem tutorial](https://bundler.io/guides/creating_gem.html).\n\nAfter checking out the repo;\n1. Install [RVM](https://rvm.io/rvm/install) and install a supported ruby version (see .gemspec)\n1. run `scripts/setup` to install dependencies\n1. run `scripts/test` to run the tests\n1.  You can also run `scripts/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n\n## Local development\nFollowing the setup at [how-to-specify-local-ruby-gems-in-your-gemfile](https://rossta.net/blog/how-to-specify-local-ruby-gems-in-your-gemfile.html), these are the steps needed to build a jekyll site with a local clone of this plugin for local testing.\n\n1. Clone this repo to your machine, say at `~/src/jekyll-google_search_console_verification_file`\n1. In your Jekyll project's `Gemfile`:\n   - Remove the `gem 'jekyll-google_search_console_verification_file'` part\n   - Add instead `gem 'jekyll-google_search_console_verification_file', github: 'erikw/jekyll-google_search_console_verification_file', branch: 'main'`\n1. Configure bundler to use a local path for this gem in this project:\n   - `$ bundle config --local local.jekyll-google_search_console_verification_file ~/src/jekyll-google_search_console_verification_file`\n1. Update the project: `$ bundle install`\n1. Now the project will build with the local clone of this plugin when issuing e.g. `bundle exec jekyll build`\n1. When you're done:\n  - Remove the local override with: `$ bundle config --delete local.jekyll-google_search_console_verification_file`\n  - Optionally restore the original gem include in `Gemfile` or keep building from a branch in the github repo.\n\n## Releasing\nInstructions for releasing on rubygems.org below. Optionally make a GitHub [release](https://github.com/erikw/jekyll-google_search_console_verification_file/releases) after this for the pushed git tag.\n\n## [manual] Using bundler/gem_tasks rake tasks\nFollowing instructions from [bundler.io](https://bundler.io/guides/creating_gem.html#releasing-the-gem):\n```shell\nvi -p lib/jekyll-google_search_console_verification_file/version.rb CHANGELOG.md\nbundle exec rake build\nver=$(ruby -r jekyll-google_search_console_verification_file/version -e 'puts Jekyll::GoogleSearchConsoleVerificationFile::VERSION')\n\n# Optional: test locally by including in another project\ngem install pkg/jekyll-google_search_console_verification_file-$ver.gem\n\nbundle exec rake release\n```\n\n## [recommended] Using gem-release gem extension\nUsing [gem-release](https://github.com/svenfuchs/gem-release):\n```shell\nvi CHANGELOG.md \u0026\u0026 git add CHANGELOG.md \u0026\u0026 git commit -m \"Update CHANGELOG.md\" \u0026\u0026 git push\ngem signin\ngem bump --version minor --tag --push --release --sign\n```\nFor `--version`, use `major|minor|patch` as needed.\n\n## Multi-versions\n* For ruby, just use RVM to switch between supported ruby version specified in `.gemspec`.\n* To run with different jekyll versions, [Appraisal](https://github.com/thoughtbot/appraisal) is used with [`Appraisals`](Appraisals) to generate different [`gemfiles/`](gemfiles/)\n   - To use a specific Gemfile, run like\n      ```shell\n      BUNDLE_GEMFILE=gemfiles/jekyll_4.x.x.gemfile bundle exec rake spec\n      bundle exec appraisal jekyll-4.x.x rake spec\n      ```\n   - To run `rake spec` for all gemfiles:\n      ```shell\n      bundle exec appraisal rake spec\n      ```\n   - To generate new/updated gemfiles from `Appraisals`\n      ```shell\n      bundle exec appraisal install\n      bundle exec appraisal generate\n      ```\n\n## Travis\nTo use the [travis cli client](https://github.com/travis-ci/travis.rb) (installed from `Gemfile`):\n1. Get a GitHub OAuth token by\n   - going to [github.com/settings/tokens](https://github.com/settings/tokens)\n   - create a new token named `travis-cli`\n   - Set the scopes `repo`, `read:org`, `user:email` according to the [docs](https://docs.travis-ci.com/user/github-oauth-scopes).\n1. Set travis.com as the default so we don't need to add `--pro` to most commands\n   ```shell\n   bundle exec travis endpoint --set-default --api-endpoint https://api.travis-ci.com/\n   ```\n1. Login with the cli client\n   ```shell\n   bundle exec travis login --github-token $GITHUB_TOKEN\n   ```\n1. Now the cli client can be used (might need `--pro` to use travis.com)\n   ```shell\n   bundle exec travis lint\n   bundle exec travis accounts\n   bundle exec travis status\n   bundle exec travis branches\n   bundle exec travis monitor\n   ```\n\n# Contributing\nBug reports and pull requests are welcome on GitHub at https://github.com/erikw/jekyll-google_search_console_verification_file.\n\n# License\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n# More Jekyll\nCheck out my other Jekyll repositories [here](https://github.com/erikw?tab=repositories\u0026q=jekyll-\u0026type=\u0026language=\u0026sort=).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferikw%2Fjekyll-google_search_console_verification_file","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferikw%2Fjekyll-google_search_console_verification_file","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferikw%2Fjekyll-google_search_console_verification_file/lists"}