-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
root directive doesn't used #23
Comments
But |
No, that makes sense. If the site is at /home/toor/www, the hugo commands probably need to be run from that directory (or somewhere around there). |
Caddyfile should be placed where the Hugo files are placed. The |
It's not that clear in the docs, sorry. I'll change it as soon as I can. Let me know if this was the misunderstanding or if it's something else. |
Currently there is no way to have more than one cms with one caddy file, because users from each cms can modify files of other: 0.0.0.0:8001 {
root ./blog1/public
cms {
content blog1/public
command hugo
args -s blog1/
}
}
0.0.0.0:8002 {
root ./blog2/public
cms {
content blog2/public
command hugo
args -s blog2/
}
} |
Oh... I see. What do you want is to have a a directive where you put the path of the "static-generator-content-things" and it runs there, isn't it? I could (or even you!) create that, it could be optional. You do you think? |
maybe, but this makes things complicated: root, workdir, content (not very useful) ... search plugin use
git plugin also use similar thing. Anyway current dir for executing could be root or user defined, but not a caddy running directory. |
@adzeitor it can't be root because those are the served files. What do you suggest? |
Oh... I figured out that |
It can be root with rewrite 😄 I think it is better root than caddy workdir (if root is defined).
This syntax inspired by git and search plugin for consistency: root /home/toor/blog1/public
cms /home/toor/blog1/ {
command ...
} |
So:
I'm thinking about merging command and args too. What do you think? |
I like it.
Good because it works in the same way as startup directive. |
I'm making the changes and I found out that there's a mistake here. content =/= public. Content is the folder where are the content files like pages and posts. Public is the generated HTML. So the content directive should be used. |
I'll update the docs to make that clearer. |
Try executing from source to see if is good! |
Hi! It's again me ;)
I have this config
/home/toor/www/Caddyfile
(pwd
used here to show problem, original config havecommand hugo
):I've expected to see
/home/toor/www/blog/
, butBut running caddy from
blog
directory let it works like a charm...I think you need to set current working dir before Run: https://golang.org/pkg/os/exec/#Command
The text was updated successfully, but these errors were encountered: