-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.txt
30 lines (21 loc) · 717 Bytes
/
template.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Use Instant View version 2.0
~version: "2.0"
# Use this template only blog article pages
?exists: /html/head/meta[@property="article:published_time"]
# Get article text in <article>
body: //article
# Get title from <h1>
title: $body//h1[1]
subtitle: $title/next-sibling::h2
author_url: //span[has-class("author")]//@href
# Get article cover image
cover: //img[has-class("wp-post-image")]
# Convert all iframe elements to inline element
@inline: $body//iframe[starts-with(@src, "/media/")]
# Remote header and footer
@remove: //article/header
@remove: //article/footer
# Replace p to figure
@replace_tag(<figure>): $body//p[.//img]
# Youtube Embedded Fix
@replace_tag(<figure>): $body//p[.//iframe]