Code Monkey home page Code Monkey logo

hexo-theme-light's Introduction

Light

A simple theme for Hexo.

Install

Execute the following command and modify theme in _config.yml to light.

git clone --depth 1 https://github.com/hexojs/hexo-theme-light themes/light
_config.yml
- theme: some-theme
+ theme: light

Update

Execute the following command to update Light.

cd themes/light
git pull

Config

Default config:

menu:
  Home: /
  Archives: /archives

widgets:
- search
- category
- tag
- twitter

excerpt_link: Read More

twitter:
  username:
  show_replies: false
  tweet_count: 5

fancybox: true

google_analytics:
rss:
  • menu - Main navigation menu
  • widget - Widgets displaying in sidebar
  • excerpt_link - "Read More" link text at the bottom of excerpted articles
  • twitter - Twitter widget config
    • username - Twitter username
    • show_replies - Enable displaying replies
    • tweet_count - Tweets display in widget
  • fancybox - Enable Fancybox
  • google_analytics - Google Analytics ID
  • rss - RSS subscription link (change if using Feedburner)

Features

Gallery Post

Gallery Post

---
layout: photo
title: Gallery Post
photos:
- https://i.postimg.cc/c49xRqRP/1.jpg
- https://i.postimg.cc/288jLjZ4/2.jpg
- https://i.postimg.cc/T2cYP5pd/3.jpg
---

Link Post

Link Post

---
layout: link
title: Link Post
link: http://www.google.com/
---

Tweet Widget

Tweet Widget

Fancybox

Fancybox

hexo-theme-light's People

Contributors

0xflotus avatar boxersb avatar buoto avatar curbengh avatar douglarek avatar floriancargoet avatar imilnb avatar indigofeather avatar inetfuture avatar jdpaton avatar jjgod avatar juanitofatas avatar jvilaplana avatar laomao800 avatar leesei avatar louy2 avatar lzjqsdd avatar mariogrip avatar mkan0141 avatar moebrowne avatar piktaszuikis avatar ryanbreaker avatar stevenjoezhang avatar tomap avatar tommy351 avatar vslinko avatar xuanwo avatar ym avatar yoshinorin avatar yuyingwu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hexo-theme-light's Issues

最新版本的light的fancybox一个小问题

