Comments (11)
Thanks a lot! Will try it tomorrow and report here if it works.
from emacs-easy-hugo.
Sorry, I forgot to inform you that my use case is solved and everything works just fine. You are great!
from emacs-easy-hugo.
Hi @max-arnold .
Thank you for comment.
if I they require different versions
I think that if your site don't work on the latest stable version of hugo you should correct the cause of your source.
If absolutely require different version, you can do this by changing the binary of hugo when you move the current directory.
You can do it by writing elisp in your init.el to change the symbolic link.
I think that it is not a easy-hugo problem but your problem.
I do not want to place hugo in PATH
I don't want to support a method that doesn't conform to UNIX standards.
Hope that helps!
from emacs-easy-hugo.
Ok, more details about my use case:
- I use separate python virtualenvs for each blog
- I need python in order to deploy my blog (I use Fabric tool for this) and perform other blog-related tasks
- I put Hugo binary to virtualenv bin (
~/.virtualenvs/blog1/bin/hugo
)
The binary is actually in the PATH, but only after I activate virtualenv by doing workon blog1
. It allows me to freeze and isolate blog dependencies. Upgrading hugo everywhere is too risky, I prefer to do this separately for each blog.
So, because supporting virtualenvs is out of scope of this project, what I'm asking is to allow me to customize hugo path on per-blog basis.
from emacs-easy-hugo.
I found multiple (call-process "hugo")
calls in the code. Does it make sense to apply the DRY principle and extract them into a function or macros, along with the ability to customize the binary path?
from emacs-easy-hugo.
I found multiple (call-process "hugo") calls in the code. Does it make sense to apply the DRY principle and extract them into a function or macros, along with the ability to customize the binary path?
If customizing the binary path permit you to solve the problem, I can respond.
from emacs-easy-hugo.
The following runs the Rakefile.
Does this method solve your problem?
You can do it in the following way.
put deploy.sh and Rakefile at easy-hugo-basedir
deploy.sh
#!/bin/sh
rake hello
rake pen
rake apple
chmod a+x deploy.sh
Rakefile
task :hello do
File.open("hello.txt", "w") do |f|
f.puts("Hello, World!")
end
end
task :pen do
File.open("pen.txt", "w") do |f|
f.puts("I have a pen!")
end
end
task :apple do
File.open("apple.txt", "w") do |f|
f.puts("I have an apple!")
end
end
M-x easy-hugo-github-deploy
or
Press G on easy-hugo-mode
from emacs-easy-hugo.
If customizing the binary path permit you to solve the problem, I can respond.
Yes, this would solve my case.
from emacs-easy-hugo.
And sorry, but I do not understand your Rakefile example. If it is about deployment tasks, then I do not plan to change my deployment method or switch to Rake.
from emacs-easy-hugo.
Hi @max-arnold .
Make hugo's binary changeable for each blog at 3b0516c
It will be reflected in melpa in around 6 hours.
sample setting
(setq easy-hugo-url "https://yourdomain")
(setq easy-hugo-bin "/.virtualenvs/blog1/bin/hugo")
(setq easy-hugo-basedir "~/yoursource/")
(setq easy-hugo-sshdomain "blogdomain")
(setq easy-hugo-root "/home/yourblog/")
(setq easy-hugo-bloglist '(((easy-hugo-basedir . "~/yoursource2/")
(easy-hugo-bin . "/.virtualenvs/blog2/bin/hugo")
(easy-hugo-url . "https://yourdomain2")
(easy-hugo-sshdomain . "blogdomain")
(easy-hugo-root . "/home/yourblog2/"))))
from emacs-easy-hugo.
Hi @max-arnold .
Thank you for test.
Thanks for the report.
from emacs-easy-hugo.
Related Issues (20)
- preview errors: Symbol's function definition is void: url-do-setup HOT 9
- Questions about configuring multiple blogs HOT 3
- Unclear how to separate drafts from posts HOT 4
- Question: How did you create the keystroke callouts in the screencast? HOT 1
- rsync (command does not end normally) HOT 12
- "\<\>": pattern not found error when invoking new-post HOT 17
- I cannot understand the documentation at all HOT 1
- easy-hugo--version() crashed. HOT 3
- Feature request: title to slug HOT 2
- ftp publishing? HOT 6
- Why set `easy-hugo-url` manually? HOT 4
- How to handle page bundles? HOT 3
- Any plans for `completion-at-point` for categories and tags? HOT 2
- it's conflict to evil-mode HOT 5
- `easy-hugo-previous-line` doesn't work with `easy-hugo-enable-menu` HOT 3
- When easy-hugo-newpost in evil-mode, open with evil-insert-state HOT 1
- ai-blog.el
- deploy.sh? HOT 4
- Rendered Checkboxes? HOT 2
- I can't move to next blog when there is only 1 blog in easy-hugo-bloglist. HOT 2
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 emacs-easy-hugo.