Comments (8)
I solved it as follows:
- Create index.js file in root directory of your project that contains the following:
var exec = require('child_process').exec;
var port = process.env.PORT || 4000;
var hexoServerProcess = exec("hexo server -p " + port);
hexoServerProcess.stdout.on('data', function(data) {
console.log(data.toString());
});
- Add following line in package.json
"scripts": {
"start": "node index.js"
}
- Now deploy using (do not use hexo heroku plugin as it only deploy static pages)
git push heroku master
This assumes that you have added heroku as remote pointing to your heroku git.
Working link to my admin:
http://blog.trysquad.com/admin
Complete details (end to end):
http://blog.trysquad.com/2016/12/31/Easiest-way-to-start-hexo-blog-for-your-website/
from hexo-admin.
hmmm that ought to work. what's your heroku Procfile
?
from hexo-admin.
when i deployed on localhost 0.0.0.0:4000/admin
. Everything is ok. But on Heroku, for example: subdomain-heroku.herokuapp.com/admin
. It's not work.
from hexo-admin.
and you're running locally w/ the Procfile? One possibliity is you're just using static files on heroku.
from hexo-admin.
Recently, i wanna to deploy my Blog with this plugin to Heroku too.tell me why?thanks...
from hexo-admin.
no documentation on how to configure deploy? I am using hexo-deployer-git - what do?
from hexo-admin.
@Kaichi @huguiqi there are two ways to deploy hexo: static pages or as a running server.
- static pages: you run
hexo generate
locally, and then the resulting HTML & CSS files are hosted somewhere - running server: the host (like heroku) runs
hexo server
, and pages are generated dynamically
I personally recommend static pages, because it is much cheaper and more efficient. However, when using static pages, hexo-admin
is not accessible from your website, but is only accessible locally.
If you are using a running server for your website, then hexo-admin
will be available at e.g. example.com/admin
, and you will be able to edit blog posts from the running server without having to redeploy.
Which scenario are you asking about?
from hexo-admin.
to deploy dynamically to heroku, I imagine you would just need a Procfile
like
web: hexo server
and then deploy heroku normally, the way explained in https://devcenter.heroku.com/articles/getting-started-with-nodejs#introduction
from hexo-admin.
Related Issues (20)
- bcrypt-nodejs is no longer actively mai ntained. Please use bcrypt or bcryptjs.
- 欧弟
- about del page and post
- 登陆密码忘了怎么找回
- How to delete a draft?
- support images rlative path
- Multiple Admins/Passwords possible?
- Error: Function yaml.safeLoad is removed in js-yaml 4. Use yaml.load instead, which is now safe by default. HOT 2
- Deploy cms to heroku
- How to change HTTP to HTTPS
- Advice: move this repo to hexojs official org
- Plugin can't load properly HOT 1
- 报错:Function yaml.safeLoad is removed in js-yaml 4. Use yaml.load instead, which is now safe by default. HOT 2
- 设置登录账户密码后无法编辑博客
- admin新增修改一直loading HOT 4
- How to support keywords just like tag and categories? HOT 1
- white screen HOT 3
- white screen
- add new post can't custom fontmatter
- After entering the password, there is no response when you click SUBMIT
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hexo-admin.