Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Arpita-Jaiswal authored Nov 27, 2023
0 parents commit cfc4e57
Show file tree
Hide file tree
Showing 15 changed files with 668 additions and 0 deletions.
Binary file added .github/assets/doc-site-example-dark.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/assets/doc-site-example.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
62 changes: 62 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Rename and Deploy Site

on:
push:
branches:
- main

jobs:
rename-project:
if: ${{ github.repository != 'fastn-stack/fastn-template' && github.event.created }}
permissions: write-all
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: Set repository name and owner
run: |
echo "REPOSITORY_NAME=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
echo "REPOSITORY_OWNER=$(echo '${{ github.repository }}' | awk -F '/' '{print $1}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
shell: bash
- name: Rename the project
run: |
echo "Using '${{ env.REPOSITORY_NAME }}' and "${{ env.REPOSITORY_OWNER }}" to rename fastn package"
sed -i -e 's/<user_name>/${{ env.REPOSITORY_OWNER }}/g' -e 's/<repo_name>/${{ env.REPOSITORY_NAME }}/g' FASTN.ftd
sed -i -e 's/<user_name>/${{ env.REPOSITORY_OWNER }}/g' -e 's/<repo_name>/${{ env.REPOSITORY_NAME }}/g' FASTN/ds.ftd
sed -i -e 's/<user_name>/${{ env.REPOSITORY_OWNER }}/g' -e 's/<repo_name>/${{ env.REPOSITORY_NAME }}/g' index.ftd
sed -i -e 's/<user_name>/${{ env.REPOSITORY_OWNER }}/g' -e 's/<repo_name>/${{ env.REPOSITORY_NAME }}/g' sidebar.ftd
sed -i -e 's/<user_name>/${{ env.REPOSITORY_OWNER }}/g' -e 's/<repo_name>/${{ env.REPOSITORY_NAME }}/g' README.md
- name: Commit and push changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "✅ Ready to clone and code."
push_options: --force
build:
needs: rename-project
if: ${{ github.repository != 'fastn-stack/fastn-template' && always() && !failure() && !cancelled() }}
permissions: write-all
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Pull the latest commits
run: git pull
- uses: FranzDiebold/github-env-vars-action@v2
- run: sh -c "$(curl -fsSL https://fastn.com/install.sh)"
- name: Build the pages with fastn
run: |
echo "Using '$CI_REPOSITORY_NAME_SLUG/' as the base while building"
# To deploy the website using GitHub Pages, use the below command
fastn build --edition=2023 --base=/$CI_REPOSITORY_NAME/
# To deploy the website using Custom Domain, use the below command and comment
#out the above command when deploying through GitHub Pages
#fastn build --edition=2023 --base=/
- name: copy CNAME if found
run: '(test -f CNAME && cp CNAME .build) || echo "CNAME does not exist, skipping step"'
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./.build
18 changes: 18 additions & 0 deletions .github/workflows/refresh-content-on-heroku.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Update Content On Heroku

on:
workflow_dispatch:
workflow_call:
env:
CARGO_TERM_COLOR: always

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Redeploy Heroku
id: redeploy_heroku
run: |
curl --location --request POST \
--url 'https://<heroku-app-name>.herokuapp.com/-/clear-cache/?package=main&all-dependencies=true'
21 changes: 21 additions & 0 deletions .github/workflows/update-fastn-binary.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Update FASTN binary on Heroku

on:
workflow_dispatch:
workflow_call:
env:
CARGO_TERM_COLOR: always

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Redeploy Heroku
id: redeploy_heroku
run: |
curl --location --request DELETE \
--header 'Content-Type: application/json' \
--header 'Accept: application/vnd.heroku+json; version=3' \
--header 'authorization: Bearer ${{ secrets.HEROKU_TOKEN }}' \
--url https://api.heroku.com/apps/${{ secrets.HEROKU_APP_NAME }}/dynos/web.1
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.packages
.build
.DS_Store
.idea
19 changes: 19 additions & 0 deletions FASTN.ftd
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
-- import: fastn

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

-- fastn.dependency: fastn-community.github.io/doc-site as doc-site
-- fastn.dependency: fastn-community.github.io/footer
-- fastn.dependency: fastn-community.github.io/roboto-typography
-- fastn.dependency: fastn-community.github.io/dark-flame-cs

