Skip to content

Commit

Permalink
Merge branch 'master' into feature/2018-05-21-handlebars
Browse files Browse the repository at this point in the history
# Conflicts:
#	htdocs/themes/default/templates/amp-index.html
#	htdocs/themes/default/templates/index.html
#	package.json
  • Loading branch information
fboes committed Jun 4, 2018
2 parents be52565 + f6a8834 commit bc04df8
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion htdocs/themes/default/templates/amp-index.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ <h1>{{meta.title}}{{#if meta.subtitle}}, {{meta.subtitle}}{{/if}}</h1>
{{else}}
<link itemprop="image" href="{{../config.ogImage}}" />
{{/if}}
<link itemprop="url mainEntityOfPage" href="{{meta.AbsoluteUrl}}" class="permalink u-url" rel="bookmark" />
<link itemprop="url mainEntityOfPage" href="{{meta.AbsoluteUrl}}" class="permalink u-url" />
<meta itemprop="wordCount" content="{{meta.Wordcount}}" />

<header>
Expand Down
4 changes: 2 additions & 2 deletions htdocs/themes/default/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ <h1 class="p-name">{{meta.title}}{{#if meta.subtitle}}, {{meta.subtitle}}{{/if}}
{{else}}
<link itemprop="image" href="{{config.ogImage}}" />
{{/if}}
<link itemprop="url mainEntityOfPage" href="{{meta.AbsoluteUrl}}" class="permalink u-url" rel="bookmark" />
<link itemprop="url mainEntityOfPage" href="{{meta.AbsoluteUrl}}" class="permalink u-url" />
<meta itemprop="wordCount" content="{{meta.Wordcount}}" />

<header>
Expand All @@ -85,7 +85,7 @@ <h1 class="p-name">{{meta.title}}{{#if meta.subtitle}}, {{meta.subtitle}}{{/if}}
<time datetime="{{meta.Modified.iso}}" itemprop="dateModified" class="modified dt-updated">{{meta.Modified.locale}}</time>
{{/if}}
<h2>
<a href="{{meta.Link}}">
<a href="{{meta.Link}}" rel="bookmark">
<span itemprop="name headline" class="p-name">{{meta.Title}}</span>
</a>
</h2>
Expand Down
1 change: 0 additions & 1 deletion lib/helpers/ampify.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ const ampify = function() {
.replace(/(<amp-img[^>]+?)(?:\s?\/)?>/g, '$1></amp-img>')
.replace(/(<amp-(?:video|iframe|audio|img).+?>).*?(<\/amp-(?:video|iframe|audio|img))/g, '$1$2')
.replace(/(<amp-(?:video|iframe|audio|img))/g, '$1 layout="responsive"')
.replace(/(<amp-(?:video|iframe|audio)[^>]+) (scrolling)=".+?"/g, '$1')
.replace(/(<amp-(?:video|iframe))/g, '$1 width="640" height="360"')
.replace(/(<amp-(?:audio))/g, '$1 width="640" height="60"')
.replace(/<amp-iframe([^>]*) src="https:\/\/www.youtube[^.]*.com\/embed\/(.+?)\?enablejsapi=1"([^>]*)><\/amp-iframe>/g, '<amp-youtube$1 data-videoid="$2"$3></amp-youtube>')
Expand Down
6 changes: 3 additions & 3 deletions lib/helpers/marky-mark.js
Original file line number Diff line number Diff line change
Expand Up @@ -416,19 +416,19 @@ const markyMark = function(string, rules) {
return inline
.replace(
/(?:<a)?[^>]*?youtube.+v=([a-zA-Z0-9\-_]+)[^>]*?(?:>(.+?)<\/a>)/g,
'<div class="video-player video-player--youtube"><iframe allowfullscreen="allowfullscreen" src="https://www.youtube-nocookie.com/embed/$1?enablejsapi=1" scrolling="no"></iframe><!-- img src="https://img.youtube.com/vi/$1/hqdefault.jpg" --></div>'
'<div class="video-player video-player--youtube"><iframe allowfullscreen="allowfullscreen" src="https://www.youtube-nocookie.com/embed/$1?enablejsapi=1"></iframe><!-- img src="https://img.youtube.com/vi/$1/hqdefault.jpg" --></div>'
)
.replace(
/(?:<a)?[^>]*?vimeo.com\/(\d+)[^>]*?(?:>(.+?)<\/a>)/g,
'<div class="video-player video-player--vimeo"><iframe allowfullscreen="allowfullscreen" src="https://player.vimeo.com/video/$1" scrolling="no"></iframe></div>'
'<div class="video-player video-player--vimeo"><iframe allowfullscreen="allowfullscreen" src="https://player.vimeo.com/video/$1"></iframe></div>'
)
.replace(
/(?:<a)?[^>]*?giphy.com\/gifs\/[^"]+-([a-zA-Z0-9]+)[^>]*?(?:>(.+?)<\/a>)/g,
'<img src="https://i.giphy.com/$1.gif" alt="" />'
)
.replace(
/(?:<a)?[^>]*?codepen\.io\/([a-zA-Z0-9\-_]+)\/pen\/([a-zA-Z0-9\-_]+)[^>]*?(?:>(.+?)<\/a>)/g,
'<div class="embed embed--codepen"><iframe allowfullscreen="allowfullscreen" src="//codepen.io/$1/embed/$2/?height=265&amp;theme-id=0&amp;default-tab=result&amp;embed-version=2" height="265" scrolling="no"></iframe></div>'
'<div class="embed embed--codepen"><iframe allowfullscreen="allowfullscreen" src="//codepen.io/$1/embed/$2/?height=265&amp;theme-id=0&amp;default-tab=result&amp;embed-version=2" height="265"></iframe></div>'
)
.replace(
/<a[^>]+href="([^"]+gist.github.com[^"]+)".+?<\/a>/g,
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@
"glob": "^7.0.5",
"gm": "^1.23.0",
"handlebars": "^4.0.11",
"inquirer": "^5.0.0",
"inquirer": "^6.0.0",
"inquirer-datepicker-prompt": "^0.4.2",
"js-yaml": "^3.11.0",
"marked": "^0.4.0",
"promise": "^8.0.0",
"remove-markdown": "^0.2.0",
"remove-markdown": "^0.3.0",
"shelljs": "^0.8.2"
},
"eslintConfig": {
Expand Down

0 comments on commit bc04df8

Please sign in to comment.