![](http://.../a.jpge)

用到上面形式的图片时,文章中无法以fancybox形式展示,而是直接跳转到了http://.../a.jpge,checkout回上一个版本就可以展示了,是我操作有问题吗?

Cannot be displayed properly after deployed

The local preview has no problem, but after the deployed of the blog, i just can see my blog's name and a big blank area.

Here is the prompt infomation:

The page build completed successfully, but returned the following warning for the master branch:

You are attempting to use a Jekyll theme, "light", which is not supported by GitHub Pages. Please visit https://pages.github.com/themes/ for a list of supported themes. If you are using the "theme" configuration variable for something other than a Jekyll theme, we recommend you rename this variable throughout your site. For more information, see https://help.github.com/articles/adding-a-jekyll-theme-to-your-github-pages-site/.

How can i fix it? Thanks

Cannot read property 'height' of undefined & TypeError

Wrong Code:

ERROR /Users/felixxiong/FelixXiongHexoFolder/themes/light/layout/layout.ejs:7
    5|   <div id="content" class="inner">
    6|     <div id="main-col" class="alignleft"><div id="wrapper"><%- body %></div></div>
 >> 7|     <aside id="sidebar" class="alignright"><%- partial('_partial/sidebar', {}, {cache: true}) %></aside>
    8|     <div class="clearfix"></div>
    9|   </div>
    10|   <footer id="footer" class="inner"><%- partial('_partial/footer') %></footer>

/Users/felixxiong/FelixXiongHexoFolder/themes/light/layout/_partial/sidebar.ejs:2
    1| <% theme.widgets.forEach(function(widget){ %>
 >> 2|   <%- partial('../_widget/' + widget) %>
    3| <% }); %>

/Users/felixxiong/FelixXiongHexoFolder/themes/light/layout/_widget/weibo.ejs:4
    2|   <h3 class="title">我的微博</h3>
    3|     <ul class="weibo">
 >> 4| 	<iframe width="100%" height="<%= theme.weibo.height%>" class="share_self"  frameborder="0" scrolling="no" src="<%- theme.weibo.url %>"></iframe>
    5|     </ul>
    6| </div>

Cannot read property 'height' of undefined
TypeError: /Users/felixxiong/FelixXiongHexoFolder/themes/light/layout/layout.ejs:7
    5|   <div id="content" class="inner">
    6|     <div id="main-col" class="alignleft"><div id="wrapper"><%- body %></div></div>
 >> 7|     <aside id="sidebar" class="alignright"><%- partial('_partial/sidebar', {}, {cache: true}) %></aside>
    8|     <div class="clearfix"></div>
    9|   </div>
    10|   <footer id="footer" class="inner"><%- partial('_partial/footer') %></footer>

/Users/felixxiong/FelixXiongHexoFolder/themes/light/layout/_partial/sidebar.ejs:2
    1| <% theme.widgets.forEach(function(widget){ %>
 >> 2|   <%- partial('../_widget/' + widget) %>
    3| <% }); %>

/Users/felixxiong/FelixXiongHexoFolder/themes/light/layout/_widget/weibo.ejs:4
    2|   <h3 class="title">我的微博</h3>
    3|     <ul class="weibo">
 >> 4| 	<iframe width="100%" height="<%= theme.weibo.height%>" class="share_self"  frameborder="0" scrolling="no" src="<%- theme.weibo.url %>"></iframe>
    5|     </ul>
    6| </div>

Cannot read property 'height' of undefined
    at eval (eval at compile (/Users/felixxiong/FelixXiongHexoFolder/node_modules/ejs/lib/ejs.js:584:12), <anonymous>:11:38)
    at returnedFn (/Users/felixxiong/FelixXiongHexoFolder/node_modules/ejs/lib/ejs.js:615:17)
    at Theme._View.View._compiledSync.locals [as _compiledSync] (/Users/felixxiong/FelixXiongHexoFolder/node_modules/hexo/lib/theme/view.js:120:22)
    at Theme._View.View.View.renderSync (/Users/felixxiong/FelixXiongHexoFolder/node_modules/hexo/lib/theme/view.js:48:23)
    at Object.partial (/Users/felixxiong/FelixXiongHexoFolder/node_modules/hexo/lib/plugins/helper/partial.js:39:15)
    at Object.wrapper [as partial] (/Users/felixxiong/FelixXiongHexoFolder/node_modules/lodash/lodash.js:4941:19)
    at eval (eval at compile (/Users/felixxiong/FelixXiongHexoFolder/node_modules/ejs/lib/ejs.js:584:12), <anonymous>:12:17)
    at Array.forEach (<anonymous>)
    at eval (eval at compile (/Users/felixxiong/FelixXiongHexoFolder/node_modules/ejs/lib/ejs.js:584:12), <anonymous>:9:22)
    at returnedFn (/Users/felixxiong/FelixXiongHexoFolder/node_modules/ejs/lib/ejs.js:615:17)
    at Theme._View.View._compiledSync.locals [as _compiledSync] (/Users/felixxiong/FelixXiongHexoFolder/node_modules/hexo/lib/theme/view.js:120:22)
    at Theme._View.View.View.renderSync (/Users/felixxiong/FelixXiongHexoFolder/node_modules/hexo/lib/theme/view.js:48:23)
    at fragment_cache (/Users/felixxiong/FelixXiongHexoFolder/node_modules/hexo/lib/plugins/helper/partial.js:36:52)
    at Object.fragmentCache (/Users/felixxiong/FelixXiongHexoFolder/node_modules/hexo/lib/plugins/helper/fragment_cache.js:9:32)
    at Object.wrapper [as fragment_cache] (/Users/felixxiong/FelixXiongHexoFolder/node_modules/lodash/lodash.js:4941:19)
    at Object.partial (/Users/felixxiong/FelixXiongHexoFolder/node_modules/hexo/lib/plugins/helper/partial.js:36:17)
    at Object.wrapper [as partial] (/Users/felixxiong/FelixXiongHexoFolder/node_modules/lodash/lodash.js:4941:19)
    at eval (eval at compile (/Users/felixxiong/FelixXiongHexoFolder/node_modules/ejs/lib/ejs.js:584:12), <anonymous>:18:17)
    at returnedFn (/Users/felixxiong/FelixXiongHexoFolder/node_modules/ejs/lib/ejs.js:615:17)
    at Theme._View.View._compiled.locals [as _compiled] (/Users/felixxiong/FelixXiongHexoFolder/node_modules/hexo/lib/theme/view.js:124:48)
    at Theme._View.View.View.render (/Users/felixxiong/FelixXiongHexoFolder/node_modules/hexo/lib/theme/view.js:29:15)
    at _compiled.then.result (/Users/felixxiong/FelixXiongHexoFolder/node_modules/hexo/lib/theme/view.js:40:23)

This is my folder:

Some widgets link:
pengloo53/Hexo-theme-light_cn/layout/

会考虑加入pjax吗?

Pjax 使得HTTP的请求次数变少,并且不会刷新整个界面。
无奈我一直不会弄。

How to show every pages in the bottom?

How to show every pages in the bottom? There are only next and pre botton in the bottom, I want to know how to show each page numbers in the bottom, like 1,2,3...?

>> 的顯示效果在中文排版中非常不理想

即爲 Markdown 的標記符號,對應的 HTML 標籤大概是

發現其引用效果爲居中,斜體字化,而中文就偏偏不適合這種西式排版風格。

而且字體比正文還大,既然引用本身就可能包含了大規模引用的情況,如果在這樣的情況,它比正文還喧賓奪主,就不妥了。

強烈期望改爲居左,去掉斜體字化,減小字號,能用楷體就更理想了。

可惜在下不懂前端設計,否則就會幫忙貢獻了。謝謝 tommy351 大大!

附示范图:
1

Next/Prev post items?

Hi Tommy,

I am currently adapting Hexo to create an art-directed blog, but I can't find a helper to get the next/prev links for post (instead of pages).

Any pointer on how could I achieve this?

Thanks for your concern!

Read more question

The problem that arises elsewhere in the configuration file is that reading more fails and search seems to be somewhat conflicting.
I do not know when the new page directly such as https:/ page name such, or can not get [...], he also checked the Internet.

German language tags?

I've installed the Light theme.
I've added language: en to _config.yml.
But for some reason on the live site, in the search bar it reads 'suche' which is German for search.
And Kommentare for comments?

Please help:

_config.yml:

# Hexo Configuration
## Docs: https://hexo.io/docs/configuration.html
## Source: https://github.com/hexojs/hexo/

# Site
title: The Writings of T.T. Gregg
subtitle:
description:
author: T.T. Gregg
language:  en
timezone:

# URL
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url: http://timothytgregg.github.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
  auto_detect: false
  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: 10
pagination_dir: page

# Extensions
## Plugins: https://hexo.io/plugins/
## Themes: https://hexo.io/themes/
theme: light

# Deployment
## Docs: https://hexo.io/docs/deployment.html
deploy:
  type: git
  repo: [email protected]:timothytgregg/timothytgregg.github.io.git
  branch: master

Links Widget

Hi,

Can you add a widget for add links to other websites ?

Thks a lot

Differents disqus instances for a same article

Hello,

I just had a "bug" with this theme. I shared an article with Buffer and this service added an url parameter and when a visitor posted a comment with this url, the comment was visible just with this url and this parameter.

To fix this problem, i added a line in layout/_partial/after_footer.ejs (just after var disqus_shortname)

var disqus_url = '<%= config.url +"/"+ page.path %>';

What do you think about this modification?

Slow rendering in comparison to `landscape`

So there's this issue I opened at hexo github page hexojs/hexo#1769 and we figured out that the light makes the pages generation 15 times slower than the landscape theme with 400 posts. Would you have an idea on what makes the light theme so slow in comparison to generate?

Edit

It's the tagcloud widget that actually slows down every page generation.

Follow widget

Hi,

Can you create a widget for add Follow link (G+/ Fb / 4square / linkedin etc...) ?

Thks a lot

LaTeX公式显示

您好,我想请问下如果使用light主题,如何更改配置可以使得LaTeX公式可以在页面中正常显示呢?还请您指导下。

archive的list式显示

<% if (pagination == 2){ %>
这行代码好像不起作用。
想要实现这种显示方式
Screen Shot 2013-04-04 at 8 27 51

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.