rdoc-markdown 0.6.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rdoc-markdown (0.6.0)
4
+ rdoc-markdown (0.8.0)
5
5
  csv
6
6
  erb
7
7
  rdoc
@@ -10,64 +10,194 @@ PATH
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- commonmarker (2.6.3-aarch64-linux)
14
- commonmarker (2.6.3-arm-linux)
15
- commonmarker (2.6.3-arm64-darwin)
16
- commonmarker (2.6.3-x86_64-darwin)
17
- commonmarker (2.6.3-x86_64-linux)
18
- commonmarker (2.6.3-x86_64-linux-musl)
13
+ actionview (8.1.3)
14
+ activesupport (= 8.1.3)
15
+ builder (~> 3.1)
16
+ erubi (~> 1.11)
17
+ rails-dom-testing (~> 2.2)
18
+ rails-html-sanitizer (~> 1.6)
19
+ activesupport (8.1.3)
20
+ base64
21
+ bigdecimal
22
+ concurrent-ruby (~> 1.0, >= 1.3.1)
23
+ connection_pool (>= 2.2.5)
24
+ drb
25
+ i18n (>= 1.6, < 2)
26
+ json
27
+ logger (>= 1.4.2)
28
+ minitest (>= 5.1)
29
+ securerandom (>= 0.3)
30
+ tzinfo (~> 2.0, >= 2.0.5)
31
+ uri (>= 0.13.1)
32
+ ast (2.4.3)
33
+ base64 (0.3.0)
34
+ better_html (2.2.0)
35
+ actionview (>= 7.0)
36
+ activesupport (>= 7.0)
37
+ ast (~> 2.0)
38
+ erubi (~> 1.4)
39
+ parser (>= 2.4)
40
+ smart_properties
41
+ bigdecimal (4.1.2)
42
+ builder (3.3.0)
43
+ commonmarker (2.8.1-x86_64-linux)
44
+ concurrent-ruby (1.3.6)
45
+ connection_pool (3.0.2)
46
+ crass (1.0.6)
19
47
  csv (3.3.5)
20
48
  date (3.5.1)
21
- erb (6.0.1)
49
+ diff-lcs (2.0.0)
50
+ docile (1.4.1)
51
+ drb (2.2.3)
52
+ erb (6.0.4)
53
+ erb_lint (0.9.0)
54
+ activesupport
55
+ better_html (>= 2.0.1)
56
+ parser (>= 2.7.1.4)
57
+ rainbow
58
+ rubocop (>= 1)
59
+ smart_properties
60
+ erubi (1.13.1)
61
+ i18n (1.14.8)
62
+ concurrent-ruby (~> 1.0)
63
+ io-console (0.8.2)
64
+ irb (1.18.0)
65
+ pp (>= 0.6.0)
66
+ prism (>= 1.3.0)
67
+ rdoc (>= 4.0.0)
68
+ reline (>= 0.4.2)
69
+ json (2.19.4)
70
+ language_server-protocol (3.17.0.5)
71
+ lint_roller (1.1.0)
72
+ logger (1.7.0)
73
+ loofah (2.25.1)
74
+ crass (~> 1.0.2)
75
+ nokogiri (>= 1.12.0)
22
76
  minitest (5.27.0)
23
- nokogiri (1.19.0-aarch64-linux-gnu)
24
- racc (~> 1.4)
25
- nokogiri (1.19.0-aarch64-linux-musl)
26
- racc (~> 1.4)
27
- nokogiri (1.19.0-arm-linux-gnu)
28
- racc (~> 1.4)
29
- nokogiri (1.19.0-arm-linux-musl)
30
- racc (~> 1.4)
31
- nokogiri (1.19.0-arm64-darwin)
32
- racc (~> 1.4)
33
- nokogiri (1.19.0-x86_64-darwin)
34
- racc (~> 1.4)
35
- nokogiri (1.19.0-x86_64-linux-gnu)
36
- racc (~> 1.4)
37
- nokogiri (1.19.0-x86_64-linux-musl)
77
+ minitest-strict (1.0.0)
78
+ minitest (>= 5.21, < 7)
79
+ mutant (0.16.2)
80
+ diff-lcs (>= 1.6, < 3)
81
+ irb (~> 1.15)
82
+ parser (~> 3.3.10)
83
+ regexp_parser (~> 2.10)
84
+ securerandom (>= 0.3)
85
+ sorbet-runtime (~> 0.6.0)
86
+ unparser (>= 0.8.2, < 0.10)
87
+ mutant-minitest (0.16.2)
88
+ minitest (>= 5.11, < 7)
89
+ mutant (= 0.16.2)
90
+ mutex_m (~> 0.2)
91
+ mutex_m (0.3.0)
92
+ nokogiri (1.19.2-x86_64-linux-gnu)
38
93
  racc (~> 1.4)
