Tag: 鬼博客

如何设置笔记本电脑服务器上的Ghost博客框架

我正在尝试在本地笔记本电脑开发机器上设置Ghost博客框架。 我已经成功地执行了(基本安装说明)[http://docs.ghost.org/installation/mac/]。 我可以通过直接进入IP,即http://127.0.0.1:2368加载页面。 然而,我正努力通过一个url加载页面,即mysite.localmachine.net。 在config.js文件中,我设置了这样的东西: config = { // ### Development **(default)** development: { // The url to use when providing links to the site, Eg in RSS and email. url: 'http://myurl', database: { client: 'sqlite3', connection: { filename: path.join(__dirname, '/content/data/ghost-dev.db') }, debug: false }, server: { // Host to be passed to node's `net.Server#listen()` […]

为什么这两个调用相同的function?

我正在寻找学习Nodejs的GhostJS源代码。 我不明白为什么这两个调用不同的参数来实现相同的function: https://github.com/TryGhost/Ghost/blob/688dd363cdf0084c20dd243b02c26afb6ebcabbe/core/server.js#L205-L206 任何人都可以解释为什么? 谢谢= D 编辑:这是写作时的代码: server.use('/ghost/upload/', express.multipart()); server.use('/ghost/upload/', express.multipart({uploadDir: __dirname + '/content/images'})); 编辑2看到这个github问题: https : //github.com/TryGhost/Ghost/issues/1511

停止在代码块内呈现HTML

我的问题是HTML代码标记内呈现。 在鬼博客我没有使用代码标签的问题。 除了HTML,这是实际呈现。 下面的这个例子实际上是渲染的 。 <pre><code> <div>some text</div> <input value="even this is rendered"></input> </code></pre> 如果我在内部使用4个空格,它可以正常工作。 我正在使用默认的样式布局。 看官方markdown-文档这应该是工作。 http://daringfireball.net/projects/markdown/syntax

“npm start”在ghost(node.js)中给出错误

我在安装node.js之后尝试设置ghost,但是当我为ghost运行安装时 npm install –productions 它给了我以下错误 > ghost@0.5.10 start /home/kedarkhetia/Downloads/ghost-0.5.10 > node index module.js:340 throw err; ^ Error: Cannot find module 'streamsearch' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Module.require (module.js:364:17) at require (module.js:380:17) at Object.<anonymous> (/home/kedarkhetia/Downloads/ghost-0.5.10/node_modules/busboy/node_modules/dicer/lib/Dicer.js:5:20) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:364:17) npm ERR! weird error […]

Ghost博客与应用程序集成

我是新来的节点,所以请原谅我,如果我问愚蠢的问题。 Ghost最近作为NPM模块发布。 我试图将其与我的应用程序集成,所以我可以有自定义的主页和服务的博客在一个单独的页面上。 一旦我做了我的app.js后,它接pipe了我的网站的所有stream量。 我如何configuration幽灵只为博客提供服务? var ghost = require('ghost'); 鬼();

在Ghost中,是否可以在每个post中包含外部JavaScript?

我正在运行Ghost的安装,并试图在一个post中包含Google Charts图表。 但是这样做会要求我先加载Google的JavaScript。 这当然可以通过将<script>标记添加到/content/themes/casperdefault.hbs来/content/themes/casperdefault.hbs ,但是我不想在全局加载它,而只是在每个post的基础上加载。 这是可能的吗? 直接将代码添加到post主体中似乎没有太多的影响。 谢谢!

有没有办法让Ghost静态页面访问index.hbs传递的'posts'variables?

我正在寻找使用Ghost来托pipe博客和静态网站,所以结构可能是这样的: / :登陆页面( 不是博客登陆页面,不需要访问posts ) /blog/ :博客登陆页面(需要访问index.hbs通常可以访问的posts ) /page1/等:静态页面将根据需要使用page.hbs或page-page1.hbs /blog-post-whatever /等:将使用post.hbs博客post 我预见到的唯一问题是只有 index.hbs (据我所知)被传递给posts模板variables(参见GitHub上的代码 )。 在我提交拉请求之前,先知道下面的内容是很好的: 是否有一种现有的方法来访问page.hbs的postsvariables? 如果没有,是否值得为此提交一个请求? 如果是的话,我们是否真的想发posts到所有的页面? 或者拉请求拆分page.hbs ,只发送给那些? 还是有更好的方法来做到这一点?

如何在快递中的子目录上挂载Ghost

我有一个现有的网站build立快递,我想添加一个“/博客”由Ghost支持。 我已经将Ghost添加到我的依赖项中,在Ghostsconfiguration中安装并configuration了url到localhost:3000 / blog,但是现在我遇到了麻烦。 在我的app.js中,我添加了以下几行: var blog = require('./routes/blog'); app.use('/blog', blog); 我的blog.js看起来像这样: var express = require('express'); var router = express.Router(); var ghost = require('ghost'); ghost().then(function (ghostServer) { ghostServer.start(); }); router.get('/', ghost); module.exports = router; 我很确定blog.js是不正确的。

鬼定制分页

我只是通过阅读幽灵主题文档来devise一个鬼博客平台的主题。 我现在需要的是定制分页。 文件说在partial文件夹里面创build一个pagination.hbs 。 但问题是我不知道标记应该如何。

Ghost博客无法查看视图“索引”

我在我的MAC上运行Ghost,当我在浏览器中访问localhost:2368时,出现了一个问题: 500 无法查看视图“索引” 堆栈跟踪 无法查看视图“索引” (/Users/zengdaqian/Documents/Ghost-0.3.3-wip/node_modules/bookshelf/node_modules/when/when.js:270:7) 我怎么解决它? TKS!