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 +4 -4
- data/README.md +5 -1
- data/lib/mark_don/railtie.rb +1 -1
- data/lib/mark_don/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9a2daa5dd35b50296b320ead3addf73947a8208f7e1f5b745b745dfec33df9bc
|
|
4
|
+
data.tar.gz: 7aabe59d4530c5553d15e82d28b23153ac71a6f3a7ecb2f46ab4b38c21b1bcee
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
|
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:
|
data/lib/mark_don/railtie.rb
CHANGED
|
@@ -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
|
data/lib/mark_don/version.rb
CHANGED