94
+ parallel (1.28.0)
95
+ parser (3.3.11.1)
96
+ ast (~> 2.4.1)
97
+ racc
98
+ pp (0.6.3)
99
+ prettyprint
100
+ prettyprint (0.2.0)
101
+ prism (1.9.0)
39
102
  psych (5.3.1)
40
103
  date
41
104
  stringio
42
105
  racc (1.8.1)
43
- rake (13.3.1)
44
- rdiscount (2.2.7.3)
106
+ rails-dom-testing (2.3.0)
107
+ activesupport (>= 5.0.0)
108
+ minitest
109
+ nokogiri (>= 1.6)
110
+ rails-html-sanitizer (1.7.0)
111
+ loofah (~> 2.25)
112
+ nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
113
+ rainbow (3.1.1)
114
+ rake (13.4.2)
115
+ rdiscount (2.2.7.4)
45
116
  rdoc (7.2.0)
46
117
  erb
47
118
  psych (>= 4.0.0)
48
119
  tsort
120
+ regexp_parser (2.12.0)
121
+ reline (0.6.3)
122
+ io-console (~> 0.5)
49
123
  reverse_markdown (3.0.2)
50
124
  nokogiri
125
+ rubocop (1.84.2)
126
+ json (~> 2.3)
127
+ language_server-protocol (~> 3.17.0.2)
128
+ lint_roller (~> 1.1.0)
129
+ parallel (~> 1.10)
130
+ parser (>= 3.3.0.2)
131
+ rainbow (>= 2.2.2, < 4.0)
132
+ regexp_parser (>= 2.9.3, < 3.0)
133
+ rubocop-ast (>= 1.49.0, < 2.0)
134
+ ruby-progressbar (~> 1.7)
135
+ unicode-display_width (>= 2.4.0, < 4.0)
136
+ rubocop-ast (1.49.1)
137
+ parser (>= 3.3.7.2)
138
+ prism (~> 1.7)
139
+ rubocop-performance (1.26.1)
140
+ lint_roller (~> 1.1)
141
+ rubocop (>= 1.75.0, < 2.0)
142
+ rubocop-ast (>= 1.47.1, < 2.0)
143
+ ruby-progressbar (1.13.0)
144
+ securerandom (0.4.1)
145
+ simplecov (0.22.0)
146
+ docile (~> 1.1)
147
+ simplecov-html (~> 0.11)
148
+ simplecov_json_formatter (~> 0.1)
149
+ simplecov-html (0.13.2)
150
+ simplecov_json_formatter (0.1.4)
151
+ smart_properties (1.17.0)
152
+ sorbet-runtime (0.6.13163)
153
+ standard (1.54.0)
154
+ language_server-protocol (~> 3.17.0.2)
155
+ lint_roller (~> 1.0)
156
+ rubocop (~> 1.84.0)
157
+ standard-custom (~> 1.0.0)
158
+ standard-performance (~> 1.8)
159
+ standard-custom (1.0.2)
160
+ lint_roller (~> 1.0)
161
+ rubocop (~> 1.50)
162
+ standard-performance (1.9.0)
163
+ lint_roller (~> 1.1)
164
+ rubocop-performance (~> 1.26.0)
51
165
  stringio (3.2.0)
52
166
  tsort (0.2.0)
167
+ tzinfo (2.0.6)
168
+ concurrent-ruby (~> 1.0)
169
+ unicode-display_width (3.2.0)
170
+ unicode-emoji (~> 4.1)
171
+ unicode-emoji (4.2.0)
172
+ unparser (0.9.0)
173
+ diff-lcs (>= 1.6, < 3)
174
+ parser (>= 3.3.0)
175
+ prism (>= 1.5.1)
176
+ uri (1.1.1)
177
+ yard (0.9.43)
178
+ yard-lint (1.5.1)
179
+ yard (~> 0.9)
180
+ zeitwerk (~> 2.6)
181
+ zeitwerk (2.7.5)
53
182
 
54
183
  PLATFORMS
55
- aarch64-linux-gnu
56
- aarch64-linux-musl
57
- arm-linux-gnu
58
- arm-linux-musl
59
- arm64-darwin
60
- x86_64-darwin
61
184
  x86_64-linux-gnu
