Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/pages/custom.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!-- Matomo -->
<script>
var _paq = (window._paq = window._paq || []);
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(["disableCookies"]);
_paq.push(["trackPageView"]);
(function () {
var u = "https://matomo.dc.scilifelab.se/";
_paq.push(["setTrackerUrl", u + "matomo.php"]);
_paq.push(["setSiteId", "17"]);
var d = document,
g = d.createElement("script"),
s = d.getElementsByTagName("script")[0];
g.async = true;
g.src = u + "matomo.js";
s.parentNode.insertBefore(g, s);
})();
</script>
<!-- End Matomo Code -->
35 changes: 35 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: ci
on:
pull_request:
branches:
- main
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Set up pnpm and Node, and install dependencies
uses: pnpm/setup@v3
with:
cache: true
require-lockfile: true
- name: Check formatting
run: pnpm run fmt:check
- name: Lint
run: pnpm run lint
- name: Type-check
run: pnpm run typecheck
- name: Test
run: pnpm run test
- name: Prepare the released docs
if: hashFiles('releases/*/release.json') != ''
run: pnpm run prepare:site --skip-apps
- name: Build the website
if: hashFiles('releases/*/release.json') != ''
run: pnpm run build
44 changes: 44 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: deploy
on:
push:
branches:
- main
workflow_dispatch:
concurrency:
group: github-pages
cancel-in-progress: false
permissions:
contents: read
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Set up pnpm and Node, and install dependencies
uses: pnpm/setup@v3
with:
cache: true
require-lockfile: true
- name: Prepare the released docs and apps
run: pnpm run prepare:site
env:
GH_TOKEN: ${{ github.token }}
- name: Build the website
run: pnpm run build
- name: Setup Pages
uses: actions/configure-pages@v6
- name: Upload artifact
uses: actions/upload-pages-artifact@v5
with:
path: build
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5
25 changes: 25 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*

/versioned_docs
/versioned_sidebars
/versions.json
/static/app
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm exec lint-staged
6 changes: 6 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pnpm-lock.yaml
releases
versioned_docs
versioned_sidebars
versions.json
static/app
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"importOrder": ["^@site/", "^[./]"],
"importOrderSeparation": true,
"importOrderSortSpecifiers": true,
"plugins": ["@trivago/prettier-plugin-sort-imports"]
}
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"]
}
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2025 TissUUmaps Core Team

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
71 changes: 70 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,70 @@
# website
# TissUUmaps website

[![Issues](https://img.shields.io/github/issues/TissUUmaps/tissuumaps.github.io?label=issues)](https://github.com/TissUUmaps/tissuumaps.github.io/issues)
[![Pull requests](https://img.shields.io/github/issues-pr/TissUUmaps/tissuumaps.github.io?label=pr)](https://github.com/TissUUmaps/tissuumaps.github.io/pulls)
[![Continuous integration](https://img.shields.io/github/actions/workflow/status/TissUUmaps/tissuumaps.github.io/ci.yaml?label=ci)](https://github.com/TissUUmaps/tissuumaps.github.io/actions/workflows/ci.yaml)
[![Deployment](https://img.shields.io/github/actions/workflow/status/TissUUmaps/tissuumaps.github.io/deploy.yaml?label=deployment)](https://github.com/TissUUmaps/tissuumaps.github.io/actions/workflows/deploy.yaml)
[![License](https://img.shields.io/github/license/TissUUmaps/tissuumaps.github.io?label=license)](LICENSE)

The website of [TissUUmaps](https://github.com/TissUUmaps/TissUUmaps), a GPU-accelerated web application for visualizing, annotating and sharing spatial biology data. It is built with [Docusaurus](https://docusaurus.io/) and deployed to https://tissuumaps.github.io/.

The website hosts the TissUUmaps application and its documentation, both versioned by MAJOR.MINOR line. The documentation is written in the TissUUmaps repository; changes to it go there. This repository holds the rest of the website.

## Releases

On every application release, the TissUUmaps release workflow pushes the released docs to `releases/<line>/`:

- `release.json` holds the released `version`, e.g. `{ "version": "4.1.2" }`.
- `docs/` holds the docs, including the API docs generated by typedoc.

Every push to `main` deploys the website.
Before the build, `scripts/prepare.mts` turns the released lines into Docusaurus versions.
It also downloads their apps from the TissUUmaps releases, served under `app/<line>/`.
A prerelease line is only shown while it is ahead of the latest stable line.

To build the released versions locally (downloading the apps needs `gh`):

```bash
pnpm install
pnpm run prepare:site # or: pnpm run prepare:site --skip-apps
pnpm run build && pnpm run serve
```

## Local preview

Clone this repository next to a TissUUmaps checkout and generate the API docs there:

```bash
cd ../TissUUmaps
pnpm install
pnpm run build:packages && pnpm run build:apidocs
```

Then start the website with the TissUUmaps docs as the current version:

```bash
pnpm install
TISSUUMAPS_DOCS=../TissUUmaps/docs pnpm run start
```

Most changes, including changes to the TissUUmaps docs, are reflected live.
The preview shows the TissUUmaps docs as "Next", next to any prepared released versions.

## Checks

Continuous integration runs these on every pull request:

```bash
pnpm run fmt:check # formatting (prettier)
pnpm run lint # linting (ESLint)
pnpm run typecheck # type checking
pnpm run test # tests of scripts/prepare.mts
```

Pre-commit hooks (husky and lint-staged) lint and format the staged files.

## Contributing

Contributions are always welcome! See the TissUUmaps [contributing guidelines](https://github.com/TissUUmaps/TissUUmaps/blob/main/CONTRIBUTING.md) and please adhere to its [Code of Conduct](https://github.com/TissUUmaps/TissUUmaps/blob/main/CODE_OF_CONDUCT.md).

The website is licensed under the [MIT License](LICENSE).
Loading
Loading