Comments (15)
But root
directive sets current dir for serving content, not for running external apps... Maybe @mholt give us a hint.
from filebrowser.
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).
from filebrowser.
Caddyfile should be placed where the Hugo files are placed. The root
is the content served and content
is what's probably causing the main problem. This directive is used to know which folder contains the main content, the markdown files. It will only affect the links, nothing else.
from filebrowser.
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.
from filebrowser.
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/
}
}
from filebrowser.
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?
from filebrowser.
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?
maybe, but this makes things complicated: root, workdir, content (not very useful) ...
search plugin use search [directory] endpoint { ... }
directory is a path within the site (can be a regular expression) that should be indexed. Default is site root.
git plugin also use similar thing. Anyway current dir for executing could be root or user defined, but not a caddy running directory.
from filebrowser.
@adzeitor it can't be root because those are the served files. What do you suggest?
from filebrowser.
Oh... I figured out that content
is always the same as root
. So, I can remove content
variable and add workdir
or something like that.
from filebrowser.
It can be root with rewrite 😄
I think it is better root than caddy workdir (if root is defined).
What do you suggest?
This syntax inspired by git and search plugin for consistency:
root /home/toor/blog1/public
cms /home/toor/blog1/ {
command ...
}
from filebrowser.
So:
root [path/to/public/folder]
cms [path/to/execute/things] {
styles file
command cmd
args args...
}
I'm thinking about merging command and args too. What do you think?
from filebrowser.
I like it.
merging command and args too
Good because it works in the same way as startup directive.
from filebrowser.
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.
from filebrowser.
I'll update the docs to make that clearer.
from filebrowser.
Try executing from source to see if is good!
from filebrowser.
Related Issues (20)
- HI, HOT 1
- I cant reach filebrowser (lxc ) HOT 2
- Cant upload files when behind a nginx proxy HOT 2
- I wish to add a curl and wget functionality to download files
- Filebrowser docker container in unhealthy status HOT 6
- couldn't rename the folder
- Consider bind mounting a directory instead of individual files HOT 1
- User Directory not created on Signup / access to root folder
- HTTP ERROR 404 Not Found HOT 3
- Upload estimation bug
- .
- Disk usage visualization
- Extend Session Time for Large Uploads HOT 1
- Atomic file operations
- TrueNas Install - Cannot figure this out - Keep getting 'You don't have permissions to access this.' HOT 2
- Open PDF
- Can open work documents HOT 1
- Spikey CPU usage HOT 4
- Batch/Bulk Rename HOT 1
- healthcheck.sh fails with default config due to mishandling empty string HOT 1
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 filebrowser.