markdowndocs 0.2.3 → 0.3.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.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3a49d71e98d368188a3ed6a4437651f03880e691a8f520ee1067cd62c5fa4882
|
|
4
|
+
data.tar.gz: 7b3646a743326288758bbfef6322b27a3e9ed75dd54c2c8edcec6f4671428f8c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2b7b057ab57104c261bdd5b6d3d5d06527450a2b68469d42af79f58652e9f3a752b4dbd69b4c386d3e323cfb6bb7f55a4279e9fe324e6b8d5bee211bdfc12f0b
|
|
7
|
+
data.tar.gz: 0aa8ea43096b87a21396084f59648d8f23762af311e1459703c2074196d6d02cc69dfe950b84b2849e4aff513aacf80d6a40c2f38b98f03417248fa35be7d76b
|
|
@@ -23,10 +23,10 @@ export default class extends Controller {
|
|
|
23
23
|
const MiniSearch = (await this.loadMiniSearch()).default || (await this.loadMiniSearch())
|
|
24
24
|
|
|
25
25
|
this.miniSearch = new MiniSearch({
|
|
26
|
-
fields: ["title", "description", "content"],
|
|
26
|
+
fields: ["title", "description", "content", "keywords"],
|
|
27
27
|
storeFields: ["title", "description"],
|
|
28
28
|
searchOptions: {
|
|
29
|
-
boost: { title: 3, description: 2 },
|
|
29
|
+
boost: { title: 3, description: 2, keywords: 4 },
|
|
30
30
|
fuzzy: 0.2,
|
|
31
31
|
prefix: true
|
|
32
32
|
}
|
|
@@ -5,7 +5,7 @@ module Markdowndocs
|
|
|
5
5
|
# Represents markdown documentation files from a configurable directory.
|
|
6
6
|
# Handles metadata extraction, frontmatter parsing, and category associations.
|
|
7
7
|
class Documentation
|
|
8
|
-
attr_reader :slug, :title, :description, :category, :file_path
|
|
8
|
+
attr_reader :slug, :title, :description, :category, :file_path, :keywords
|
|
9
9
|
|
|
10
10
|
def initialize(file_path)
|
|
11
11
|
@file_path = file_path
|
|
@@ -117,6 +117,7 @@ module Markdowndocs
|
|
|
117
117
|
|
|
118
118
|
@title ||= slug.titleize
|
|
119
119
|
@description ||= "Documentation for #{@title}"
|
|
120
|
+
@keywords = Array(parsed[:frontmatter]["keywords"])
|
|
120
121
|
end
|
|
121
122
|
|
|
122
123
|
def parse_frontmatter
|
data/lib/markdowndocs/version.rb
CHANGED