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
Have a question or need help?
Visit our GitHub Q&A discussion to get answers and subscribe to it to stay tuned.
Join our Discord channel and share your thoughts, suggestion, question etc.
Connect with our community!We welcome you to join our Discord community today.
We are trying to create the language for human beings and we do not believe it would be possible without your support. We would love to hear from you.