39 | 40 | ``` yml 41 | # Hexo Configuration 42 | ## Docs: http://hexo.io/docs/configuration.html 43 | ## Source: https://github.com/hexojs/hexo/ 44 | 45 | # Site 46 | title: My Blog 47 | description: My Blog Description 48 | author: HiiTea 49 | language: zh-CN 50 | timezone: Asia/Shanghai 51 | favicon: https://assets-cdn.github.com/favicon.ico 52 | 53 | # URL 54 | ## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/' 55 | url: http://sabrinaluo.com/tech 56 | root: /tech/ 57 | permalink: :year/:month/:day/:title/ 58 | permalink_defaults: 59 | 60 | # Directory 61 | source_dir: source 62 | public_dir: public 63 | tag_dir: tags 64 | archive_dir: archives 65 | category_dir: categories 66 | code_dir: downloads/code 67 | i18n_dir: :lang 68 | skip_render: 69 | 70 | # Writing 71 | new_post_name: :year:month:day-:title.md # File name of new posts 72 | default_layout: post 73 | titlecase: false # Transform title into titlecase 74 | external_link: true # Open external links in new tab 75 | filename_case: 0 76 | render_drafts: false 77 | post_asset_folder: false 78 | relative_link: false 79 | future: true 80 | highlight: 81 | enable: true 82 | line_number: true 83 | auto_detect: false 84 | tab_replace: 85 | 86 | # Category & Tag 87 | default_category: uncategorized 88 | category_map: 89 | tag_map: 90 | 91 | # Date / Time format 92 | ## Hexo uses Moment.js to parse and display date 93 | ## You can customize the date format as defined in 94 | ## http://momentjs.com/docs/#/displaying/format/ 95 | date_format: YYYY-MM-DD 96 | time_format: HH:mm:ss 97 | 98 | # Pagination 99 | ## Set per_page to 0 to disable pagination 100 | per_page: 0 101 | pagination_dir: page 102 | 103 | # Extensions 104 | ## Plugins: http://hexo.io/plugins/ 105 | ## Themes: http://hexo.io/themes/ 106 | theme: replica 107 | 108 | # Google Analytics 109 | ga: # GA code UA-XXXXXXXX-X 110 | 111 | #marked setting for markdown 112 | marked: 113 | gfm: true 114 | pedantic: false 115 | sanitize: false 116 | tables: true 117 | breaks: true 118 | smartLists: true 119 | smartypants: true 120 | 121 | gcs: # GOOGLE CUSTOM SEARCH 122 | baidutongji: # BAIDU TONGJI CODE 123 | disqus: # DISQUS ID 124 | 125 | location: Hong Kong 126 | email: xx@example.com 127 | 128 | avatar: https://avatars2.githubusercontent.com/u/5300359?v=4&s=460 129 | social: 130 | github: https://github.com/sabrinaluo 131 | weibo: http://weibo.com/206663121 132 | linkedin: 133 | 134 | # flagcounter 135 | flagcounter_href: # https://info.flagcounter.com/xxxx 136 | flagcounter_img_src: # https://s01.flagcounter.com/xxxx 137 | ``` 138 | 139 | #### Update 140 | ``` bash 141 | cd themes/replica 142 | git pull 143 | ``` 144 | 145 | In case you want the old version with grey navbar 146 | ``` bash 147 | cd themes/replica 148 | git checkout 1.0 # AKA `git checkout -b 1.0 origin/1.0` 149 | ``` 150 |
151 |25 | <%= post.content 26 | .replace(/<[^>]*>/ig, ' ') 27 | .substr(0, 150) %>... 28 |
29 | 34 |Recent post
14 |23 | <%= post.content 24 | .replace(/<[^>]*>/ig, ' ') 25 | .substr(0, 50) %> 26 |
27 |28 | 29 | <% if(post.categories.data[0]){ %> 30 | <%= post.categories.data[0].name %> 31 | <% } else { %> 32 | <%= 'Uncategorized' %> 33 | <% } %> 34 | 35 | <%= post.tags.length %> 36 |
37 |