Notes is a static site generator created using Jupyter Notebook. The projects aimed to provide an easy way to digitalize my notes and to make it easily accessible.
The main starting point of the project is main.ipynb file. The file is explanatory and after running the file it creates a ready to host independent website in the dist/ folder and an index.html file in the root folder.
Following Frameworks, Libraries and tools are used in building this website.
- dist - Auto generated folder, contains the final HTML version of notes.
- notes - All the notes must be stored in this folder.
- static - Static assets of the project like images, stylesheet, javascripts etc.
- template - HTML template for index and notes page as well has template for HTML converter must be stored here.
- index.html - Auto generate index page of the website.
Notes must be created under notes directory. Under notes directory any folder structure can be followed. The final HTML file to be generate will be created with same parents folder. So the folder structure must match the URL pattern that is expected for the note. The code below will find any .ipynb
file and use it as a candidate to convert to HTML.
Each note must contain the following metadata which will be used in the final conversion process.
{
"notes_info": {
"title": "Title of the note",
"description": "Description of the note",
"image": "Image of the note to shown",
"slug": "(Optional) Slug of the note to be used as HTML filename"
}
}
Conda is needed to be installed before setting up this project.
- Clone the repo
git clone git@github.com:sunitdev/notes.git
- Create environment and install dependencies
conda create --name <some_name> --file=environment.yml
- Start jupyter notebook
jupyter notebook
To build the static site run every cell in main.ipynb
.
Project Link: https://github.com/sunitdev/notes