I want to save my assets in a minio server which is a self-hosted S3.
My problem is this. I want to link to my assets like normal in my local PC and do jekyll serve to see my website. for example I link to my stylesheets like this:
I can think of a few ways to do this, most of which require multiple config files.
You could set a variable in your primary config and prepend that to the asset paths.
When you build for production it uses that path. When you build locally you load another config file that overwrites the path.
When you run jekyll build it’ll give you a path of https://minio.mywebsite.com/bucketname/assets/css/skeleton.css
To handle the local part and keep that path relative you can create another config file (filename doesn’t matter)
_config.dev.yml
asset_server: ""
Then to build locally you’d just use the --config flag to load the default config followed by your dev one. Any variables that appear in the dev one will overwrite those in the first config.
jekyll serve --config _config.yml,_config.dev.yml
Will make the asset path above /assets/css/skeleton.css