Add tags to allow list and add re-cache button
This commit is contained in:
@@ -13,7 +13,7 @@ module Admin
|
|||||||
bookmark.url
|
bookmark.url
|
||||||
|
|
||||||
tempfile = Down.download(bookmark.url)
|
tempfile = Down.download(bookmark.url)
|
||||||
content = Readability::Document.new(tempfile.read, tags: %w[div p h1 h2 h3 h4 h5 h6]).content
|
content = Readability::Document.new(tempfile.read, tags: %w[div section header p h1 h2 h3 h4 h5 h6 ol ul li table td tr thead tbody a]).content
|
||||||
|
|
||||||
bookmark_repo.update(id: bookmark_id, cached_content: content)
|
bookmark_repo.update(id: bookmark_id, cached_content: content)
|
||||||
|
|
||||||
|
@@ -18,6 +18,8 @@ div class="max-w-prose mx-auto"
|
|||||||
div
|
div
|
||||||
- if bookmark.cached_content
|
- if bookmark.cached_content
|
||||||
a href="/bookmark/#{bookmark.slug}" View cached version
|
a href="/bookmark/#{bookmark.slug}" View cached version
|
||||||
|
span —
|
||||||
|
button hx-post="/admin/bookmarks/cache/#{bookmark.id}" Re-cache
|
||||||
- else
|
- else
|
||||||
button hx-post="/admin/bookmarks/cache/#{bookmark.id}" No cached content, cache now?
|
button hx-post="/admin/bookmarks/cache/#{bookmark.id}" No cached content, cache now?
|
||||||
td
|
td
|
||||||
|
Reference in New Issue
Block a user