Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jade to pug if you like #343

Merged
merged 1 commit into from
Dec 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion layout/archive.jade → layout/archive.pug
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ block content
span.date= post.date.format('YYYY/MM/DD')
a(href=url_for(post.path), title=post.title)
+title(post)
include _partial/paginator.jade
include _partial/paginator.pug
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include _partial/helpers
include _partial/helpers.pug

if page.title
- var current_title = page.title
Expand All @@ -16,7 +16,7 @@ if config.feed
doctype html
html(lang='#{config.language}')

include _partial/head
include _partial/head.pug

body: .body_container
#header
Expand All @@ -32,7 +32,7 @@ html(lang='#{config.language}')
.pure-u-1.pure-u-md-4-4: .content_container
block content
.pure-u-1.pure-u-md-4-4
!= partial('_partial/footer.jade')
!= partial('_partial/footer.pug')

include _partial/totop
include _partial/after_footer
include _partial/totop.pug
include _partial/after_footer.pug
14 changes: 7 additions & 7 deletions layout/base.jade → layout/base.pug
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include _partial/helpers
include _partial/helpers.pug

if page.title
- var current_title = page.title
Expand All @@ -16,7 +16,7 @@ if config.feed
doctype html
html(lang='#{config.language}')

include _partial/head
include _partial/head.pug

body: .body_container
#header
Expand All @@ -34,13 +34,13 @@ html(lang='#{config.language}')
if theme.widgets_on_small_screens
.pure-u-1.pure-u-md-1-4: #sidebar
each item in theme.widgets
!= partial('_widget/' + item + '.jade', null, {cache: !config.relative_link})
!= partial('_widget/' + item + '.pug', null, {cache: !config.relative_link})
else
.pure-u-1-4.hidden_mid_and_down: #sidebar
each item in theme.widgets
!= partial('_widget/' + item + '.jade', null, {cache: !config.relative_link})
!= partial('_widget/' + item + '.pug', null, {cache: !config.relative_link})
.pure-u-1.pure-u-md-3-4
!= partial('_partial/footer.jade')
!= partial('_partial/footer.pug')

include _partial/totop
include _partial/after_footer
include _partial/totop.pug
include _partial/after_footer.pug
13 changes: 6 additions & 7 deletions layout/index.jade → layout/index.pug
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
extends base
- var current_title = page.title || tag.name || category.name || site.title

block title
block title
if config.subtitle
title= config.title + ' | ' + config.subtitle
else
title= config.title
block content

block content
for post in page.posts.toArray()
.post
h1.post-title
include _partial/helpers
include _partial/helpers.pug
a(href=url_for(post.path))
+title(post)
.post-meta= post.date.format(config.date_format)
Expand Down Expand Up @@ -45,12 +44,12 @@ block content
p(class='readmore')
a(href=url_for(post.path))= __('Readmore')

include _partial/paginator
include _partial/paginator.pug
if theme.disqus
script(id='dsq-count-scr', src='//#{theme.disqus}.disqus.com/count.js', async)
if theme.changyan
script#cy_cmt_num(src='https://changyan.sohu.com/upload/plugins/plugins.list.count.js?clientId=cyt4LaybM', async)
if config.mathjax
include _partial/mathjax
include _partial/mathjax.pug
if config.mathjax2
include _partial/mathjax2
include _partial/mathjax2.pug
2 changes: 1 addition & 1 deletion layout/page.jade → layout/page.pug
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ block content
if page.donate
iframe(src='/donate/?AliPayQR=#{theme.donate.alipay_qr}&WeChatQR=#{theme.donate.wechat_qr}&GitHub=#{theme.donate.github}&BTCQR=#{theme.donate.btc_qr}&BTCKEY=#{theme.donate.btc_key}&PayPal=#{theme.donate.paypal_url}',style='overflow-x:hidden;overflow-y:hidden; border:0xp none #fff; min-height:240px; width:100%;',frameborder='0',scrolling='no')
if page.comments
include _partial/comments
include _partial/comments.pug

8 changes: 4 additions & 4 deletions layout/post.jade → layout/post.pug
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ block content
iframe(src='/donate/?AliPayQR=#{theme.donate.alipay_qr}&WeChatQR=#{theme.donate.wechat_qr}&GitHub=#{theme.donate.github}&BTCQR=#{theme.donate.btc_qr}&BTCKEY=#{theme.donate.btc_key}&PayPal=#{theme.donate.paypal_url}',style='overflow-x:hidden;overflow-y:hidden; border:0xp none #fff; min-height:240px; width:100%;',frameborder='0',scrolling='no')
if theme.shareto == true
script(type='text/javascript', src=url_for(theme.js) + '/share.js' + '?v=' + theme.version, async)
a.article-share-link(data-url='#{page.permalink}', data-id='#{page._id}', data-qrcode=qrcode(page.permalink))= __('shareto')
a.article-share-link(data-url=page.permalink, data-id=page._id, data-qrcode=qrcode(page.permalink))= __('shareto')

include _partial/tag
include _partial/post_nav
include _partial/tag.pug
include _partial/post_nav.pug

if page.comments
include _partial/comments
include _partial/comments.pug
2 changes: 1 addition & 1 deletion layout/single-column.jade → layout/single-column.pug
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ block content
.post-content
!= page.content
if page.comments
include _partial/comments
include _partial/comments.pug
2 changes: 1 addition & 1 deletion layout/timeline.jade → layout/timeline.pug
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ block content
span.word= theme.timeline[i].word

if page.comments
include _partial/comments
include _partial/comments.pug

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"hexo-generator-index": "^0.1.0",
"hexo-generator-tag": "^0.1.0",
"hexo-renderer-ejs": "^0.1.0",
"hexo-renderer-jade": "^0.1.0",
"hexo-renderer-pug": "^0.0.5",
"hexo-renderer-marked": "^0.2.4",
"hexo-renderer-sass": "^0.1.2",
"hexo-renderer-stylus": "^0.2.3",
Expand Down