Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions _plugins/copy_markdown.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Jekyll::Hooks.register :site, :post_write do |site|
site.collections.each do |label, collection|
next unless label == 'articles'
collection.docs.each do |doc|
source_path = File.join(site.source, doc.relative_path)
next unless File.exist?(source_path)

dest_path = doc.destination(site.dest).sub(/\.html$/, '.md')
dest_dir = File.dirname(dest_path)
FileUtils.mkdir_p(dest_dir)
FileUtils.cp(source_path, dest_path)
end
end
end
2 changes: 1 addition & 1 deletion llms.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ sitemap: false

## Docs

{% for article in site.articles %}- [{{article.title}}](https://www.dynamsoft.com{{ article.url | relative_url }}): {{ article.description }}
{% for article in site.articles %}- [{{article.title}}](https://www.dynamsoft.com{{ article.url | relative_url | replace: '.html', '.md' }}): {{ article.description }}
{% endfor %}

## Samples
Expand Down
Loading