Giter Club home page Giter Club logo

website's Introduction

This repository contains code for the nf-core website: http://nf-co.re/

Packages used

Here's how the website is built:

  • Language: Javascript
  • Frameworks:
  • Tools:
    • npm (package manager)

Development

Getting the code

To make edits to the website, fork the repository to your own user on GitHub and then clone to your local system.

gh repo fork nf-core/website nf-core_website
cd nf-core_website/

Installing dependencies

The website is built using Astro, a static site generator. To install the dependencies, run:

npm install

Running a local server

Ok, you're ready! The website is split up into sub-sites using npm workspaces (see blogpost). One usually works on just one sub-site, e.g., sites/main-site for blog posts, event pages and general code components, or sites/docs for changes to the documentation. To run the website locally, just start astro dev mode for the specific workspace,e.g.:

npm run dev --workspace sites/main-site

or

npm run dev --workspace sites/docs

You should then be able to access the website in your browser at http://localhost:4321/. Some pages will not work when rendered using a specific dev server because the sub-sites are disjunct from each other, e.g., when starting the local server for sites/docs, http://localhost:4321/ the http://localhost:4321/pipelines pages will throw 404 errors.

File structure

The website follows a mono-repo setup with sub-sites. The main sub-sites are:

  • sites/main-site - The main nf-core website, including components, events, blog posts
  • sites/configs - listing pages for nf-core configs
  • sites/docs - docs pages
  • sites/modules-subworkflows - modules and subworkflows pages
  • sites/pipelines - pipeline pages
  • sites/pipeline-results - AWS megatest result pages for each pipeline (split up from the rest to allow static generation of the main pipeline pages)

Each site has its own src directory with the following structure, typical for an Astro project:

  • src/pages/ - Astro pages
  • src/content/ - Astro content collections (markdown files for events, docs, blog)
  • src/components/ - Astro/Svelte components
  • src/layouts/ - HTML layouts
  • src/styles/ - (S)CSS stylesheets
  • public/ - Static files (images, json files etc)

Adding an event

To add an event, create a new markdown (or .mdx) file in sites/main-site/src/content/events/ with the following frontmatter:

title: "Event Title"
subtitle: "A brief overview of the event"
type: "talk"  # Can be "talk", "hackathon", "training", "bytesize"
startDate: "YYYY-MM-DD"
endDate: "YYYY-MM-DD"
startTime: "HH:MM"
endTime: "HH:MM"
announcement:
  text: "Text on the announcement banner" # (optional)
  start: "YYYY-MM-DDTHH:MM:SS+HH:MM" # (required if announcement.text is used)
  end: "YYYY-MM-DDTHH:MM:SS+HH:MM" # (required if announcement.text is used)
locations: # (optional)
  name: "Name of the location" # (optional)
  links: "URL(s) to the location or to the section in the text with location description (e.g. `#gather-town`)" # (optional)
  geoCoordinates: [48.2082, 16.3738] # Latitude and longitude of the location as an array " (optional)
  address: "Address of the location" #(optional)
duration: "Duration of the event in days" (optional)
embedAt: "in case this should be shown in the sidebar of a pipeline page (e.g. for a bytesize talk about the pipeline)" (optional)
importTypeform: true # If true, the event will be imported from a Typeform (see below)

Adding a blog post

To add a blog post, create a new markdown (or mdx) file in sites/main-site/src/content/blog/ with the following frontmatter:

title: "Your Blog Post Title"
subtitle: "A brief overview of your post's content"
headerImage: "Direct URL to an optional header image" (optional)
headerImageAlt: "Descriptive alt text for the header image (mandatory if a header image is used)"
pubDate: "Scheduled publication date and time (the post will go live post-website rebuild if the current date surpasses this timestamp). Format: YYYY-MM-DDTHH:MM:SS+HH:MM" (without quotes!)
authors: ["Author's Name"]  // Use a list format even if there is only one author.
label: ["Category1", "Category2"]  // This is optional and can include multiple categories.
announcement:
  text: "Text on the announcement banner" # (optional)
  start: "YYYY-MM-DDTHH:MM:SS+HH:MM" # (required if announcement.text is used)
  end: "YYYY-MM-DDTHH:MM:SS+HH:MM" # (required if announcement.text is used)

