Skip to content

Latest commit

 

History

History
109 lines (81 loc) · 3.27 KB

index.md

File metadata and controls

109 lines (81 loc) · 3.27 KB
layout
home

Contents

{:.no_toc}

  • The Table of Contents of This page {:toc}

Welcome to GitHub Pages.

This is a test of using GitHub Pages to create a static website. The sections below are simply to test out some of the features of the main tools:

We also want to see how this file renders in GitHub's online editor.

Building locally

The website generated by Jekyll can be built and served locally to test changes without making commits upstream. Note that GitHub Pages has a soft limit of 10 rebuilds per hour. Provided you have an install of Ruby 2 or better ,including the development headers and library, the workflow is:

$ git clone https://github.com/supernemo-dbd/supernemo-dbd.github.io
$ cd supernemo-dbd.github.io
$ ./snjekyll serve

The last command will download and setup the local Jekyll instance, and start a local isolated webserver at http://127.0.0.1:4000. Simply point your favoured browser to this address to view the generated site.

The server runs in the foreground and watches the site sources for changes (for example, index.md). When a file changes, the server will rebuild the site automatically, so simply refresh your browser to see the resultant regenerated site. For example, try making some changes to index.md The server may be shutdown at any point using Ctrl-C.

Further information on tasks available from snjekyll can be seen by running

$ ./snjekyll help

Alternately, if you already have a custom Ruby install, e.g. with Home/Linuxbrew you can do

$ git clone {{ site.github.repository_url }}
$ cd {{ site.github.repository_name }}
$ gem install bundler
$ bundle install
$ bundle exec jekyll serve

In both workflows, the xz package installed by Home/Linuxbrew is not compatible with the nokogiri gem required by Jekyll, and will cause compiliation of the gem to fail. snjekyll will issue a warning about this, but will not take further action. To work around this issue, either do brew unlink xz or remove Home/Linuxbrew settings from your environment. The latter may not be possible if you have Homebrew installed in /usr/local

Can we use MathJax and $$\LaTeX$$?

MathJax can support inline math, e.g. $$ 1/x^2 $$, and block equations:

$$ e^{i\pi} + 1 = 0 $$

like the above. Numbered equations, using the AMS math environment:

$$ \begin{equation} E = mc^2 \label{einstein} \end{equation} $$

This should allow a reference (see Equation $$\eqref{einstein}$$) to be inserted.

Can we use code blocks?

Here's C++:

#include <iostream>

int main() {
  std::cout << "Hello World\n";
}

and some Python:

import os
print('Hello World')

Support or Contact

Having trouble with Pages? Check out our documentation or contact support and we’ll help you sort it out.