在Azure上部署Hexo ..不知道我缺少什么 [英] Deploying Hexo on Azure.. not sure what i'm missing
问题描述
最近,我决定开始对Azure上的个人使用(现在)的小博客。我开始挖掘到博客框架Hexo。现在,我得到控制(第一)基础知识开始在当地一Hexo博客,但我想它推到Azure上。
I recently decided to start a small blog for personal use (for now) on Azure. I started digging into the blogging framework Hexo. Now i got the (first) basics under control with starting a Hexo blog locally, but i want to push it to Azure.
我配置了一个基本的web应用程序与持续部署一个GIT连接( https://github.com / lmeijdam /演示回购)。我试着用一个教程
I configured a basic web-app with a GIT connection for continuous deployment (https://github.com/lmeijdam/demo-repo). I tried a tutorial with a
- server.js文件
- 的package.json
- 的.gitignore
以上将导致工作响应和安装node_modules ...但是,从那里我真的失去了我的下一步...
Above will result in a working response and installed node_modules... But from there i am really lost about my next steps...
我知道你可以创建一个文件的package.json和查看我的FTP客户端的package.json是存在的,也是node_modules安装了正确的模块文件夹中。我的package.json;
I know you can create a package.json file and viewing my ftp client the package.json is there and also the node_modules folder with the correct modules installed. My package.json;
{
名:hexo现场
版本:0.0.0
私:真实,
hexo:{
版本:3.1.1
},
依赖:{
恩preSS:*,
hexo:^ 3.1.0,
hexo-部署-混帐:0.0.4
hexo发电机存档:^ 0.1.2
hexo发电机类别:^ 0.1.2,
hexo发电机指数:^ 0.1.2,
hexo发电机标签:^ 0.1.1
hexo - 渲染 - EJS:^ 0.1.0
hexo-渲染标记:^ 0.2.4
hexo - 渲染 - 手写笔:^ 0.3.0
hexo服务器:^ 0.1.2
}
}
{ "name": "hexo-site", "version": "0.0.0", "private": true, "hexo": { "version": "3.1.1" }, "dependencies": { "express": "*", "hexo": "^3.1.0", "hexo-deployer-git": "0.0.4", "hexo-generator-archive": "^0.1.2", "hexo-generator-category": "^0.1.2", "hexo-generator-index": "^0.1.2", "hexo-generator-tag": "^0.1.1", "hexo-renderer-ejs": "^0.1.0", "hexo-renderer-marked": "^0.2.4", "hexo-renderer-stylus": "^0.3.0", "hexo-server": "^0.1.2" } }
和我也发现了,你可以部署一个Procfile到GIT回购其Azure中即可使用,如果您有没有叫server.js默认文件(的 https://github.com/yavorg/azure-node-starter/blob/master/Procfile )
and i also found out you can deploy a Procfile to the GIT repo which Azure then uses, if you have no default file called server.js (https://github.com/yavorg/azure-node-starter/blob/master/Procfile)
后来朋友带着尖编辑procfile写的东西等;
And later a friend came with the tip to edit the procfile to write something like;
网站:/ node_modules / hexo /斌/ hexo服务器而不仅仅是网页:节点server.js 的
可惜这只是导致默认布兰科网页... http://lmnodetest1.azurewebsites.net/
unfortunately this just results in a default blanco webpage... http://lmnodetest1.azurewebsites.net/
我在做的东西错在这里还是我在开始时忘了点什么?
Am i doing stuff wrong here or am i forgetting something at the start?
推荐答案
每我的经验,Hexo是一个静态的博客网站生成器。您可以按照以下步骤生成在路径网站公开。
Per my experience, Hexo is a static blog website generator. You can follow these steps below to generate a website at the path "public".
$ hexo init blog
$ cd blog
$ npm install
$ hexo generate
那么,所产生的公开目录下,就可以进入该目录,然后运行命令 hexo服务器
浏览的http://本地主机:4000
来探索您的博客
$ cd public
$ hexo server
有关使用Git的部署博客到Azure的网站,你只需要通过命令的git的init
在公开目录创建一个本地的Git回购。
For deploying the blog into Azure Website by using Git, you just need to create a local git repo by commanding git init
at the "public" dir.
请参阅文档的https://azure.microsoft.com/en-us/documentation/articles/web-sites-publish-source-control/将其部署到Azure上。
Please refer to the doc https://azure.microsoft.com/en-us/documentation/articles/web-sites-publish-source-control/ to deploy it into Azure.
最好的问候。
这篇关于在Azure上部署Hexo ..不知道我缺少什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!