Git Product home page Git Product logo

sunpy.org's Introduction

SunPy Website

Here lays the source code for the SunPy website.

Background

This site makes use of Sphinx, and was built upon Bootstrap via the Sphinx Bootstrap theme. So each static page is written in reStructuredText (RST).

We use Netlify deploy and host the website.

Testing Locally

To setup your computer to run this site locally, you need to install the various Python packages in the requirements.txt at the top level of this repository.

You will WANT to test any changes you have made to the website. To do this, we have a Makefile that you should use:

    make html

This will build a collection of html pages under _build/html and you can open the index.html using your browser of choice.

Creating a PR

When you are happy with any changes you have made to the website. We recommend building the website and making sure that everything is building fine. You should see no warnings for the build.

Once you are sure everything is in order, you can send in a PR to this repository. If you are unfamiliar with this, please see this guide from GitHub.

PR Review

When a PR is opened, two continuous integration services will trigger. We use Travis to test the build and if it fails we wil get a full build log to debug. While Netlify will create a preview of any content or style changes.

Both of these services must pass before the PR will be merged, furthermore, one review is required before a PR can be merged as well.

Creating a Blog Post

Blog posts can be added by creating a new text file in the posts/<current year> directory. The filename must use the following naming convention YEAR-MONTH-DAY-title.{ext} and be written in one of the following formats:

RST

If you write your post in RST formatted text, each file must also contain the following header for Sphinx via Ablog to parse the post properly:

<Title>
=========

.. post:: <Date>
   :author: <Name>
   :tags: <Tag list with commas>
   :category: <One of the below>

Jupyter Notebook

When writing posts as Jupyter notebooks, the first cell should be a Markdown cell with the title as a top level heading (i.e. using a single #) and the second cell should be a raw cell containing the following

.. post:: <Date>
   :author: <Name>
   :tags: <Tag list with commas>
   :category: <One of the below>
   :exclude:

   <Short description of post>

You might have to open the notebook in a text editor and change the "metadata" for the post cell to include the following

   "metadata": {
    "raw_mimetype": "text/restructuredtext"
   },

The short description will appear as a preview of your post on the blog page. See the nbsphinx docs for information on making raw notebook cells compatible with Sphinx and RST.

Additionally, Sphinx will automatically add a link to the interactive version of your notebook, hosted on Binder, to the top of your post. If your notebook requires any other dependencies besides SunPy (or its dependencies), they will need to be added to binder/requirements.txt.

Metadata

Please note that the date for the post is different to the way it is written for the blog filename. Since this date is reader facing, we want month day year e.g., 14 May 2056. Also we try to enforce one line per sentence.

The current range of categories we have "officially" are:

  • Release
  • Update
  • GSoC
  • SOCIS
  • Tutorial

Please select the one that is more appropriate, for many Update would be enough.

For tags, you can choose what you prefer for your post but please don't use any that are in the categories list.

Colors

The colors used in the site are:

  • #444444
  • #FE7900
  • #BDBDBD

Miscellaneous

Some things to watch out for:

  • do not use bare colons inside your post title. If you really need a colon use &#58;

sunpy.org's People

Contributors

nabobalis avatar ehsteve avatar cadair avatar duygukeskek avatar prateekiiest avatar souravc4 avatar wtbarnes avatar kakirastern avatar dpshelio avatar vatch123 avatar yashrsharma44 avatar ayshih avatar binchensun avatar tiagopereira avatar vn-ki avatar abit2 avatar derdon avatar swapsha96 avatar

Watchers

James Cloos avatar  avatar

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.