ericzhang-cn / papery Goto Github PK
View Code? Open in Web Editor NEWPapery - Create your simple, fast & elegant blog with plain text
License: MIT License
Papery - Create your simple, fast & elegant blog with plain text
License: MIT License
其实, pap-build没必要细分build index还是page等其他,因为你build了index后,首页有内容了,但如果没build articles,点进去是找不到页面的,包括其他也一样
connect 3之后的版本所有模块都必须单独安装,导致代码兼容性出现问题。至今没弄懂connect项目为啥要这样搞。
如何使用作者blog中的solaried的高亮方案?
你好,在使用您的博客框架Papery时,我按照您的教程进行到“ papery create ”这一步时,CMD窗口里报错为
fs.js:128
throw new ERR_INVALID_CALLBACK();
^
TypeError [ERR_INVALID_CALLBACK]: Callback must be a function
at maybeCallback (fs.js:128:9)
at Object.exists (fs.js:196:3)
at Object.copySync (E:\nodejs\npms\node_global\node_modules\papery\node_modules\fs-extra\lib\copy.js:62:23)
at Object.exports.run (E:\nodejs\npms\node_global\node_modules\papery\bin\create_runner.js:37:9)
at Object. (E:\nodejs\npms\node_global\node_modules\papery\bin\papery.js:71:14)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
};
我百度搜索到的原因是Node.js的版本问题,即Node V10 以上 fs.write 的callback 是必须的。
附上我的参考链接
markdown中的code符号(键盘esc下面那个键)的解析会发生错误。marked.js会把他解析为<code> </code>
本来compiler.js中的这段代码
content = content.replace(/<pre><code/g, '<pre');
content = content.replace(/<\/code>/g, '');
会把<pre><code></code></pre>
替换为<pre></pre>
但是正则同时会把<code>test</code>
替换成<code>test
,失去了一个闭合的标签,这样整个页面就都出错了。
测试代码如下:
function test() {
var content = '<code>test</code>';
content = content.replace(/<pre><code/g, '<pre');
content = content.replace(/<\/code>/g, '');
console.log(content);
}
test();
以上只是一些推测,不知道是不是这个意思,麻烦核实一下
在 git for windows 中执行 papery create blog
会报错:
TypeError: Cannot call method 'run' of undefined...
也就是 bin\papery.js
下的最后一行代码 runners[cmd].run(options);
。原因出在这段代码上:
var args = (process.argv[0] === 'node' || process.argv[0] === 'nodejs')
? _.last(process.argv, process.argv.length - 1)
: process.argv;
process.argv[0]
返回的是 {your_path}\node.exe
,所以 args
成为了 ['path of node.exe', 'path of papery.js', 'create', 'blog']
。 cmd
就变成了 'path of papery.js'
。
可以将 process.argv[0] === 'node' || process.argv[0] === 'nodejs'
改为 process.argv[0] === 'node' || process.argv[0] === 'nodejs' || process.argv[0].match(/node.exe$/)
就可以了。
生成的博客的meta keywords 不是在site.yml中的配置 而是所有的文章标签
看里README中给的博客例子 也是这种情况
不知到是bug还是我的配置方式不对
var yamls = ['site', 'articles', 'pages', 'navbar', 'pages', 'ext'];
此处有两个pages,似无必要
在文章详细内容页面文章标题的链接错误
articles.ejs页面 article.link无发获取 结果为undefine
若在在articles.yml中配置link项build时报错
hi.
as3:~/blog.codinglabs.org/articles# cat test1.md
这是测试1.
as3:~/blog.codinglabs.org/articles# ~/npm/bin/pap-build all ~/blog.codinglabs.org/
显示正常。
但是首页http://as3.brite.biz:54317/并未出现新帖。为何?如何解决?
谢谢.
我看了下~/blog.codinglabs.org/articles/目录,里面的test1.md并未有相应的test1.html出现。
安装完成后在cmd里执行
pap-create myblog
一直提示:usage: papery-create blog_root_directory
在nodejs命令窗口里执行是
pap-create myblog
--- 一直闪烁
我的系统是win7 64位,旗舰版.
不知道是不是没有创建文件夹的权限还是怎的?
介绍界面,网址地址应该为localhost:8001,而不是locahost
通过npm install -g papery命令安装完毕papery之后,运行
papery create myblog
之后出现命令的帮助显示,不创建博客。
系统配置Mac os X EI Capitan 10.11.3
AMBP:~ xxx$ sudo npm install -g papery
Password:
npm WARN deprecated [email protected]: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0
npm WARN deprecated [email protected]: Deprecated as of version 0.1.2 please use object.pick instead.
/usr/local/bin/papery -> /usr/local/lib/node_modules/papery/bin/papery.js
/usr/local/lib
└── [email protected]
AMBP:~ xxx$ cd Documents/WebSite/
AMBP:WebSite xxx$ papery create myblog
Usage:
papery -v or --version
papery -h or --help
papery command [options]
papery help command
Commands:
create - Create a new blog
build - Build all site from config and meta-text
server - Start a new local web server for test and debug
因为现在要想看到改动后的博客效果,要先执行 build 再执行 server,希望可以增加一个命令一次性执行这两个操作。
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.