-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1,241 changed files
with
13,531 additions
and
246,454 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
indent_size = 2 | ||
indent_style = space | ||
|
||
[{Makefile,**.mk}] | ||
# Use tabs for indentation (Makefiles require tabs) | ||
indent_style = tab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Lint code | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
- run: npm install --only=dev | ||
- uses: pre-commit/action@v3.0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/mirrors-prettier | ||
rev: "v3.1.0" | ||
hooks: | ||
- id: prettier | ||
additional_dependencies: | ||
- prettier@3.2.2 | ||
- prettier-plugin-astro@^0.12.3 | ||
files: \.(astro|mdx|md|yml|yaml|ts|js|mjs)$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
public | ||
src/pages/nfhack/ | ||
src/pages/nfcamp/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// .prettierrc.mjs | ||
/** @type {import("prettier").Config} */ | ||
export default { | ||
printWidth: 120, | ||
plugins: ["prettier-plugin-astro"], | ||
overrides: [ | ||
{ | ||
files: "*.astro", | ||
options: { | ||
parser: "astro", | ||
}, | ||
}, | ||
], | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"recommendations": ["astro-build.astro-vscode"], | ||
"unwantedRecommendations": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"command": "./node_modules/.bin/astro dev", | ||
"name": "Development server", | ||
"request": "launch", | ||
"type": "node-terminal" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,96 @@ | ||
<picture> | ||
<source media="(prefers-color-scheme: dark)" srcset="public/img/nextflow_darkbg.svg"> | ||
<source media="(prefers-color-scheme: light)" srcset="public/img/nextflow.svg"> | ||
<img alt="Nextflow Logo" src="public/img/nextflow.svg"> | ||
</picture> | ||
|
||
# Nextflow web site | ||
|
||
<https://nextflow.io> is a static web site. Pages are generated by using [JBake](http://jbake.org/). | ||
Source code for [https://nextflow.io](https://nextflow.io). Website is generated using [Astro](https://astro.build). | ||
|
||
## Commands | ||
|
||
To build the website you need Node.js and `npm` installed. See the [npm docs](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) for instructions. | ||
|
||
<!-- TODO: We can replace the Makefile with `npm run` scripts in package.json --> | ||
|
||
There is a `Makefile` in the repo with a few standard commands for working with the website: | ||
|
||
| Command | Action | | ||
| :---------------- | :----------------------------------- | | ||
| `make dev` | Run a local server for development | | ||
| `make build` | Build the static site for deployment | | ||
| `make publish` | Publish the website to s3 | | ||
| `make invalidate` | Invalidate the Cloudfront cache | | ||
|
||
The `dev` server builds pages on request and live-updates as you make changes. It includes additional debugging tools. Note that some type-checking on happens during `make build`. | ||
|
||
There are also a bunch of `npm` commands for more fine-grained control: | ||
|
||
<details> | ||
|
||
| Command | Action | | ||
| :------------------------ | :----------------------------------------------- | | ||
| `npm install` | Installs dependencies | | ||
| `npm run dev` | Starts local dev server at `localhost:4321` | | ||
| `npm run build` | Build your production site to `./output/` | | ||
| `npm run preview` | Preview your build locally, before deploying | | ||
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` | | ||
| `npm run astro -- --help` | Get help using the Astro CLI | | ||
|
||
</details> | ||
|
||
Note that `make build` / `npm run build` fetch the Nextflow repo and build the docs automatically. | ||
When running `make dev` / `npm run dev` this doesn't happen, so the docs will not be visible. | ||
|
||
## Code formatting | ||
|
||
Code syntax is enforced using [Prettier](https://prettier.io/). You can use a plugin in your code editor to run this automatically on save and it also runs as a CI check on push and pull-requests. | ||
|
||
To make it easier to catch formatting errors before pushing, the repo is set up to use [pre-commit](https://pre-commit.com/). If installed, this will run Prettier on any edited files before allowing a commit. | ||
|
||
To use, set up as follows: | ||
|
||
```bash | ||
pip install pre-commit # Install the pre-commit tool itself | ||
pre-commit install # Set up in the Nextflow website repo | ||
``` | ||
|
||
After that, checks will automatically run every time you do `git commit` in the repo. Note that formatting changes will be applied automatically but the commit will be aborted - you must do `git add .` and `git commit` again. | ||
|
||
## Publishing | ||
|
||
Jbake configuration is controlled by file `jbake.properties`. | ||
The Nextflow website is hosted on AWS s3, behind a Cloudfront cache. There are three components to the website: | ||
|
||
## Content | ||
1. Front end (this repository) | ||
2. Docs (`/docs`, built from the main Nextflow repo using Sphinx) | ||
3. Nextflow binary downloads (`https://get.nextflow.io`, built from the main Nextflow repo) | ||
|
||
Web site content is provided either with Markdown or HTML text file in the folder `content`. | ||
Each content file declares a `type` property that defines the template to be used. | ||
The following type are used : | ||
All three parts of the website are published separately. Care must be taken not to clobber anything by overwriting. | ||
|
||
## Project Structure | ||
|
||
Page | Type | Template | ||
----------- | ----- | ----------- | ||
Normal | page | `page.ftl` | ||
Index | index | `index.ftl` | ||
Blog | - | `archive.ftl` (`blog.html`) | ||
Podcasts | - | `podcasts.ftl` (`podcasts.html`) | ||
Blog posts | post | `post.ftl` | ||
Podcast | post | `podcast.ftl` | ||
The repository has the following rough structure: | ||
|
||
```text | ||
/ | ||
├── public/ | ||
└── src/ | ||
├── content/ | ||
│ ├── blog/ | ||
│ └── podcast/ | ||
├── components/ | ||
├── layouts/ | ||
└── pages/ | ||
``` | ||
|
||
Template are contained in the folder `templates`. To add a custom template | ||
add an entry in the `jbake.properties` file as shown here: `template.<type>.file=<type>.ftl`. | ||
Blog posts and podcast episodes go into `content` as markdown files. Other top-level pages should be named as `.astro` or `.md` files in the `src/pages/` directory. Astro finds all of this content and builds a page. Each page is exposed as a route based on its file name. | ||
|
||
## Testing locally | ||
Any static assets, like images, can be placed in the `public/` directory. | ||
|
||
Generate the web site pages entering the command: `./jbake` and | ||
the resulting html are placed in the folder `output`. | ||
The `src/components/` and `src/layouts/` folders contain the templating files to build the site. | ||
|
||
Launch the local web sever to test the result by entering the command: `./jbake -s` | ||
## Documentation | ||
|
||
Note that the `jbake` command included in this repo is a docker command wrapper. | ||
For more info, check the [Astro docs](https://docs.astro.build) | ||
and the old [v3 Bootstrap docs](https://getbootstrap.com/docs/3.4/). |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.