62
- x86_64-linux-musl
63
185
 
64
186
  DEPENDENCIES
65
- bundler (~> 2.0)
187
+ bundler (>= 2.0)
66
188
  commonmarker
189
+ erb_lint
67
190
  minitest (~> 5.0)
191
+ minitest-strict (~> 1.0)
192
+ mutant
193
+ mutant-minitest
194
+ mutex_m
68
195
  rake (~> 13.0)
69
196
  rdiscount (~> 2.0)
70
197
  rdoc-markdown!
198
+ simplecov (~> 0.22)
199
+ standard
200
+ yard-lint
71
201
 
72
202
  BUNDLED WITH
73
- 2.6.1
203
+ 4.0.10
data/README.md CHANGED
@@ -1,10 +1,15 @@
1
1
  # RDoc-Markdown
2
2
  RDoc plugin to generate markdown documentation and search index file (CSV).
3
3
 
4
+ > [!CAUTION]
5
+ > This gem relies on multiple hacks to generate "plausible" markdown documentation. This is **NOT PRODUCTION READY**, use at your own risk.
6
+ >
7
+ > rdoc maintainers are actively working on markdown support, things will improve with time...
8
+
4
9
  ## Motivation
5
- Markdown has become the de-facto documentation standard. I heavily rely on Obsidian to render my storage of markdown notes. But markdown is used not just for scribbles, supported is far and wide. We can render markdown file on any device, probably even on thermometer with a screen. But also everyone knows enough markdown to be dangerous (or productive).
10
+ Markdown has become the de-facto documentation standard. We can render markdown file on any device, possibly on thermometer with a screen. And everyone knows markdown...
6
11
 
7
- It's a pitty that rdoc and yard can't output a proper markdown file. I would like to change that.
12
+ It's a pitty that rdoc can't output a proper markdown file. Somebody has to try and build it.
8
13
 
9
14
  ## Installation
10
15
 
@@ -16,7 +21,7 @@ If bundler is not being used to manage dependencies, install the gem by executin
16
21
 
17
22
  $ gem install rdoc-markdown
18
23
  ## Examples
19
- Find examples in [/examples](/example/) folder. You can regenerate examples by running `./bin/generate.sh`, it will produce examples based on file in `test/data/*` folder.
24
+ Find examples in [/example](/example/) folder. You can regenerate examples by running `./bin/generate.sh`; it produces the sample docs from `test/data/example.rb` and a pinned `jekyll-seo-tag` example from `vendor/jekyll-seo-tag`.
20
25
 
21
26
 
22
27
  ## Usage
@@ -28,6 +33,22 @@ Run following command in directory with ruby source code:
28
33
 
29
34
  This will produce a tree of markdown documents and search index in `/doc` folder. Every class in library will have it's own markdown file.
30
35
 
36
+ ### Unknown HTML tags
37
+ rdoc-markdown uses `reverse_markdown` to convert RDoc's HTML fragments to Markdown. You can configure how unknown HTML tags are handled with:
38
+
39
+ ```sh
40
+ rdoc --format=markdown --markdown-unknown-tags=raise
41
+ ```
42
+
43
+ Accepted values are `pass_through`, `drop`, `bypass`, and `raise`. The default is `pass_through`, which matches `reverse_markdown`'s default behavior.
44
+
45
+ The same setting can be stored in RDoc's `.rdoc_options` file:
46
+
47
+ ```yaml
48
+ ---
49
+ markdown_unknown_tags: :raise
50
+ ```
51
+
31
52
  ## Note on index.csv file
32
53
  This gem emits index of all markdown files in a index.csv file.
33
54
 
@@ -57,6 +78,7 @@ Following command should run entire testsuit:
57
78
  ```
58
79
  rake test
59
80
  ```
81
+ The test suite loads `minitest-strict`, so boolean and nil assertions only pass on exact `true`, `false`, and `nil` values.
60
82
  Testing is not excessive, just verifies that basic functionality is operational.
61
83
 
62
84
  To validate generated markdown against GitHub Flavored Markdown and check local links/anchors:
@@ -69,6 +91,7 @@ This task validates:
69
91
 
70
92
  - generated sample docs,
71
93
  - checked-in `example/` docs,
94
+ - generated `jekyll-seo-tag` docs,
72
95
  - vendored minitest docs,
73
96
  - vendored rails docs (Active Support, Active Record, Action Pack, Railties slices).