Adding an announcement banner

You can show a short announcement banner on the website by adding additional information to the frontmatter of either a file inside sites/main-site/src/content/blog or sites/main-site/src/content/events. The following fields are available:

announcement:
  text: 'Your announcement text'
  start: YYYY-MM-DDTHH:MM:SS+HH:MM # Start date and time of the announcement (without quotes!)
  end: YYYY-MM-DDTHH:MM:SS+HH:MM # End date and time of the announcement. (without quotes!) This is an optional field for events, where the start date of the event is the end date of the announcement by default.

Updating the JSON files and cached markdown

Much of the site is powered by the JSON files in /public and the cached markdown files (from the pipeline docs) in /.cache.

They come pre-built with the repository, but if you want to rebuild them then you'll need to run the following commands. Note that you need to add a GITHUB_TOKEN inside a .env file to avoid hitting API limits (too early). See instructions on how to get a GitHub OAuth token (the token only needs the public_repo permission).

npm run build-pipeline-json
npm run build-component-json
npm run build-cache-force

Adding a new sub-site to the mono-repo

The following steps are necessary to add a new sub-site to the mono-repo:

  • Copy the sites/pipelines directory to a new directory with the name of the new sub-site, e.g. newsite.

  • Update the following files in the new directory:

    • astro.config.mjs
      • Update the assetsPrefix field to point to the new site's netlify URL, e.g. assetsPrefix: 'https://nf-core-website-newsite.netlify.app/'.
    • package.json - Update the name field to the new site name, e.g. "name": "newsite".
    • netlify.toml - Update the paths in the command and the ignore field to point to the new site's source directory, e.g.
    command = "npm run build -w sites/newsite"
    ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF sites/main-site/src/components sites/main-site/src/layouts sites/newsite"

Tools API docs

nf-core/tools API reference docs are built using Sphinx via the add-tools-api-docs.yml GitHub Action and a webhook from the nf-core/tools repo.

Contribution guidelines

If you are looking forward to contribute to the website or add your institution to the official list of contributors, please have a look at the CONTRIBUTING.md.

Crafting a Blog Post

To publish a new blog post on the website, you'll need to create a Markdown file within the sites/main-site/src/content/blog/ directory. In this file, include the following frontmatter at the beginning:

---
title: "Your Blog Post Title"
subtitle: "A brief overview of your post's content"
headerImage: "Direct URL to an optional header image"
headerImageAlt: "Descriptive alt text for the header image (mandatory if a header image is used)"
pubDate: "Scheduled publication date and time (the post will go live post-website rebuild if the current date surpasses this timestamp). Format: YYYY-MM-DDTHH:MM:SS.000+HH:MM"
authors: ["Author's Name"]  // Use a list format even if there is only one author.
label: ["Category1", "Category2"]  // This is optional and can include multiple categories.
---

Note

The blog post will be visible on the website only if a rebuild of the site occurs after the date and time specified in the pubDate field.

By default the first paragraph of the blog post will be used as the preview text on the blog page. If you want to use a different paragraph, add the following comment after the paragraph you want to use:

<!-- end of excerpt -->

or for MDX

/* end of excerpt */

Community

If you have any questions or issues please send us a message on Slack.

Credits

Phil Ewels (@ewels) built the initial website, but there have been many contributors to the content and documentation. Matthias Hörtenhuber (@mashehu) worked on the concept and code for the new website rewrite.

See the repo contributors for more details.

Kudos to the excellent npm website, which provided inspiration for the design of the pipeline pages.

website's People

Contributors

