Step 1. Add the JitPack repository to your build file
Add it in your root settings.gradle at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
Add it in your settings.gradle.kts at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}
Add to pom.xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Add it in your build.sbt at the end of resolvers:
resolvers += "jitpack" at "https://jitpack.io"
Add it in your project.clj at the end of repositories:
:repositories [["jitpack" "https://jitpack.io"]]
Step 2. Add the dependency
dependencies {
implementation 'com.github.Jamling:hexo-theme-nova:'
}
dependencies {
implementation("com.github.Jamling:hexo-theme-nova:")
}
<dependency>
<groupId>com.github.Jamling</groupId>
<artifactId>hexo-theme-nova</artifactId>
<version></version>
</dependency>
libraryDependencies += "com.github.Jamling" % "hexo-theme-nova" % ""
:dependencies [[com.github.Jamling/hexo-theme-nova ""]]
The nova is a hexo theme using swig template aimed to build your github project site conveniently.
The theme provided three layouts to demonstrate the page.
post
for blogproject
for github project pagepage
for other pagesresume
for resume pagesdonate
for danate pagesNova also provided lots of helper scripts as plugins to co-work with the theme, e.g. donate, toc, project side bar.
Welcome to visit My blog (https://www.ieclipse.cn/en/) to see the demo.
Here is some special feature of Nova.
hexo-generator-search
and hexo-submit-urls-to-search-engine
insteadUpdate leancloud article views counter
Migrate: visit LeanCloud console,update Counter class,update pageId to xid,views to time。
Cd to your blog root directory
$ git clone git@github.com:Jamling/hexo-theme-nova.git themes/nova
Then
1. Change site <var>_config.yml</var> set theme: nova
to use the theme.
2. Make _config.nova.yml under blog dir to overide theme default config.
3. Install dependencies under blog dir.
Nova theme used some 3rd plugins to help. Need to install these plugins in your site/blog before using nova.
npm install hexo-renderer-sass --save
npm install hexo-generator-i18n --save
npm install hexo-generator-github --save
npm install hexo-filter-highlight --save
npm install cheerio --save // hexo >= 5.0
npm install hexo-renderer-swig --save // hexo >= 5.0
project
layout page in your sources.Error: Cannot find module '../../../node_modules/cheerio'
Error: Cannot find module '../../../node_modules/lodash'
Since hexo 5.0, lodash and cheerio is removed from dependencies, please install them.
Add global js and css sample:
js_css:
- url: //cdn.bootcss.com/jquery/2.2.0/jquery.min.js
- url: //cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.min.css
- url: css/nova.css
Configurate the site menus
menu:
- name: home
url: /
- name: project
url: /p/
- name: category
url: /categories/
- name: archive
url: /archives/
- name: about
url: /about/
the <var>name</var> will be translated.
# post widgets. see layout/post/widget_xxx.swig
post_widgets:
# - search
- category
- tag
- archive
- recent
post_widgets_show_count: true
post_widgets_recent_count: 5
# archive
archive:
type: yearly #yearly|monthly(defaut) see list_archives options
order: -1 # 1(asc)|-1(desc) defaut desc
format: YYYY
show_count: false # true|false, defaut true
amount: 5 # amount in post widgets
# toc
toc:
post: true
project: true
page: true
donate:
enable: true # whether enable page donate
The donate 2d-code image suggested to more than 200*200px and named to donate_aliplay.png, donate_wechat.png
Configure the html page layout, the master branch use bootstrap, so the gird css is bootstrap grid css.
layout:
index: # index some to post.
main: col-sx-12 col-sm-8 col-md-9 col-lg-9
widgets: col-sx-12 col-sm-4 col-md-3 col-lg-3 hidden-xs
page: #common page
main: col-sx-12 col-sm-8 col-md-9 col-lg-9
toc: col-sx-12 col-sm-4 col-md-3 col-lg-3 hidden-xs
p: #project
sidebar: col-sx-12 col-sm-12 col-md-2 col-lg-2
main: col-sx-12 col-sm-8 col-md-8 col-lg-8
toc: col-sx-2 col-sm-2 col-md-2 col-lg-2 hidden-xs
Please see nova layouts
Please see nova front-matter
Please see nova helpers
Please see nova plugins for more information.