-- fastn.auto-import: <user_name>.github.io/<repo_name>/FASTN/ds
-- fastn.auto-import: <user_name>.github.io/<repo_name>/assets
-- fastn.auto-import: doc-site

-- fastn.sitemap:

# Home: index.html

- Right Sidebar Sample: /sidebar/
81 changes: 81 additions & 0 deletions FASTN/ds.ftd
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
-- import: fastn
-- import: fastn-community.github.io/footer
-- import: fastn-community.github.io/roboto-typography as typo
-- import: fastn-community.github.io/dark-flame-cs as cs
-- import: doc-site/common
-- import: doc-site
export: markdown,h0,h1,h2,h3,code,rendered,output,image,iframe,youtube,compact-text,post,posts,featured-post,image-first,image-in-between,without-image,author-bio,tip,not-found-1,not-found-2,link,link-group

-- common.site-logo site-logo: $assets.files.assets.ipsum-logo.svg

-- component page:
children wrapper:
optional caption title:
optional body body:
boolean sidebar: false
optional string document-title:
optional string document-description:
optional ftd.raw-image-src document-image:
optional string site-name: fastn template
optional ftd.image-src site-logo: $site-logo
boolean github-icon: false
optional string github-url:
boolean full-width: false
ftd.type-data typography: $typo.types
ftd.color-scheme color-scheme: $cs.main
integer logo-width: $common.logo-width
integer logo-height: $common.logo-height
boolean show-footer: true
boolean show-banner: true
ftd.ui list right-sidebar:
ftd.ui list banner:
fastn.app-ui apps: $common.apps
boolean login-button: $common.login-button
string site-url: $common.site-url
optional ftd.raw-image-src favicon:

-- ftd.ui list page.footer:

-- footer.fastn-footer:
copyright: Copyright © 2023 - <user_name>.github.io/<repo_name>
site-logo: $common.fastn-logo
powered-by-text: Powered by
powered-by-link: https://fastn.com/

-- end: page.footer

-- doc-site.page: $page.title
site-logo: $page.site-logo
body: $page.body
colors: $page.color-scheme
sidebar: $page.sidebar
full-width: $page.full-width
types: $page.typography
show-banner: $page.show-banner
show-footer: $page.show-footer
site-name: $page.site-name
logo-height: $page.logo-height
logo-width: $page.logo-width
github-icon: $page.github-icon
github-url: $page.github-url
right-sidebar: $page.right-sidebar
footer: $page.footer
banner: $page.banner
document-title: $page.document-title
document-description: $page.document-description
document-image: $page.document-image
apps: $page.apps
login-button: $page.login-button
site-url: $page.site-url
favicon: $page.favicon

-- ftd.column:
spacing.fixed.em: 0.8
width: fill-container
children: $page.wrapper

-- end: ftd.column

-- end: doc-site.page

-- end: page
42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Overview

[doc-site](https://fastn-community.github.io/doc-site/) will help you create
a beautiful documentation site in no time.

It provides out-of-the-box documentation features that can be used to create any
kind of site(personal website, blog, etc).

# Preview

![doc-site](.github/assets/doc-site-example-dark.jpg)

## Get Rolling

[Click here](https://fastn-community.github.io/doc-site/) to learn how to use this template.

# [Dive into the Docs](https://fastn-community.github.io/doc-site/)

# See it in Action!

Explore websites and projects that have utilized this component/template
**[here](https://fastn-community.github.io/doc-site/#dart-used-by)** for
inspiration.

## fastn and Curious?

Discover more of fastn here.

- [Expander Crash Course](https://fastn.com/expander/)
- [Video Tutorials](https://fastn.com/expander/hello-world/-/build/)
- [Explore more Templates/ Components/ Package](https://fastn.com/featured/)

## Become a fastn Contributor

1. Finish the [Expander Crash Course](https://fastn.com/expander/)
2. Share your progress and ideas on [Discord](https://discord.gg/bucrdvptYd).
3. Let our team guide you on your contributor journey.

## Become a fastn-trailblazer

- [Join our Discord Server](https://discord.gg/bucrdvptYd) to connect with other fastn enthusiasts and stay up to date with the latest developments.
- [Star us on GitHub](https://github.com/fastn-stack/fastn/)
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
permalink: /404.html
Loading

0 comments on commit cfc4e57

Please sign in to comment.