74
97
 
@@ -81,6 +104,12 @@ MARKDOWN_VALIDATE_STRICT_VENDOR=1 rake markdown:validate
81
104
 
82
105
  This task is also executed in CI.
83
106
 
107
+ To lint markdown ERB templates:
108
+
109
+ ```
110
+ bundle exec rake erb:lint
111
+ ```
112
+
84
113
  ### Integration harness: minitest
85
114
  To run the integration harness against minitest (aligned with docs.seattlerb.org/minitest):
86
115
 
@@ -106,15 +135,17 @@ Use rake tasks to generate markdown output for vendored projects:
106
135
 
107
136
  ```
108
137
  rake vendor:setup
138
+ rake vendor:docs:jekyll_seo_tag
109
139
  rake vendor:docs:minitest
110
140
  rake vendor:docs:rails
111
- # or generate both
141
+ # or generate all
112
142
  rake vendor:docs
113
143
  ```
114
144
 
115
145
  Output is written to:
116
146
 
117
147
  - `vendor/docs/minitest`
148
+ - `vendor/docs/jekyll-seo-tag`
118
149
  - `vendor/docs/rails`
119
150
 
120
151
  ## Release
data/Rakefile CHANGED
@@ -5,6 +5,11 @@ require "rdoc/rdoc"
5
5
  require "rdoc/markdown"
6
6
  require_relative "test/support/markdown_validator"
7
7
 
8
+ JEKYLL_SEO_TAG_NAME = "jekyll-seo-tag"
9
+ JEKYLL_SEO_TAG_REF = "v2.8.0"
10
+ JEKYLL_SEO_TAG_TITLE = "#{JEKYLL_SEO_TAG_NAME} #{JEKYLL_SEO_TAG_REF.delete_prefix("v")}"
11
+ JEKYLL_SEO_TAG_VENDOR_PATH = "vendor/#{JEKYLL_SEO_TAG_NAME}"
12
+
8
13
  Rake::TestTask.new do |t|
9
14
  t.verbose = true
10
15
  t.warning = false
@@ -13,6 +18,13 @@ end
13
18
 
14
19
  task default: [:test]
15
20
 
21
+ namespace :erb do
22
+ desc "Lint markdown ERB templates"
23
+ task :lint do
24
+ sh "bundle exec erb_lint --lint-all"
25
+ end
26
+ end
27
+
16
28
  namespace :markdown do
17
29
  desc "Validate generated markdown as GitHub Flavored Markdown"
18
30
  task :validate do
@@ -22,12 +34,7 @@ namespace :markdown do
22
34
  FileUtils.mkdir_p(validation_root)
23
35
 
24
36
  sample_output = File.join(validation_root, "sample")
25
- generate_markdown_docs(
26
- title: "sample",
27
- root: File.expand_path("test/data", __dir__),
28
- output: sample_output,
29
- files: [File.expand_path("test/data/example.rb", __dir__)]
30
- )
37
+ generate_sample_docs(output: sample_output)
31
38
 
32
39
  sample_count = MarkdownValidator.new(sample_output).validate!
33
40
  puts "Validated #{sample_count} markdown files in #{sample_output}"
@@ -52,6 +59,14 @@ namespace :markdown do
52
59
  puts "Validated #{minitest_count} markdown files in #{minitest_output}"
53
60
  puts "Skipped #{minitest_validator.unresolved_links} unresolved local links in vendored minitest docs"
54
61
 
62
+ Rake::Task["vendor:setup:jekyll_seo_tag"].invoke
63
+ jekyll_seo_tag_output = File.join(validation_root, JEKYLL_SEO_TAG_NAME)
64
+ generate_jekyll_seo_tag_docs(output: jekyll_seo_tag_output)
65
+ jekyll_seo_tag_validator = MarkdownValidator.new(jekyll_seo_tag_output, strict_links: strict_vendor_links)
66
+ jekyll_seo_tag_count = jekyll_seo_tag_validator.validate!
67
+ puts "Validated #{jekyll_seo_tag_count} markdown files in #{jekyll_seo_tag_output}"
68
+ puts "Skipped #{jekyll_seo_tag_validator.unresolved_links} unresolved local links in vendored jekyll-seo-tag docs"
69
+
55
70
  Rake::Task["vendor:setup:rails"].invoke
56
71
  rails_root = File.expand_path("vendor/rails", __dir__)
57
72
  rails_output = File.join(validation_root, "rails")
