Be a silentor, focus on writting your words down.
- 开箱即用(Fork 本项目立马可以使用)
- markdown only ,让你专注文章本身
- 友好的移动端支持
- 灵活的样式扩展,Extension
npm install
make serve
make dev
MIT
This project forked from staticjs/silentor
纯前端,基于markdown,开箱即用的博客
Home Page: http://jayin.github.io/silentor/
License: Apache License 2.0
Be a silentor, focus on writting your words down.
npm install
make serve
make dev
MIT
__P__
默认是p
一开始就看到loading 评论框,但最后又不显示,比较不友好
./img/
不够友好用户可能认为./img/
表示当前目录下上的img/
文件夹,实际上,逻辑目录上没有
例如
---blog
|---img
|---test.png
|---p
|---linux
|---test1.md
|---test2.md
|---ruby
用户在写test2.md这文章的时候,图片引用写成![title](./img/test.png)
,这样用户会认为当前目录(linux/
)下有个img
文件夹用户存放文件
实际上,我们约定图片都存放在{app_name}/img/
下
我正在浏览~?notes/linux/install-Java.md
linux下安装java,但是我文中提到如果你想安装XX请看之前的YY文章
这时候,我们就会弄个链接上去,但是问题来了,目前版本的silentor只能实现链接到统一目录下的文件
也就是只能链接到~?notes/linux/*.md
如果想链接到~?notes/python/1.md
or ~?tech/php/*.md
呢?
[1.md]
or [./1.md]
(后者不推荐这样写,但是可以这样写)[../ruby/1.md]
(不推荐这样写,但是你也可以这样写)../../ruby/1.md
这样太难看了,拒绝这样写!__ROOT__
,表示这是文章目录p/
的位置,那么你像引用那一块就那一块。eg:[linux下配置java](__ROOT__/notes/linux/install-java.md)
box-shadow:0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12),0 2px 4px -1px rgba(0,0,0,.2)
__ROOT__
这个常量容易认为是整个博客的根目录,恰好__P__
与p/
相呼应有时候我们需要根据用户的特定需求,可能需要定制一下silentor,提供一些hooks便于定制开发,而不是改源代码.
例如: 用户加载完main-page 的内容后(主页有可能是索引页,因而不显示评论),需要决定是否显示评论框.
before-load-sidebar-page
loaded-sidebar-page
before-load-main-page
loaded-main-page
before-load-main-page-footer
loaded-main-page-footer
page-not-found
, 额外传入的data:
data.selector
要加载的selectordata.path
: md路径(加载页路径)src/extension/pluginName/main.js
;(function($) {
'use strict';
$(window).on('loaded-sidebar-page', function() {
// console.log('loaded-sidebar-page')
});
$(window).on('loaded-main-page', function() {
// your code
});
$(window).on('loaded-main-page-footer', function() {
// console.log('loaded-main-page-footer')
});
$(window).on('page-not-found', function(evt, data){
// console.log('page-not-found')
});
$(window).on('before-load-sidebar-page', function(evt, data){
// console.log('before-load-sidebar-page')
});
$(window).on('before-load-main-page', function(evt, data){
// console.log('before-load-main-page')
});
$(window).on('before-load-main-page-footer', function(evt, data){
// console.log('before-load-main-page-footer')
});
//。。。。。。
})(jQuery);
视频录制?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.