Browse Source

feat: Add mercury-parsed content to summary page

ttimasdf 5 years ago
parent
commit
2bf496e7e9
2 changed files with 15 additions and 0 deletions
  1. 2 0
      archivebox/index/schema.py
  2. 13 0
      archivebox/themes/legacy/link_details.html

+ 2 - 0
archivebox/index/schema.py

@@ -408,6 +408,7 @@ class Link:
             'warc_path': 'warc',
             'warc_path': 'warc',
             'singlefile_path': 'singlefile.html',
             'singlefile_path': 'singlefile.html',
             'readability_path': 'readability/content.html',
             'readability_path': 'readability/content.html',
+            'mercury_path': 'mercury/content.html',
             'pdf_path': 'output.pdf',
             'pdf_path': 'output.pdf',
             'screenshot_path': 'screenshot.png',
             'screenshot_path': 'screenshot.png',
             'dom_path': 'output.html',
             'dom_path': 'output.html',
@@ -429,6 +430,7 @@ class Link:
                 'dom_path': static_path,
                 'dom_path': static_path,
                 'singlefile_path': static_path,
                 'singlefile_path': static_path,
                 'readability_path': static_path,
                 'readability_path': static_path,
+                'mercury_path': static_path,
             })
             })
         return canonical
         return canonical
 
 

+ 13 - 0
archivebox/themes/legacy/link_details.html

@@ -413,6 +413,19 @@
                           </div>
                           </div>
                         </div>
                         </div>
                     </div>
                     </div>
+                    <br/>
+                    <div class="col-lg-3">
+                        <div class="card">
+                            <iframe class="card-img-top" src="$mercury_path" sandbox="allow-same-origin allow-scripts allow-forms" scrolling="no"></iframe>
+                            <div class="card-body">
+                                <a href="$mercury_path" style="float:right" title="Open in new tab..." target="_blank" rel="noopener">
+                                    <img src="../../static/external.png" class="external"/>
+                                </a>
+                                <a href="$mercury_path" target="preview"><h4 class="card-title">mercury</h4></a>
+                                <p class="card-text">archive/mercury/...</p>
+                          </div>
+                        </div>
+                    </div>
                 </div>
                 </div>
             </div>
             </div>
         </header>
         </header>