diff --git a/slices/admin/commands/bookmarks/cache.rb b/slices/admin/commands/bookmarks/cache.rb index a65463d..3e4e432 100644 --- a/slices/admin/commands/bookmarks/cache.rb +++ b/slices/admin/commands/bookmarks/cache.rb @@ -13,7 +13,7 @@ module Admin 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) diff --git a/slices/admin/templates/bookmarks/index.html.slim b/slices/admin/templates/bookmarks/index.html.slim index 5c03515..3fccdd6 100644 --- a/slices/admin/templates/bookmarks/index.html.slim +++ b/slices/admin/templates/bookmarks/index.html.slim @@ -18,6 +18,8 @@ div class="max-w-prose mx-auto" div - if bookmark.cached_content a href="/bookmark/#{bookmark.slug}" View cached version + span   —   + button hx-post="/admin/bookmarks/cache/#{bookmark.id}" Re-cache - else button hx-post="/admin/bookmarks/cache/#{bookmark.id}" No cached content, cache now? td