You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"media-providers": {
"github": {
"default-for": ["image"], // "all" to default for both image, video and anything else
"path": "data/media/", // data is gitignored, but should not be nuked like out/
"remote": "cirosantilli/cirodown-media", // calculated default from this projects name
"type": "github" // default from name
},
"local": {
"default-for": ["video"],
"path": "media/",
"src": "cirosantilli/cirodown-media",
"type": "local" // default from name
},
"youtube": {}
}
A specific provider for one Image can be selected with {provider=}.
If the src of Image does not start with https?:// then the default media-source is used, and that path is modified according to the selected provider:
type: local: added to the same mechanism that uploads HTML content, e.g. in the current git repo
type: github: a locally cloned GitHub repo at the latest version. Clone it if not yet cloned. Could be a submodule, but not necessary if you never rename/delete media (so that older versions work), cirodown handles the cloning for you.
default-for is case agnostic on the first character, so that using default-for: "image" works on both Image and image. The default-for` value must always start with a lower case characters.
Advantages:
when building the HTML, all media that is not downloaded locally is first downloaded locally, and the local media URLs are used so you can view and develop the website without the internet.
Media that starts with https? just gets wget downloaded to the out/media cache
The update is done on the fly only if there is one missing media path locally, to avoid web usage every time. You can use --force-download to always check if we are at latest.
This will also enable fully embedding images with --html-embed to produce fully self contained documents.
when pushing, local media that was used in the build gets committed and pushed automatically to remote.
This is especially important when we start doing media generation from source code, e.g. images from dot files.
cirodownc167066 actually already has a video source: youtube. That one should be the default actually, so if you write an URL without https? it uses youtube by default, and for local you need {provider=local}.
The text was updated successfully, but these errors were encountered:
cirodown.json can contain media source entries:
A specific
provider
for oneImage
can be selected with{provider=}
.If the
src
ofImage
does not start withhttps?://
then the defaultmedia-source
is used, and that path is modified according to the selected provider:type: local
: added to the same mechanism that uploads HTML content, e.g. in the current git repotype: github
: a locally cloned GitHub repo at the latest version. Clone it if not yet cloned. Could be a submodule, but not necessary if you never rename/delete media (so that older versions work), cirodown handles the cloning for you.default-for
is case agnostic on the first character, so that usingdefault-for: "image"
works on bothImage
andimage. The
default-for` value must always start with a lower case characters.Advantages:
when building the HTML, all media that is not downloaded locally is first downloaded locally, and the local media URLs are used so you can view and develop the website without the internet.
Media that starts with
https?
just gets wget downloaded to theout/media
cacheThe update is done on the fly only if there is one missing media path locally, to avoid web usage every time. You can use
--force-download
to always check if we are at latest.This will also enable fully embedding images with
--html-embed
to produce fully self contained documents.when pushing, local media that was used in the build gets committed and pushed automatically to remote.
This is especially important when we start doing media generation from source code, e.g. images from dot files.
cirodown
c167066 actually already has a video source:youtube
. That one should be the default actually, so if you write an URL withouthttps?
it uses youtube by default, and for local you need{provider=local}
.The text was updated successfully, but these errors were encountered: