Хочу перехитрить время и надеюсь, что изучение чужих тем для Hexo нужно провести до того, как ваять свою. Даже, если эти темы сделаны с ошибками (как мне кажется). Все эти искания происходят от того, что "в принципе у нас все есть", но мелих "непоняток" слишком много...
В папку vendor принято складывать чужие библиотеки, я решил не отставать от моды и запихнул туда bootstrap¶
In [ ]:
F:\stradorusite\hexo\t1\vendor>bower i bootstrap jquery
bower not-cached https://github.com/twbs/bootstrap.git#*
bower resolve https://github.com/twbs/bootstrap.git#*
bower cached https://github.com/jquery/jquery-dist.git#2.2.3
bower validate 2.2.3 against https://github.com/jquery/jquery-dist.git#*
bower checkout bootstrap#v3.3.6
bower resolved https://github.com/twbs/bootstrap.git#3.3.6
bower install jquery#2.2.3
bower install bootstrap#3.3.6
jquery#2.2.3 bower_components\jquery
bootstrap#3.3.6 bower_components\bootstrap
└── jquery#2.2.3
In [ ]:
F:\stradorusite\hexo\t1\vendor>bower help
Usage:
bower <command> [<args>] [<options>]
Commands:
cache Manage bower cache
help Display help information about Bower
home Opens a package homepage into your favorite browser
info Info of a particular package
init Interactively create a bower.json file
install Install a package locally
link Symlink a package folder
list List local packages - and possible updates
login Authenticate with GitHub and store credentials
lookup Look up a package URL by name
prune Removes local extraneous packages
register Register a package
search Search for a package by name
update Update a local package
uninstall Remove a local package
unregister Remove a package from the registry
version Bump a package version
Options:
-f, --force Makes various commands more forceful
-j, --json Output consumable JSON
-l, --loglevel What level of logs to report
-o, --offline Do not hit the network
-q, --quiet Only output important information
-s, --silent Do not output anything, besides errors
-V, --verbose Makes output more verbose
--allow-root Allows running commands as root
-v, --version Output Bower version
--no-color Disable colors
See 'bower help <command>' for more information on a specific command.
Поищем bootstrap¶
In [ ]:
F:\stradorusite\hexo\t1\vendor>bower s bootstrap
Search results:
bootstrap https://github.com/twbs/bootstrap.git
bootstrap-bo https://github.com/brentoneill/bootstrap.git
x-bootstrap https://github.com/x-element/x-bootstrap.git
nr-bootstrap https://github.com/artbelov/nr-bootstrap.git
bem-bootstrap https://github.com/matmuchrapna/bem-bootstrap.git
hg-bootstrap https://github.com/HackerGaucho/hg-bootstrap.git
cd-bootstrap https://github.com/jairorudas/cd-bootstrap.git
ui.bootstrap https://github.com/angular-ui/bootstrap.git
mk-bootstrap https://github.com/geometrybase/mk-bootstrap.git
bootstrap-dv https://github.com/JKAussieSkater/Bootstrap-DV.git
ui-bootstrap https://github.com/angular-ui/bootstrap.git
bootstrap-pi https://github.com/guilhermegeek/bootstrap-pi.git
dd-bootstrap https://github.com/DeloitteDigitalUK/DDBootstrap.git
boost-bootstrap https://github.com/cristiangrojas/boost-bootstrap.git
bootstrap-cc https://github.com/chibicode/bootstrap-cc.git
bootstrap-ui https://github.com/angular-ui/bootstrap.git
bootstrap-ie https://github.com/ddouble/bsie.git
bootstrap-tl https://github.com/tomatolabs/bootstrap.git
ng-bootstrap https://github.com/ifgroup/ng-bootstrap.git
vue-bootstrap https://github.com/demohi/vue-bootstrap.git
xui-bootstrap https://github.com/spxis/xui-bootstrap.git
ng2-bootstrap https://github.com/valor-software/ng2-bootstrap.git
mnd-bootstrap https://github.com/mynewsdesk/mnd-bootstrap.git
bootstrap-tag https://github.com/gammasoft/bootstrap-tag.git
bootstrap-bower https://github.com/diegotoral/bootstrap-bower.git
bootstrap.css https://github.com/bowerjs/bootstrap.git
xdf-bootstrap https://github.com/xdfcn/bootstrap.git
geo-bootstrap https://github.com/divshot/geo-bootstrap.git
bootstrap-ulg https://github.com/magdev/bootstrap-ulg.git
bootstrap-amd https://github.com/InvisiLabs/bootstrap-amd.git
In [ ]:
F:\stradorusite\hexo\t1\vendor>bower s bootstrap4
Search results:
bootstrap4-rtl https://github.com/mmdsharifi/Bootstrap4-RTL.git
bootstrap4-jade https://github.com/Alex5646/bootstrap4-jade.git
bootstrap4-dist https://github.com/crsr/bootstrap4-dist.git
bootstrap4-chosen https://github.com/Dinu/bootstrap-chosen.git
In [ ]:
F:\stradorusite\hexo\t1>git clone https://github.com/wzpan/hexo-theme-freemind.git themes/freemind
Cloning into 'themes/freemind'...
remote: Counting objects: 2159, done.
remote: Total 2159 (delta 0), reused 0 (delta 0), pack-reused 2159 eceiving objects: 97% (2095/2159),
4.92 MiB | 1.62 MiB/s
Receiving objects: 100% (2159/2159), 35.15 MiB | 1.67 MiB/s, done.
Resolving deltas: 100% (999/999), done.
Checking connectivity... done.
Checking out files: 100% (97/97), done.
In [ ]:
F:\stradorusite\hexo\t1>npm install hexo-generator-search --save
hexo-site@0.0.0 F:\stradorusite\hexo\t1
`-- hexo-generator-search@1.0.2
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.12
F:\stradorusite\hexo\t1>npm install hexo-tag-bootstrap --save
hexo-site@0.0.0 F:\stradorusite\hexo\t1
`-- hexo-tag-bootstrap@0.0.8
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.12
In [ ]:
F:\stradorusite\hexo\t1>hexo new page about
INFO Created: F:\stradorusite\hexo\t1\source\about\index.md
In [ ]:
F:\stradorusite\hexo\t1>hexo clean
INFO Deleted database.
INFO Deleted public folder.
In [ ]:
F:\stradorusite\hexo\t1>cd themes/freemind
F:\stradorusite\hexo\t1\themes\freemind>git pull
Already up-to-date.
In [ ]:
F:\stradorusite\hexo\t1\themes\freemind>hexo server
INFO Start processing
INFO Hexo is running at http://localhost:4000/. Press Ctrl+C to stop.
INFO See you again
In [ ]:
F:\stradorusite\hexo\t1>git clone https://github.com/ptsteadman/hexo-theme-corporate.git themes/corporate
Cloning into 'themes/corporate'...
remote: Counting objects: 1032, done.
remote: Total 1032 (delta 0), reused 0 (delta 0), pack-reused 1032 eceiving objects: 100% (1032/1032), 9.17 MiB | 1.85 MiB/s
Receiving objects: 100% (1032/1032), 9.96 MiB | 1.84 MiB/s, done.
Resolving deltas: 100% (392/392), done.
Checking connectivity... done.
Checking out files: 100% (470/470), done.
А дальше пришлось вспомнить про git Bash
In [ ]:
alter_000@pb MINGW64 /f/stradorusite
$ cd hexo/t1
alter_000@pb MINGW64 /f/stradorusite/hexo/t1
$ cp -r themes/corporate/_source/* source
alter_000@pb MINGW64 /f/stradorusite/hexo/t1
$ hexo clean
INFO Deleted database.
alter_000@pb MINGW64 /f/stradorusite/hexo/t1
$ hexo server
INFO Start processing
INFO Hexo is running at http://localhost:4000/. Press Ctrl+C to stop.
Посты чуть ниже также могут вас заинтересовать
Комментариев нет:
Отправить комментарий