Coder Social home page Coder Social logo

scion-tutorials's Introduction

SCION tutorials page

The website is deployed on Github Pages.

About

SCION tutorial pages are written in markdown and they are placed in the content directory. The HTML website is generated using MkDocs.

The generated HTML website is placed in the docs directory.

Prerequisites

In order to build the website you will need to install MkDocs:

pip install mkdocs

Building pages

In order to generate the website just run:

mkdocs build

The newly generated website will be placed in the docs directory.

Development

During the development phase, it is possible to run a local webserver and automatically refresh the website content. To do this, run:

mkdocs serve

Adding new page

Adding a new page consists of 2 steps:

  1. Add a new markdown file in the content directory with the page's content
  2. Add page information into the corresponding category with description in mkdocs.yml (at the end of the file)

mkdocs-material customisation

The mkdocs-material theme is used for the SCION tutorials page. To change the color palette used in this theme, the source code has to be edited (squidfunk/mkdocs-material#874).

Therefore the mkdocs-material source code was added as a git subtree, so we can add commits on top:

$ git subtree add -P mkdocs-material --squash https://github.com/squidfunk/mkdocs-material.git 3.0.4

Currently, the following customisations have been applied to the theme:

  • Change primary/accent colors
  • Set favicon
  • Set font size and margin for title in navigation-panel
  • Remove next/previous navigation links in footer

Using git subtree will (hopefully) allow to update to newer versions of mkdocs-material if necessary, by running e.g.

$ git subtree pull -P mkdocs-material --squash https://github.com/squidfunk/mkdocs-material.git <tag>

After updating the mkdocs-material version and re-applying the customisations, the theme has to be rebuilt; you'll need nodejs>=8 and npm installed, then simply run make and check in the rebuilt mkdocs-material/material folder.

Check links

You can always look for broken links in the tutorials by running:

wget --spider -r -nd -nv -l 3 -w 0 -o - https://netsec-ethz.github.io/scion-tutorials/ | grep -B1 'broken link!'

Prior to merge to master it is always nice to check against our own repository. For that you need to enable Github Pages in your clone of scion-tutorials, and remembering that Github Pages are available only for the master branch, your commits would have to be pushed to your master. E.g.:

git push myremotename HEAD:master
sleep 30
wget --spider -r -nd -nv -l 3 -w 0 -o - https://mygithubusername.github.io/scion-tutorials/ | grep -B1 'broken link!'

scion-tutorials's People

Contributors

elwin avatar fr4nk-w avatar hausheer avatar juagargi avatar matzf avatar mlegner avatar mwfarb avatar perrig avatar stschwar avatar xabarass avatar

Watchers

 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.