Skip to content

Commit

Permalink
Updated package
Browse files Browse the repository at this point in the history
  • Loading branch information
saurabh-lohiya committed Sep 20, 2023
1 parent 1c0a87c commit bf14413
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 60 deletions.
8 changes: 5 additions & 3 deletions FASTN.ftd
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

-- fastn.package: <user_name>.github.io/<repo_name>

-- fastn.dependency: fifthtry.github.io/package-doc
-- fastn.dependency: fastn-community.github.io/site-doc
-- fastn.dependency: fastn-community.github.io/code-block
-- fastn.dependency: fastn-community.github.io/footer

-- fastn.auto-import: fastn-community.github.io/site-doc
-- fastn.auto-import: fastn-community.github.io/code-block as cb

;; replace inter-font package name with font package name you want to create
;; typography document for:

-- fastn.dependency: fifthtry.github.io/inter-font

Expand Down
24 changes: 6 additions & 18 deletions fastn-typography.ftd
Original file line number Diff line number Diff line change
@@ -1,32 +1,20 @@
-- import: fifthtry.github.io/package-doc/doc as pd
-- import: fifthtry.github.io/package-doc/forest-theme as ds
-- import: fifthtry.github.io/package-doc/footer
-- import: <user_name>.github.io/<repo_name>




-- ds.page:
show-footer: true
site-name: `<repo_name>`

-- ds.page.footer:

-- footer.fastn-footer:

-- end: ds.page.footer

-- pd.package: <repo_name>
name: <user_name>.github.io/<repo_name>
-- site-doc.doc-home: <repo_name> package
site-title: `<repo_name>`
show-tabs: false
github-url: <user_name>.github.io/<repo_name>
current-package: <user_name>.github.io/<repo_name>

Below are our default fastn `inherited` font types of <repo_name>.


-- display-type:
types: $<repo_name>.types


-- end: ds.page
-- end: site-doc.doc-home



Expand Down
69 changes: 30 additions & 39 deletions index.ftd
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
-- import: fifthtry.github.io/package-doc/doc as pd
-- import: fifthtry.github.io/package-doc/forest-theme as ds
-- import: fifthtry.github.io/package-doc/footer
-- import: fifthtry.github.io/inter-font/assets as inter-assets
-- import: <user_name>.github.io/<repo_name>/custom

;; ⚠️fastn-builders::⚠️ before using this file please find and replace inter-font
;; with font package name you have given inside this package
Expand All @@ -11,25 +8,18 @@



-- ds.page:
show-footer: true
site-name: `<repo_name>`

-- ds.page.footer:

-- footer.fastn-footer:

-- end: ds.page.footer

-- pd.package: <repo_name> package
name: <user_name>.github.io/<repo_name>
-- site-doc.doc-home: <repo_name> package
site-title: `<repo_name>`
show-tabs: false
github-url: <user_name>.github.io/<repo_name>
current-package: <user_name>.github.io/<repo_name>

This FTD font `<repo_name>` can be used for your ftd web projects.

You can use this <repo_name> inside the `FTD` project. Follow below
instructions to use this font package.

-- ds.h3: How to use <repo_name>?
-- site-doc.header: How to use <repo_name>?

To use this <repo_name> inside your `ftd` web project, if you are
using our [doc-site](https://github.com/fifthtry/doc-site) theme then you just
Expand All @@ -38,33 +28,33 @@ have to pass types to `ds.page`
Let's say you are using `doc-site` inside your project then, it's as simple as
making a sandwich.

-- ds.code: Add this to your FASTN.ftd
-- cb.code: Add this to your FASTN.ftd
lang: ftd

\-- fastn.dependency: <user_name>.github.io/<repo_name>

-- ds.markdown:
-- site-doc.header:

Now import `<repo_name>` inside `.ftd` file as shown below:

-- ds.code:
-- cb.code:
lang: ftd

\-- import: <user_name>.github.io/<repo_name>


-- ds.markdown:
-- site-doc.header:

add `<repo_name>` `types` to `ds.page` `types` attribute as shown
below:

-- ds.code:
-- cb.code:
lang: ftd

\-- ds.page:
types: $<repo_name>.types

-- ds.markdown:
-- site-doc.header:

Once you add `types: $<repo_name>.types` inside your `.ftd` file,
`<repo_name>` will be added as `fastn` default typography to your
Expand All @@ -73,26 +63,26 @@ Once you add `types: $<repo_name>.types` inside your `.ftd` file,
If you're not using `doc-site` theme and building your own `fastn` web theme.
Then, add `<repo_name>` dependency into `FASTN.ftd` file.

-- ds.code:
-- cb.code:
lang: ftd

\-- fastn.dependency: <user_name>.github.io/<repo_name>

-- ds.markdown:
-- site-doc.header:

Once you add above dependency, then import `<repo_name>` inside your
`.ftd` file:

-- ds.code:
-- cb.code:
lang: ftd

\-- import: <user_name>.github.io/<repo_name>

-- ds.markdown:
-- site-doc.header:

Done! `<repo_name>` is now added. Lets define a `page` component:

-- ds.code:
-- cb.code:
lang: ftd
download: my-ds.ftd

Expand Down Expand Up @@ -135,7 +125,7 @@ children: $page.wrap
\-- end: page


-- ds.markdown:
-- site-doc.header:

In above code snippet we defined `page` component which has `types`, `title`,
`body` and `wrap` attributes.
Expand All @@ -155,10 +145,9 @@ add any other component inside `page`.
Click on download icon on above code snippet `my-ds.ftd` file will be
downloaded.

-- ds.rendered:
download: types.ftd
/-- cb.rendered: Demo:

-- ds.rendered.input:
-- cb.rendered.input:

\-- import: <your-fastn-package-name>/my-ds

Expand All @@ -180,10 +169,10 @@ color: $inherited.colors.text
\-- end: my-ds.page


-- ds.rendered.output:
-- cb.rendered.output:

-- page: I am a page title
types: $types
-- site-doc.output:
colors: $ftd.default-colors

I am `page` component body. Body can contain multiple paragraphs, links etc.

Expand All @@ -200,11 +189,13 @@ color: $inherited.colors.text

-- end: page

-- end: ds.rendered.output
-- end: site-doc.output

-- end: cb.rendered.output

-- end: ds.rendered
-- end: cb.rendered

-- ds.markdown:
-- site-doc.header:

Click on download icon on above code snippet `types.ftd` file will be
downloaded, add previously downloaded `my-ds.ftd` and `types.ftd` inside
Expand All @@ -219,7 +210,7 @@ Done! isn't it simple? Try this and don't forget to jump on our [Discord](https:
[Click here](fastn-typography/) to know more `fastn` predefined `inherited`
types using `<font-name>-font` font-family and font-sizes.

-- end: ds.page
-- end: site-doc.doc-home



Expand Down

0 comments on commit bf14413

Please sign in to comment.