mark-don 0.1.0 → 0.1.1

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: ec20e8729b15fd7da900cef5cf936a05d0ef8a9723c3c0eebf9da1e1d5871e83
4
- data.tar.gz: 7df81eba5231a490d4c6ebf6997a37742f815020d66b8192ff3070023a8eda3c
3
+ metadata.gz: 9a2daa5dd35b50296b320ead3addf73947a8208f7e1f5b745b745dfec33df9bc
4
+ data.tar.gz: 7aabe59d4530c5553d15e82d28b23153ac71a6f3a7ecb2f46ab4b38c21b1bcee
5
5
  SHA512:
6
- metadata.gz: 1790cf9de91540a29f4406472daf3f79d3611e96d9cf5f400a1d3d56e9facb1073f2b017226f545bad4b0fc8a3e134a989dce05f5a4dea073d87801f9e261858
7
- data.tar.gz: 6a4b37c896b08a148e2a1316ed80dca1f350941813fddcd08e13192645bee3925e9626bca6ec84b7e4dd22169eb6484f2818bd2567330a03b7b90a3a75a32e16
6
+ metadata.gz: 7ff2e6344440ba47a2ce323c5ae7375d5d17901a221f9a85435cc2c89a98cc965e9ef1bf818353968de9239f8c7501c1ed3f0acc403ca08a5954764fe2e18bd3
7
+ data.tar.gz: dea49fd0b020e2ca9d11b65f83685b5ebed062af9a7a1cfc45aa99b1f664ec913260aa3d3b00fb8b0d78e558416bb133e2a2929ed371245f2e787a73d42f1364
data/README.md CHANGED
@@ -1,9 +1,13 @@
1
1
  # mark-don
2
2
 
3
- Serve any Rails HTML view as Markdown no templates to write.
3
+ Serve any Rails HTML view as Markdown : no templates to write.
4
4
 
5
5
  When a client requests `text/markdown` (via `Accept` header or `.md` extension), mark-don intercepts the normal HTML render, converts the output on the fly, and returns it with `Content-Type: text/markdown`. Your existing `.html.erb` views are reused as-is.
6
6
 
7
+ ## Background
8
+
9
+ Inspired by [this Evil Martians article](https://evilmartians.com/chronicles/how-to-make-your-website-visible-to-llms) on making Rails apps visible to LLMs. The `.md` routes technique they describe is exactly what this gem automates.
10
+
7
11
  ## Installation
8
12
 
9
13
  Add to your Gemfile:
@@ -10,7 +10,7 @@ module MarkDon
10
10
  # method_missing (which recurses infinitely when the MIME symbol is :md but
11
11
  # the called method is :markdown).
12
12
  initializer 'mark_don.mime_type' do
13
- Mime::Type.register 'text/markdown', :markdown unless Mime[:md] || Mime[:markdown]
13
+ Mime::Type.register 'text/markdown', :markdown, [], ['md'] unless Mime[:md] || Mime[:markdown]
14
14
 
15
15
  unless ActionController::MimeResponds::Collector.method_defined?(:markdown)
16
16
  ActionController::MimeResponds::Collector.class_eval do
@@ -1,3 +1,3 @@
1
1
  module MarkDon
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mark-don
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Lahana