fastn
supports bunch of image file formats, checkout
supported-image-formats
to read about it. The link is shared in the discription..ftd
extensions in your package are called documents
.
FASTN.ftd
and index.ftd
documents makes for a complete package.
But a package can have n
number of other documents as well.In this package, I have put all the images in the folder called images
.
assets
?assets
as a foreign variable provided by fastn
and this
variable can be used to access the images or other files in the package.-- import: <package-name>/assets
ftd.image
ftd.image
and passing the
file path in src
. So we will write:-- ftd.image:
src: $assets.files.images.<image-file-name-with-extension>
$
. $ is used for reference to assets.files
here is used to access the files present in the package.
And anything after files
, it is the path to the file.
ftd.image
does not take any body so to avoid throwing error, so we will
wrap this text in the markdown component provided by doc-site.width
, border, shadow, etc.temp
inside the images folder, and put
this image file we are using inside it. Then we need to change the path as-- ftd.image:
src: $assets.files.images.temp.<image-file-name-with-extension>
We can use two separate images for light and dark mode. For that, we just need
to add the image with same file name followed by -dark
at the same location.
src
. But it is recommended to download the
image and import it through assets.-- ftd.image:
src: https://upload.wikimedia.org/wikipedia/commons/c/ca/A_Beautiful_Scenery.jpg
Thank you guys, keep watching these videos to learn more about fastn.
Support us by giving a star ⭐ on GitHub and join our fastn community on Discord.