@@ -100,13 +115,60 @@ def generate_markdown_docs(title:, root:, output:, files:)
100
115
  RDoc::RDoc.new.document(options)
101
116
  end
102
117
 
118
+ def generate_sample_docs(output:)
119
+ generate_markdown_docs(
120
+ title: "sample",
121
+ root: File.expand_path("test/data", __dir__),
122
+ output: output,
123
+ files: [File.expand_path("test/data/example.rb", __dir__)]
124
+ )
125
+ end
126
+
127
+ def jekyll_seo_tag_root
128
+ File.expand_path(JEKYLL_SEO_TAG_VENDOR_PATH, __dir__)
129
+ end
130
+
131
+ def generate_jekyll_seo_tag_docs(output:)
132
+ root = jekyll_seo_tag_root
133
+ unless Dir.exist?(root)
134
+ raise "Missing #{JEKYLL_SEO_TAG_VENDOR_PATH}. Run `rake vendor:setup:jekyll_seo_tag` first."
135
+ end
136
+
137
+ generate_markdown_docs(
138
+ title: JEKYLL_SEO_TAG_TITLE,
139
+ root: root,
140
+ output: output,
141
+ files: Dir[File.join(root, "lib/**/*.rb")].uniq
142
+ )
143
+ end
144
+
145
+ namespace :examples do
146
+ desc "Generate checked-in example markdown docs"
147
+ task :generate do
148
+ Rake::Task["vendor:setup:jekyll_seo_tag"].invoke
149
+
150
+ sample_output = File.expand_path("example", __dir__)
151
+ staging_root = File.expand_path("tmp/examples-generate", __dir__)
152
+ staged_sample_output = File.join(staging_root, "example")
153
+
154
+ FileUtils.rm_rf(staging_root)
155
+ generate_sample_docs(output: staged_sample_output)
156
+ generate_jekyll_seo_tag_docs(output: File.join(staged_sample_output, JEKYLL_SEO_TAG_NAME))
157
+
158
+ FileUtils.rm_rf(sample_output)
159
+ FileUtils.mv(staged_sample_output, sample_output)
160
+
161
+ puts "Generated sample markdown docs in #{sample_output}"
162
+ puts "Generated #{JEKYLL_SEO_TAG_NAME} markdown docs in #{File.join(sample_output, JEKYLL_SEO_TAG_NAME)}"
163
+ ensure
164
+ FileUtils.rm_rf(staging_root) if staging_root
165
+ end
166
+ end
167
+
103
168
  def minitest_docs_files(root)
104
169
  files = Dir[File.join(root, "lib/**/*.rb")]
105
170
  files.concat(Dir[File.join(root, "*.rdoc")])
106
171
 
107
- manifest = File.join(root, "Manifest.txt")
108
- files << manifest if File.file?(manifest)
109
-
110
172
  files.uniq
111
173
  end
112
174
 
@@ -131,25 +193,45 @@ end
131
193
 
132
194
  namespace :vendor do
133
195
  namespace :setup do
134
- MINITEST_REF = "v6.0.1"
135
- RAILS_REF = ENV.fetch("RAILS_REF", "main")
196
+ minitest_ref = "v6.0.1"
197
+ rails_ref = ENV.fetch("RAILS_REF", "main")
198
+
199
+ desc "Clone/update vendor/jekyll-seo-tag and checkout docs-aligned tag"
200
+ task :jekyll_seo_tag do
201
+ ensure_git_checkout(
202
+ path: JEKYLL_SEO_TAG_VENDOR_PATH,
203
+ url: "https://github.com/jekyll/jekyll-seo-tag.git",
204
+ ref: JEKYLL_SEO_TAG_REF
205
+ )
206
+ Dir.chdir(JEKYLL_SEO_TAG_VENDOR_PATH) do
207
+ sh "git fetch --tags --force"
208
+ sh "git checkout #{JEKYLL_SEO_TAG_REF}"
209
+ end
210
+ end
136
211
 
137
212
  desc "Clone/update vendor/minitest and checkout docs-aligned tag"
138
213
  task :minitest do
139
- ensure_git_checkout(path: "vendor/minitest", url: "https://github.com/minitest/minitest.git", ref: MINITEST_REF)
140
- Dir.chdir("vendor/minitest") { sh "git checkout #{MINITEST_REF}" }
214
+ ensure_git_checkout(path: "vendor/minitest", url: "https://github.com/minitest/minitest.git", ref: minitest_ref)
215
+ Dir.chdir("vendor/minitest") { sh "git checkout #{minitest_ref}" }
141
216
  end
142
217
 
143
218
  desc "Clone/update vendor/rails"
144
219
  task :rails do
145
- ensure_git_checkout(path: "vendor/rails", url: "https://github.com/rails/rails.git", ref: RAILS_REF)
220
+ ensure_git_checkout(path: "vendor/rails", url: "https://github.com/rails/rails.git", ref: rails_ref)
146
221
  end
147
222
  end
148
223
 
149
224
  desc "Prepare all vendored repositories"
150
- task setup: ["vendor:setup:minitest", "vendor:setup:rails"]
225
+ task setup: ["vendor:setup:jekyll_seo_tag", "vendor:setup:minitest", "vendor:setup:rails"]
151
226
 
152
227
  namespace :docs do
228
+ desc "Generate markdown docs for vendored jekyll-seo-tag"
229
+ task :jekyll_seo_tag do
230
+ output = File.expand_path("vendor/docs/#{JEKYLL_SEO_TAG_NAME}", __dir__)
231
+ generate_jekyll_seo_tag_docs(output: output)
232
+ puts "Generated #{JEKYLL_SEO_TAG_NAME} markdown docs in #{output}"
233
+ end
234
+
153
235
  desc "Generate markdown docs for vendored minitest"
154
236
  task :minitest do
155
237
  root = File.expand_path("vendor/minitest", __dir__)
@@ -176,7 +258,7 @@ namespace :vendor do
176
258
  end
177
259
 
178
260
  desc "Generate markdown docs for all vendored repositories"
179
- task all: [:minitest, :rails]
261
+ task all: [:jekyll_seo_tag, :minitest, :rails]
180
262
  end
181
263
 
182
264
  desc "Generate markdown docs for all vendored repositories"
data/example/Bird.md CHANGED
@@ -1,11 +1,11 @@
1
1
  # Class Bird
2
- <a id="class-Bird"></a>
2
+ <a id="class-bird"></a>
3
3
 
4
4
  The base class for all birds.
5
5
 
6
6
  ### Public Instance Methods
7
7
 
8
- #### `fly(string, number) -> bool`
8
+ #### `fly(direction: string, velocity: number) -> bool`
9
9
  <a id="method-i-fly"></a>
10
10
 
11
11
  Fly somewhere.
data/example/Duck.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # Class Duck
2
- <a id="class-Duck"></a>
2
+ <a id="class-duck"></a>
3
3
 
4
4
  A duck is a [`Waterfowl`](Waterfowl.md) [`Bird`](Bird.md).
5
5
 
data/example/Object.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # Class Object
2
- <a id="class-Object"></a>
2
+ <a id="class-object"></a>
3
3
 
4
4
  ### Constants
5
5
 
data/example/Waterfowl.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # Module Waterfowl
2
- <a id="module-Waterfowl"></a>
2
+ <a id="module-waterfowl"></a>
3
3
 
4
4
  A mixin for waterfowl creatures.
5
5
 
@@ -0,0 +1,40 @@
1
+ # Class Jekyll::SeoTag::AuthorDrop
2
+ <a id="class-jekyll-seotag-authordrop"></a>
3
+
4
+ A drop representing the current page’s author
5
+
6
+ Author name will be pulled from:
7
+
8
+ 1. The page’s `author` key
9
+
10
+ 2. The first author in the page’s `authors` key
11
+
12
+ 3. The `author` key in the site config
13
+
14
+ If the result from the name search is a string, we’ll also check for additional author metadata in `site.data.authors`
15
+
16
+ ### Public Class Methods
17
+
18
+ #### `new(page: nil, site: nil)`
19
+ <a id="method-c-new"></a>
20
+
21
+ Initialize a new [`AuthorDrop`](AuthorDrop.md)
22
+
23
+ page - The page hash (e.g., Page#to\_liquid) site - The Jekyll::Drops::SiteDrop
24
+
25
+ ### Public Instance Methods
26
+
27
+ #### `name()`
28
+ <a id="method-i-name"></a>
29
+
30
+ [`AuthorDrop#to_s`](AuthorDrop.md#method-i-to_s) should return name, allowing the author drop to safely replace `page.author`, if necessary, and remain backwards compatible
31
+
32
+ #### `to_s()`
33
+ <a id="method-i-to_s"></a>
34
+
35
+ Alias for: [`name`](#method-i-name)
36
+
37
+ #### `twitter()`
38
+ <a id="method-i-twitter"></a>
39
+
40
+ Not documented.