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: 1a94678490cfbf0ad5351412ccb04dcf9938d0bfae47184b333a18f06d8a605c
4
- data.tar.gz: 9214f78fe1209a67c633909bbe8abd2e09af3fc229e3aee016cbb59604e79b77
3
+ metadata.gz: 3a49d71e98d368188a3ed6a4437651f03880e691a8f520ee1067cd62c5fa4882
4
+ data.tar.gz: 7b3646a743326288758bbfef6322b27a3e9ed75dd54c2c8edcec6f4671428f8c
5
5
  SHA512:
6
- metadata.gz: 24d803af2159fc9deedb4a2b681d2689b4329a88fb384391e820df9adeff787ca9c2206bfae41f511340b0b78d4c0066f1639b0f48462ab42fcb2e80b021ec90
7
- data.tar.gz: '02359d490827c09532c4e063e6fc1596cbdaa89b0632404fe18d40cdb16513780f4b19029e60e9b3619174f8f3cc1f4186b91f476b7d799a3d833e41ee4f7b35'
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
  }
@@ -26,7 +26,8 @@ module Markdowndocs
26
26
  id: doc.slug,
27
27
  title: doc.title,
28
28
  description: doc.description,
29
- content: doc.plain_text_content
29
+ content: doc.plain_text_content,
30
+ keywords: doc.keywords.join(" ")
30
31
  }
31
32
  end.to_json
32
33
  end
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Markdowndocs
4
- VERSION = "0.2.3"
4
+ VERSION = "0.3.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: markdowndocs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dave Chmura