button inside ds.ftd documentIf you’re using fastn buttons on all ftd files of a fastn project, then don’t import it inside every ftd file, just export it to FASTN/ds.ftd. For more information on export check out how fastn created their fastn.com - website ds document.
To use as export create fastn projects using their fastn-template which have ready to use FASTN/ds.ftd document.
If fastn project is created using FASTN/<filename>.ftd document, then its just a one line import of fastn button and export.
Fastn button will be available using -- ds.button: via FASTN/ds.ftd document see this code.
FASTN.ftd:-- fastn.dependency: gsalunke.github.io/fastn-button
fastn-buttonfastn-button inside FASTN/ds.ftd document:-- import: gsalunke.github.io/fastn-button export: button
button exported from FASTN/ds.ftd documentOnce fastn-button is added inside FASTN/ds.ftd check whether ds alias is present inside FASTN.ftd, like this example
ds alias is present, which is always present when [fastn-template] (https://github.com/fastn-stack/fastn-template) is used to create fastn projects. Then use below example usage, which shows usage of fastn-button using ds.button export:-- ds.button: TEXT variant: text link: index.html size: large -- ds.button: Contained variant: contained link: index.html size: large -- ds.button: Outlined variant: outlined link: index.html size: large
