You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-15Lines changed: 15 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,13 +31,13 @@ Why use this plugin?
31
31
32
32
33
33
### !TL;DidRead
34
-
There 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`<meta> 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.
34
+
There 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 a`<meta> 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 the meta tag, I recommend this plugin.
35
35
36
-
However if you feel that it's bloated to add this `<meta>` tag to the header all you pages, keeping file size and page load speed in mind, you may one to go for the filebased verification method instead.
36
+
However, if you feel that it's bloated to add this `<meta>` tag to the header of all your pages, keeping file size and page load speed in mind, you may one to go for the file-based verification method instead.
37
37
38
-
So with the filebased 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.
38
+
So 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 an SSG (Static Site Generator), we should generate everything we can. It's very nice to keep the source tree clean and make everything that can be a configuration that generates what is needed.
39
39
40
-
Thus, 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/`!
40
+
Thus, this plugin exists to solve this problem. Give the plugin the unique code GSC provided you, and it will generate the file for you in `_site/`!
41
41
42
42
Note that if you do place a verification file in the root of the source tree, this will override the generation by this plugin.
43
43
@@ -60,27 +60,27 @@ Note that if you do place a verification file in the root of the source tree, th
60
60
plugins:
61
61
- jekyll-google_search_console_verification_file
62
62
```
63
-
1. Get the GSC unique code for you website.
63
+
1. Get the GSC unique code for your website.
64
64
1. Register your website at [Google Search Console](https://search.google.com/search-console?resource_id=https://erikw.me/)
65
65
1. From the main dashboard of your site at GSC: _Settings > Ownership Verification > HTML File_ and download the unique file
66
-
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`.
66
+
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`.
67
67
1. In your site's `_config.yml`, configure this plugin with the code from the previous step:
68
68
```yml
69
69
google_search_console:
70
70
verification_file_code: 47733b3288357e4
71
71
```
72
-
1. Now just build your site and verify that the verification file now exist!
72
+
1. Now, just build your site and verify that the verification file now exists!
73
73
```console
74
74
$ bundle exec jekyll build
75
75
$ ls _site/ | grep "google.*\.html"
76
76
google47733b3288357e4.html
77
77
```
78
78
79
79
# Development
80
-
The 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).
80
+
The 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).
81
81
82
82
After checking out the repo;
83
-
1. Install [RVM](https://rvm.io/rvm/install) and install a supported ruby version (see .gemspec)
83
+
1. Install [RVM](https://rvm.io/rvm/install) and install a supported Ruby version (see .gemspec)
84
84
1. run `scripts/setup` to install dependencies
85
85
1. run `scripts/test` to run the tests
86
86
1. You can also run `scripts/console` for an interactive prompt that will allow you to experiment.
@@ -89,7 +89,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
89
89
90
90
91
91
## Local development
92
-
Following 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.
92
+
Following 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.
93
93
94
94
1. Clone this repo to your machine, say at `~/src/jekyll-google_search_console_verification_file`
95
95
1. In your Jekyll project's `Gemfile`:
@@ -98,13 +98,13 @@ Following the setup at [how-to-specify-local-ruby-gems-in-your-gemfile](https://
98
98
1. Configure bundler to use a local path for this gem in this project:
1. Now the project will build with the local clone of this plugin when issuing e.g. `bundle exec jekyll build`
101
+
1. Now the project will build with the local clone of this plugin when issuing e.g., `bundle exec jekyll build`
102
102
1. When you're done:
103
103
- Remove the local override with: `$ bundle config --delete local.jekyll-google_search_console_verification_file`
104
-
- Optionally restore the original gem include in `Gemfile` or keep building from a branch in the github repo.
104
+
- Optionally restore the original gem included in `Gemfile` or keep building from a branch in the GitHub repo.
105
105
106
106
## Releasing
107
-
Instructions 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.
107
+
Instructions for releasing on rubygems.org are below. Optionally make a GitHub [release](https://github.com/erikw/jekyll-google_search_console_verification_file/releases) after this for the pushed git tag.
108
108
109
109
## [manual] Using bundler/gem_tasks rake tasks
110
110
Following instructions from [bundler.io](https://bundler.io/guides/creating_gem.html#releasing-the-gem):
For `--version`, use `major|minor|patch` as needed.
130
130
131
131
## Multi-versions
132
-
* For ruby, just use RVM to switch between supported ruby version specified in `.gemspec`.
132
+
* For Ruby, just use RVM to switch between supported Ruby versions specified in `.gemspec`.
133
133
* To run with different jekyll versions, [Appraisal](https://github.com/thoughtbot/appraisal) is used with [`Appraisals`](Appraisals) to generate different [`gemfiles/`](gemfiles/)
134
134
- To use a specific Gemfile, run like
135
135
```shell
@@ -156,7 +156,7 @@ To use the [travis cli client](https://github.com/travis-ci/travis.rb) (installe
0 commit comments