Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
rambip committed Oct 1, 2023
0 parents commit 78e9f3b
Show file tree
Hide file tree
Showing 33 changed files with 3,990 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: "build website"
on:
push:
branches: ["main"]
permissions:
contents: write
jobs:
build-pages:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixos-22.05
- uses: cachix/cachix-action@v12
with:
name: rambip
# If you chose API tokens for write access OR if you have a private cache
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'

- run: nix build

- uses: actions/upload-pages-artifact@v2
with:
path: "result/"


deploy:
needs: build-pages
runs-on: ubuntu-latest
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

environment:
name: github-pages
# don't forget to go to the settings/environment and to allow main to push !
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/dist
/target
result
23 changes: 23 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Adding an example
Imagine you have an example named `foo`

1) go inside `examples`.

## create `foo.rs`
This rust file has to define a `showcase() -> impl IntoView` function

## create `foo.toml`
Inside this file, you define:
- a `description: String` field
- a `features: Vec<String>` field. You can ommit the `csr` feature since it is enabled inside each example

## add dependencies
If you need specific dependencies, add them to `Cargo.toml`

## Add `foo.css`
If your example needs a specific stylesheet, add a `foo.css` file with the content you want.
It is not supported right now.


# How it works
Look at `build.rs` and the generated `src/examples.rs`, it should make sense
Loading

0 comments on commit 78e9f3b

Please sign in to comment.