Giter VIP home page Giter VIP logo

github-pages-demo's Introduction

This repository demonstrates:

  1. A conversion of a Jupyter notebook into a static HTML
  2. Serving this HTML using Github Pages

Setup

  1. python -m venv ./venv/github-pages/ - Create a virtual environment
  2. .\venv\github-pages\Scripts\Activate.ps1 - Activate it (use the right script depending on your terminal, this one is for Windows-PowerShell)
  3. pip install -r requirements.txt - install the packages into the virtual environment
  4. python -m ipykernel install --user --name=github_pages --display-name=github_pages - set up the IPython kernel in the virtual environment, such that this environment could be used in VSCode. Notice the name that we provide to the environment. This is how it will be identified in VSCode.

Convert the Notebook to an HTML file

  1. jupyter nbconvert --to html ./notebooks/example.ipynb --output-dir ./docs --TagRemovePreprocessor.enabled=True --TagRemovePreprocessor.remove_input_tags="['noshow']" - converts the notebook into an HTML file.

Serve the HTML through Github Pages

(reference: official docs. Jekyll built-in support: official docs)

  1. Enable Github Pages through the repository settings. For this the repository will have to be public, or your user should be on the Pro program.
  2. The public URL is: GITHUB-USER-NAME.github.io/REPOSITORY-NAME, and the landing page is index.html. NOte that you can you set your own domain if you own one, and this can be set via the repository's settings.

github-pages-demo's People

Contributors

ranfeldesh avatar rajanbirsinghsethi 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.