File: google_webmaster.rb

package info (click to toggle)
tdiary-contrib 5.0.2-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 2,576 kB
  • ctags: 1,957
  • sloc: ruby: 16,900; lisp: 514; xml: 451; php: 61; sql: 40; sh: 35; makefile: 33
file content (22 lines) | stat: -rw-r--r-- 775 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# encoding: utf-8
# google-webmaster.rb - embed a meta tag to let Google Webmaster tool know your verification code.
#
# Copyright (C) 2012, Tatsuya Sato <satoryu.1981@gmail.com>
# You can redistribute it and/or modify it under GPL2.
#

add_header_proc do
  "<meta name=\"google-site-verification\" content=\"#{h @conf['google_webmaster.verification']}\" />"
end

add_conf_proc('Google Webmaster', 'Google ウェブマスターツール', 'etc') do
  if @mode == 'saveconf'
    @conf['google_webmaster.verification'] = @cgi.params['google_webmaster.verification'][0]
  end
  <<-HTML
  <h3>Google ウェブマスターツールの検証コード</h3>
  <p>
  <input name='google_webmaster.verification' value="#{h @conf['google_webmaster.verification']}" />
  </p>
  HTML
end