alneberg avatar alvaromartmart avatar apeltzer avatar bjlang avatar christopher-hakkaart avatar chriswyatt1 avatar drpatelh avatar edmundmiller avatar elinkronander avatar ewels avatar franbonath avatar friederikehanssen avatar ggabernet avatar jfy133 avatar joaquimgamero avatar joseespinosa avatar lescai avatar louislenezet avatar mahesh-panchal avatar mashehu avatar maxulysse avatar medulka avatar mirpedrol avatar mribeirodantas avatar nf-core-bot avatar nvnieuwk avatar priyanka-surana avatar renbot-bio avatar renovate[bot] avatar sven1103 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

website's Issues

Automatically tweet about pipeline releases

It would be nice if we can make use of the GitHub web hook to detect new pipeline releases and automatically tweet about them. Should be relatively easy if we use https://twitteroauth.com/ (can have https://github.com/abraham/twitteroauth as a git submodule).

Cool features would be:

  • Usernames and passwords stored in a config file as with the other stuff already
  • A check to make sure that it's a pipeline (ignore other listed repos)
  • Fire only on releases and not other events
  • Skip pre-releases and release candidates
  • Link to the release page
  • Check for existing tweets linking to the same URL??
  • Add in some information about the pipeline (use description?)
  • Link to the main nf-core website
  • Have a list of available templates so that it's not the same message every time
  • Emoji 😀

Any other ideas..?

Request : externalize PR / issues stats

Hi

I have stumbled on your awesome project statistics: https://nf-co.re/stats#github_prs

I find the PR & issues stats especially pretty & useful:

2019-09-19 17_12_04-nf-core

I don't know of any open-source tool that provides those.

Do you think those graphs could be easily reused for other git repos ?
They are based on GitHub API v3 /repos/statistics API ?
I had a quick look and the rendering logic seems buried in this 1500+ lines PHP script: stats.php

Instructions to pull singularity container not working

On https://nf-co.re/usage/installation the instructions to pull the singularity image are not correct. The code there is:

singularity pull --name nf-core-YOUR_PIPELINE.simg nf-core/YOUR_PIPELINE

An example of running this code is:

pascalp@kingfisher ~ $ singularity pull --name nf-core-rnaseq-1.3.simg nf-core/rnaseq:1.3
FATAL:   While pulling library image: image nf-core/rnaseq:1.3 (amd64) does not exist in the library

The correct code example should be:
singularity pull --name nf-core-YOUR_PIPELINE.img docker://nfcore/YOUR_PIPELINE

Singularity pull fails

Tried to setup Singularity (for offline use) using the instructions in the installation.md file but it failed. See below:

