site-logo and site-name to your fastn web site.site-logo and site-name logicmisty-gray has the provision of adding site-logo and site-name.
site-name: NULL and site-logo: <your-logo-image-file-path> properties to the -- ds.page component then it shows the logo only.site-name: Your Site Name property to the -- ds.page component then shows site-name only.page component has site-logo and site-name properties. You can pass these properties to -- ds.page component.-- import: fastn-community.github.io/misty-gray as ds -- ds.page: Page title site-logo: $assets.files.assets.ipsum-logo.svg site-name: NULL Some body content of the page. -- end: ds.page
-- import: fastn-community.github.io/misty-gray as ds -- ds.page: Page title site-name: fastn Some body content of the page. -- end: ds.page
We recommend creating a global module that helps you to keep all your global properties and configurations in one .ftd file.
Let’s learn how to create a global module:
Create a new file let’s say ds.ftd.
ds.ftd module would look like:-- import: fastn-community.github.io/misty-gray as ds -- component page: children wrapper: optional caption title: optional body body: -- ds.page: $page.title site-logo: $assets.files.assets.ipsum-logo.svg site-name: NULL body: $page.body -- ftd.column: spacing.fixed.px: 13 width: fill-container children: $page.wrapper -- end: ftd.column -- end: ds.page -- end: page
Click on the download icon of the above code-block. ds.ftd file will be downloaded. Import this file inside your new .ftd.
my-ds component to create a new page using it.-- import: fastn-community.github.io/misty-gray as ds -- import: <your fastn package name>/my-ds -- ds.page: This is page title This is body area. It contains multiple paragraphs. At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum. -- ds.h1: This is heading level 1 This is heading level 1 optional body content. -- ds.h2: This is heading level 2 This is heading level 2 optional body content. -- ds.h3: This is heading level 3 This is heading level 3 optional body content. -- end: ds.page
Click on the download icon of the above code-block. logo.ftd file will be downloaded.
Add this file inside your fastn project and deploy or run fastn serve on your localhost. Access your localhost in the browser e.g.http://127.0.0.1:8000/logo/ you will see the page with the logo.
site-name with your site-name into the ds.ftd file string site-name: my fastn site and refresh e.g.http://127.0.0.1:8000/logo/ page, you will see site-name only.