Closed start141 closed 8 years ago
我在本机http://0.0.0.0:4000/ 预览和部署到github、gitcafe都同样要翻墙一次才能正常加载fancybox。
第一次不翻墙的时候这个圈圈基本上很难停下来,偶尔可以停下来,停下来就可以点击浏览图片了。 停下之后重新刷新一下又会变得一直转。
我的配置如下:
# Hexo Configuration
## Docs: http://hexo.io/docs/configuration.html
## Source: https://github.com/hexojs/hexo/
# Site
title: start141
subtitle:
description: start141's blog
author: start141
author_title: 'Android Developer'
avatar: /res/avatar.png
location: '中国, 深圳'
follow: http://weibo.com/start141
email: # Your email (Used to show Gravatar).
language: zh-CN
timezone:
since: # The start year showing in your copyright section.
# URL
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url: http://start141.gitcafe.io
root: /
permalink: :year/:month/:day/:title/
permalink_defaults:
# Directory
source_dir: source
public_dir: public
tag_dir: tags
archive_dir: archives
category_dir: categories
code_dir: downloads/code
i18n_dir: :lang
skip_render:
# Writing
new_post_name: :title.md # File name of new posts
default_layout: post
titlecase: false # Transform title into titlecase
external_link: true # Open external links in new tab
filename_case: 0
render_drafts: false
post_asset_folder: false
relative_link: false
future: true
highlight:
enable: true
line_number: true
tab_replace:
# Category & Tag
default_category: uncategorized
category_map:
tag_map:
# Date / Time format
## Hexo uses Moment.js to parse and display date
## You can customize the date format as defined in
## http://momentjs.com/docs/#/displaying/format/
date_format: YYYY-MM-DD
time_format: HH:mm:ss
# Pagination
## Set per_page to 0 to disable pagination
per_page: 5
pagination_dir: page
# Extensions
## Plugins: https://github.com/hexojs/hexo/wiki/Plugins
## Themes: https://github.com/hexojs/hexo/wiki/Themes
theme: icarus
# Disqus
# disqus_shortname: hexo-theme-icarus
# DuoShuo
# duoshuo_shortname: hexo-theme-icarus
# Deployment
## Docs: http://hexo.io/docs/deployment.html
deploy:
type: git
repository:
github: git@github.com:start141/start141.github.io,master
gitcafe: git@gitcafe.com:start141/start141.git,gitcafe-pages
# Logo
logo: css/images/logo.png # Empty this to unset logo and show site title in the same place
# Header
menu:
首页: .
归档: archives
分类: categories
标签: tags
关于: about
# Content
excerpt_link: Read More
fancybox: true
# Profile
profile: true # Whether to show profile bar
gravatar: false # Whether to use gravatar with the email. If you do, put your email address in your site's `_config.yml`.
# Sidebar
sidebar: right # set to false if you don't want a sidebar
widgets:
- recent_posts
- category
- tag
#- tagcloud
- archive
thumbnail: true
# Contacts
contacts:
github: http://github.com/start141
# twitter: '#'
# facebook: '#'
# dribbble: '#'
# rss: atom.xml
# Links
links:
Hexo: http://hexo.io
# CDN
cdn: # You can choose "useso" instead of "google apis"(default).
# cdn: useso
# OR
# cdn:
# Miscellaneous
google_site_verification:
google_analytics:
favicon: /res/favicon.png
twitter:
google_plus:
fb_admins:
fb_app_id:
你把cdn切换到cdn: useso
试试
只能等下周一试了,电脑没带回家。
可能是<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js 太慢了
另外,请问怎样可以不显示分享按钮?
你的cdn_after_footer.ejs的一个路径是不是写错了?
<% if (theme.cdn == "useso"){ %>
<script src="//ajax.useso.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<% } else { %>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<% } %>
src="//ajax.useso.com/ajax/libs/jquery/2.1.3/jquery.min.js"
是不是少了"http:"
并不是,这是一种写法
原来如此
我把jquery.min.js文件的cdn路径替换成http://cdn.bootcss.com/jquery/2.1.3/jquery.min.js
了,
这样就快很多了。
我看你这个主题的fancybox相关的js好像是放到theme里面的,但是为什么我总是要先翻墙(第一次访问)之后才能点击浏览图片呢?是不是加载有问题呢?
已经更新了最新的代码。cdn我没改,用了默认的google api。麻烦作者看能否找到原因,谢谢!