[user]$ singularity pull --name nf-core-rnaseq-1.3.img docker://nf-core/rnaseq:1.3
WARNING: pull for Docker Hub is not guaranteed to produce the
WARNING: same image on repeated pull. Use Singularity Registry
WARNING: (shub://) to pull exactly equivalent images.
Docker image path: index.docker.io/nf-core/rnaseq:1.3
ERROR UNAUTHORIZED: authentication required
ERROR Check existence, naming, and permissions
Cleaning up...
ERROR: pulling container failed!

But I was able to get it working after editing the docker image path to remove the "-" from nf-core based on a similiar issue in another nf-core pipeline (see here: nf-core/chipseq#8). See below:

[user$ singularity pull --name nfcore-rnaseq-1.3.img docker://nfcore/rnaseq:1.3
WARNING: pull for Docker Hub is not guaranteed to produce the
WARNING: same image on repeated pull. Use Singularity Registry
WARNING: (shub://) to pull exactly equivalent images.
Docker image path: index.docker.io/nfcore/rnaseq:1.3
Cache folder set to /home/samcarli/.singularity/docker
[8/8] |===================================| 100.0% 
Importing: base Singularity environment
...

Created a pull request to remove the "-" in the installation.md document.

Map is broken

For some reason, and I have absolutely no idea why, #60 broke the map. Looks like the latitude 16.402660 is being parsed as a string in javascript instead of a number. Whhyyy??

Need to update the javascript to force numeric parsing.

"Broken" URLs

We have a broken URL here: https://nf-co.re/tools

"You can find extensive documentation about each of the lint tests in the lint errors documentation."

This links to the GitHub Repository

Testimonial sections

We should also have a section with testimonials etc pp that we can refer to - e.g. that the German National Sequencing Centers utilize nf-core/nextflow now widely too.... Can we have another section somewhere in "About" maybe for this purpose?

Pipeline list: sort unreleased by commit date

The default view on the pipelines list shows those with the latest release, which is nice. For pipelines with no release however, it gets a bit random. Could be nice to sort by the most recent commit so that pipelines that have been started and stalled sink to the bottom.

Could also have an icon that flags unreleased pipelines with low commit counts? But maybe not very accurate.

Check that organisation users are set to public

By default, when people join the nf-core organisation, their membership is set to be private. This is bad because:

  • We publicise everyone's membership on the website anyway, so it's not really private
  • It means that the team size is very under-represented when viewed by non-members

This is annoying and slightly fiddly to change - only the user themselves is allowed to change it and it requires a bit of clicking.

Although we can't change it for people, we can check the organisation to see who is set to public and spam them until they update their profile.

Add search bar to website

Not sure how difficult this is going to be or whether it even makes sense! Just tried to find the post that @apeltzer recently added on Singularity bind paths, and had to find the PR I reviewed to pin point it. Some of it could have been common sense to be honest 😎

Use nf-core/tools cli docs

At the moment, we are maintaining (or mostly failing to maintain) two sets of docs for the nf-core/tools command line tools - one on the website and one on the tools repository.

We already have tools as a subrepository and are parsing the lint_errors.md file for the docs. We should do something similar for the description of the command line tools too so that we only have to keep one set of docs up to date.

Automatic registration of pipelines at bio.tools

Apparently, it would be possible to fetch our metadata and submit a registration of new pipelines / update our existing pipelines and make them listed at bio.tools:

https://biotools.readthedocs.io/en/latest/api_reference.html#register-a-tool

Not sure its a tools thing to do, or we could rely on the metadata used for the webpage already to submit such a pipeline on the frequent updates that our webpage gets already (so might need to transfer this issue then...)

@ewels @sven1103 might be interested in this :-)

Add section on Making a new release

We should have something that documents on how to get a new pipeline properly released. The question pops up quite frequently and is something we could easily document using 2-3 screenshots, e.g. like this:

Bildschirmfoto 2019-05-06 um 18 02 25

Bildschirmfoto 2019-05-06 um 18 02 29

Bildschirmfoto 2019-05-06 um 18 02 55

nf-core has dependencies on conda-forge

Dear nf-core team,

If one has not pre-configured channels on conda a conda install, the following command from the tutorial won't run because some dependencies are pulled from conda-forge

conda install -c bioconda nf-core

Use this command instead

conda install -c bioconda -c conda-forge -c default nf-core

Not sure if the default channel is useful here though

Cheers,

M

Update main docs page

The main documentation page is a bit out of date now and could do with a refresh.

Would be good to expand it quite a bit and split into several sections:

  • Beginner's guide to running nextflow
  • nf-core tools
  • nf-core community guidelines
  • Working on an existing pipeline
  • Adding a new pipeline

Some of this could potentially be taken from the cookiecutter template docs. Then we could avoid having to write the same thing in too many places.

Missing nf-core create subcommand docs and template branch

Currently the docs do not mention the nf-core tools subcommand create and the documentation about how to setup the git repo correctly with an additional TEMPLATE branch is not referenced anywhere in the docs.

ToDo:

  • Add docs for subcommand create
  • Link to docs for proper git setup

Hackathon Subpage?

Maybe we should have a section on the webpage where we list some information on upcoming hackathons? I guess its going to happen that we have these quite frequently, so it makes sense to have a central location for these :-)

Make image generator for repo social preview

GitHub can now have social preview images, like the one that @maxulysse added for Sarek:

sarek preview

It would be good to make a website generator for these images - given a pipeline name, it could take the repo description and return an image of the correct size.

For now, there is no API endpoint to upload these images, so they will still have to manually added by the maintainer.

Add Tutorial / HowTo Section?

Phil had the idea to also provide a tutorial/howto section on the webpage, since we have quite some material available now!

Automatically setup Docker Builds for newly forked repositories

An idea that I already thought about a couple of times:

It should be possible to use the DockerHub APIv2 to automatically create a DockerHub repository for that pipeline upon creation.

Sets up:

  • repository + correct name (e.g. nfcore/)
  • sets build rules accordingly for branches master, dev, and a release version.

Triggers initially on master and dev.

Make PHP script to generate nf-core pipeline logos

If we have a PHP URL such as /pipeline_logo?name=mypipeline that automatically generates a .png pipeline logo, the nf-core create tools command could pull that when making new pipelines. Would be nice!

Could also have the type keyword to choose between png and svg..

/pipeline_logo?name=mypipeline&type=png
/pipeline_logo?name=mypipeline&type=svg

NB: The nf-co.re website truncates the .php file ending from URLs.

Add automation for joining the GH organisation

At the moment, the process of joining the nf-core organisation is a bit of a faff. You have to add a comment to some arbitrary ancient issue and hope that someone notices and adds you.

It's possible to add users to the organisation via the GitHub API, so we should be able to make a web page where people can do this themselves.

Note that to avoid people arbitrarily adding other people (deliberately, or through typos), we should probably require user authentication to do this. This adds some complexity, but I think it's probably worth it. As a bonus, having user auth would mean that we could programatically set their membership to public too - avoiding the need for #179

Add troubleshooting docs

We should try looking at open issues and potential solving points (e.g. missing mksquashfs, missing pipeline configuration, singularity bind paths) and add these to the troubleshooting sections as these questions are asked quite frequently either on slack or the github issue trackers. Golden rule:

"Have a FAQ entry for it, whenever something has been asked for >= 3 times!"

Create contributors page

The homepage has institute logos, but they don't link anywhere when clicked.

Create a new page listing main contributing groups.

Dockstore support

Hi @agduncan94, @denis-yuen,

Thanks again for the Dockstore - nextflow support! I was just poking around again and noticed that not all releases are showing up though.

For example, nf-core/rnaseq has versions 1.1 and 1.2 released now (https://github.com/nf-core/rnaseq/releases), however, the dockstore page (https://dockstore.org/workflows/github.com/nf-core/rnaseq:1.0?tab=versions) only lists 1.0 and 1.1, and also has 1.0 listed as the default version.

There are also only 9 nf-core workflows listed, but now over 20 are present (we keep a JSON list at https://nf-co.re/pipelines.json if it helps).

Is there anything we can do to help all releases be pulled into Dockstore? Would it be possible to have the latest release set as the default version for all nf-core pipelines?

Cheers,

Phil

Heading anchor links

It's nice to be able to link to headings in web pages. Dynamically generate these when we parse the markdown and then do some fancy pants CSS stuff to show an anchor link on hover.

Basically, copy a load of stuff from the MultiQC website:

Join the team (post here to be added to the nf-core team)

Update 2021-12-06

To join the nf-core community, please visit https://nf-co.re/join

The most important step is to sign up to the nf-core Slack, which is the hub of the community.

Once there, you can ask to be invited to the nf-core GitHub organisation by posting in the #github-invitations channel.


Previous method of joining via this issue left below:


Please add a comment below if you would like to be added to the nf-core community.. Everyone is welcome!

Note: After you post here, we will email you an invitation through github to join the nf-core team. Click the link in that invitation in order to be added.

ps. I totally stole this idea (and many others) from bioconda.. Thanks guys!

Add SSL certificate

I just realized that the domain doesn't have SSL certificate. We could use Let's encrypt. It's free and they already have a bot that renews the certificate every three months.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.