Skip to content

Commit 3c041c9

Browse files
Format code & change default CDN for pdfobject (#470)
* Update _config.yml * Update pdf.swig
1 parent 63a42bc commit 3c041c9

File tree

2 files changed

+40
-32
lines changed

2 files changed

+40
-32
lines changed

_config.yml

Lines changed: 38 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ footer:
8888
version: true
8989
# -------------------------------------------------------------
9090
# Beian icp information for Chinese users. In China, every legal website should have a beian icp in website footer.
91-
# http://www.miitbeian.gov.cn/
91+
# http://www.miitbeian.gov.cn
9292
beian:
9393
enable: false
9494
icp:
@@ -98,7 +98,7 @@ footer:
9898
#custom_text: Hosted by <a target="_blank" rel="external nofollow" href="https://pages.coding.me"><b>Coding Pages</b></a>
9999

100100
# Creative Commons 4.0 International License.
101-
# https://creativecommons.org/share-your-work/licensing-types-examples/
101+
# https://creativecommons.org/share-your-work/licensing-types-examples
102102
# Available: by | by-nc | by-nc-nd | by-nc-sa | by-nd | by-sa | zero
103103
creative_commons:
104104
license: by-nc-sa
@@ -203,7 +203,7 @@ links_title: Links
203203
links_layout: block
204204
#links_layout: inline
205205
#links:
206-
#Title: http://example.com/
206+
#Title: http://example.com
207207

208208
# Sidebar Avatar
209209
avatar:
@@ -480,10 +480,13 @@ pdf:
480480
# If you set it to false, it will load PDFObject/PDF.js srcipt EVERY PAGE.
481481
per_page: true
482482

483+
height: 500px
484+
483485
pdfobject:
484-
# Use 2.1.1 as default, cloudflare as default CDN
485-
cdn: //cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js
486-
height: 500px
486+
# Use 2.1.1 as default, jsdelivr as default CDN, works everywhere even in China
487+
cdn: //cdn.jsdelivr.net/npm/pdfobject@2.1.1/pdfobject.min.js
488+
# CDNJS, provided by cloudflare, maybe the best CDN, but not works in China
489+
#cdn: //cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js
487490

488491
# Han Support
489492
# Dependencies: https://github.com/theme-next/theme-next-han
@@ -538,7 +541,7 @@ valine:
538541
#livere_uid: your uid
539542

540543
# Gitment
541-
# Introduction: https://imsun.net/posts/gitment-introduction/
544+
# Introduction: https://imsun.net/posts/gitment-introduction
542545
gitment:
543546
enable: false
544547
mint: true # RECOMMEND, A mint on Gitment, to support count, language and proxy_gateway
@@ -560,7 +563,7 @@ gitment:
560563
#baidushare:
561564
## type: button
562565

563-
# addthis Share, see: https://www.addthis.com/
566+
# addthis Share, see: https://www.addthis.com
564567
#add_this_id:
565568

566569
# NeedMoreShare2
@@ -592,29 +595,29 @@ needmoreshare2:
592595
networks: Weibo,Wechat,Douban,QQZone,Twitter,Facebook
593596

594597
# Google Webmaster tools verification setting
595-
# See: https://www.google.com/webmasters/
598+
# See: https://www.google.com/webmasters
596599
#google_site_verification:
597600

598601
# Google Analytics
599602
#google_analytics:
600603

601604
# Bing Webmaster tools verification setting
602-
# See: https://www.bing.com/webmaster/
605+
# See: https://www.bing.com/webmaster
603606
#bing_site_verification:
604607

605608
# Yandex Webmaster tools verification setting
606-
# See: https://webmaster.yandex.ru/
609+
# See: https://webmaster.yandex.ru
607610
#yandex_site_verification:
608611

609612
# Baidu Webmaster tools verification setting
610-
# See: https://ziyuan.baidu.com/site/
613+
# See: https://ziyuan.baidu.com/site
611614
#baidu_site_verification:
612615

613616
# CNZZ count
614617
#cnzz_siteid:
615618

616619
# Application Insights
617-
# See https://azure.microsoft.com/en-us/services/application-insights/
620+
# See https://azure.microsoft.com/en-us/services/application-insights
618621
# application_insights:
619622

620623
# Post widgets & FB/VK comments settings.
@@ -677,7 +680,7 @@ firestore:
677680
bluebird: false #enable this if you want to include bluebird 3.5.1(core version) Promise polyfill
678681

679682
# Show Views/Visitors of the website/page with busuanzi.
680-
# Get more information on http://ibruce.info/2015/04/04/busuanzi/
683+
# Get more information on http://ibruce.info/2015/04/04/busuanzi
681684
busuanzi_count:
682685
enable: false
683686
total_visitors: true
@@ -704,7 +707,7 @@ baidu_push: false
704707
# API Documentation:
705708
# https://developers.google.com/google-apps/calendar/v3/reference/events/list
706709
# Enabled APIs and services
707-
# api_key: https://console.developers.google.com/
710+
# api_key: https://console.developers.google.com
708711
# Create & manage a public Google calendar: https://support.google.com/calendar/answer/37083?hl=en
709712
calendar:
710713
enable: false
@@ -897,7 +900,7 @@ vendors:
897900
jquery:
898901

899902
# Internal version: 2.1.5
900-
# See: http://fancyapps.com/fancybox/
903+
# See: http://fancyapps.com/fancybox
901904
# Example:
902905
# fancybox: //cdn.jsdelivr.net/npm/fancybox@3.0.0/dist/js/jquery.fancybox.pack.js
903906
# fancybox_css: //cdn.jsdelivr.net/npm/fancybox@3.0.0/dist/css/jquery.fancybox.min.css
@@ -910,11 +913,14 @@ vendors:
910913
# See: https://github.com/ftlabs/fastclick
911914
# Example:
912915
# fastclick: //cdn.jsdelivr.net/npm/fastclick@1.0.6/lib/fastclick.min.js
916+
# fastclick: //cdnjs.cloudflare.com/ajax/libs/fastclick/1.0.6/fastclick.min.js
913917
fastclick:
914918

915919
# Internal version: 1.9.7
916920
# See: https://github.com/tuupola/jquery_lazyload
917-
# lazyload: //cdn.jsdelivr.net/npm/jquery_lazyload@1.9.3/jquery.lazyload.min.js
921+
# Example:
922+
# lazyload: //cdn.jsdelivr.net/npm/jquery_lazyload@1.9.7/jquery.lazyload.min.js
923+
# lazyload: //cdnjs.cloudflare.com/ajax/libs/jquery_lazyload/1.9.7/jquery.lazyload.min.js
918924
lazyload:
919925

920926
# Internal version: 1.2.1
@@ -926,26 +932,27 @@ vendors:
926932

927933
# Internal version: 1.2.1
928934
# See: http://VelocityJS.org
935+
# Example:
929936
# velocity_ui: //cdn.jsdelivr.net/npm/velocity-animate@1.2.1/velocity.ui.min.js
930937
# velocity_ui: //cdnjs.cloudflare.com/ajax/libs/velocity/1.2.1/velocity.ui.min.js
931938
velocity_ui:
932939

933940
# Internal version: 0.7.9
934-
# See: https://faisalman.github.io/ua-parser-js/
941+
# See: https://faisalman.github.io/ua-parser-js
935942
# Example:
936943
# ua_parser: //cdn.jsdelivr.net/npm/ua-parser-js@0.7.17/src/ua-parser.min.js
937944
# ua_parser: //cdnjs.cloudflare.com/ajax/libs/UAParser.js/0.7.9/ua-parser.min.js
938945
ua_parser:
939946

940947
# Internal version: 4.6.2
941-
# See: http://fontawesome.io/
948+
# See: http://fontawesome.io
942949
# Example:
943950
# fontawesome: //cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css
944951
# fontawesome: //cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.2/css/font-awesome.min.css
945952
fontawesome:
946953

947-
# Internal version: 1
948-
# https://www.algolia.com
954+
# Internal version: 2.4.1
955+
# See: https://www.algolia.com
949956
# Example:
950957
# algolia_instant_js: //cdn.jsdelivr.net/npm/instantsearch.js@2.4.1/dist/instantsearch.js
951958
# algolia_instant_css: //cdn.jsdelivr.net/npm/instantsearch.js@2.4.1/dist/instantsearch.min.css
@@ -983,44 +990,45 @@ vendors:
983990
canvas_sphere:
984991

985992
# Internal version: 1.0.0
986-
# https://github.com/zproo/canvas-ribbon
993+
# See: https://github.com/zproo/canvas-ribbon
987994
canvas_ribbon:
988995

989996
# Internal version: 3.3.0
990-
# https://github.com/ethantw/Han
997+
# See: https://github.com/ethantw/Han
991998
Han:
992999

9931000
# Internal version: 3.3.0
994-
# https://github.com/vinta/pangu.js
1001+
# See: https://github.com/vinta/pangu.js
9951002
# Example:
9961003
# pangu: //cdn.jsdelivr.net/npm/pangu@3.3.0/dist/browser/pangu.min.js
9971004
# pangu: //cdnjs.cloudflare.com/ajax/libs/pangu/3.3.0/pangu.min.js
9981005
pangu:
9991006

10001007
# needMoreShare2
1001-
# https://github.com/revir/need-more-share2
1008+
# See: https://github.com/revir/need-more-share2
10021009
# Example:
10031010
# needmoreshare2_js: //cdn.jsdelivr.net/gh/theme-next/theme-next-needmoreshare2@1.0.0/needsharebutton.min.js
10041011
# needmoreshare2_css: //cdn.jsdelivr.net/gh/theme-next/theme-next-needmoreshare2@1.0.0/needsharebutton.min.css
10051012
needmoreshare2_js:
10061013
needmoreshare2_css:
10071014

10081015
# bookmark
1009-
# Internal version: 1.0.0
1010-
# https://github.com/theme-next/theme-next-bookmark
1016+
# See: https://github.com/theme-next/theme-next-bookmark
10111017
# Example:
10121018
# bookmark: //cdn.jsdelivr.net/gh/theme-next/theme-next-bookmark@1.0.0/bookmark.min.js
10131019
bookmark:
10141020

10151021
# reading_progress
1016-
# Internal version: 1.0
1017-
# https://github.com/theme-next/theme-next-reading-progress
1022+
# See: https://github.com/theme-next/theme-next-reading-progress
10181023
# Example:
10191024
# reading_progress: //cdn.jsdelivr.net/gh/theme-next/theme-next-reading-progress@1.1/reading_progress.min.js
10201025
reading_progress:
10211026

10221027
# valine comment
1023-
# Example: https://cdn.jsdelivr.net/npm/valine@1.1.8/dist/Valine.min.js
1028+
# See: https://github.com/xCss/Valine
1029+
# Example:
1030+
# valine: //cdn.jsdelivr.net/npm/valine@1.3.3/dist/Valine.min.js
1031+
# valine: //cdnjs.cloudflare.com/ajax/libs/valine/1.3.3/Valine.min.js
10241032
valine:
10251033

10261034

layout/_third-party/pdf.swig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
view: "FitV"
2323
},
2424
PDFJS_URL: "/lib/pdf/web/viewer.html",
25-
height: "{{ theme.pdf.pdfobject.height }}"
25+
height: "{{ theme.pdf.height }}"
2626
};
2727
$("#main a").each(function() {
2828
var href = $(this).attr("href");
@@ -39,7 +39,7 @@
3939
position: relative;
4040
overflow: auto;
4141
width: 100%;
42-
height: {{ theme.pdf.pdfobject.height }};
42+
height: {{ theme.pdf.height }};
4343
}
4444
</style>
4545
{% endif %}

0 commit comments

Comments
 (0)