Git Product home page Git Product logo

noc-book-2023-cn's Introduction

The Nature of Code 2nd Edition

This repo contains all the files for the Nature of Code 2nd edition. The book is now being authored in Notion and imported here as raw HTML files (which are then used to build the print PDF and gatsby website).

Data flow chart showing three parts: edit, store, and output.

Edit & Import

Notion Database Screenshot

Content are stored in a Notion Database with the following attributes:

  • Type (Page | Chapter): to be handled differently during builds, now only act in the website build.
  • Title: defines the title
  • Status (Draft | Published): only Published ones will be imported
  • File Name: defines the page sequence in a pdf build
  • Slug: defines the path in web page URL

Each entity also contains a page of its content, which will be transformed to html files based on the schema. The transformation script (nature-of-code/fetch-notion) is written in Node.js, utilized as a GitHub action.

Build

Following are the steps to build the book and website, however, you will have to skip the import-notion-docs as that can only be done with the Notion API key associated with the book. You can find the latest HTML version of the book in /content.

# Install Dependencies
npm install

# Build PDF (Magicbook) in `build` directory
npm run build:pdf

# Build Website in `public` directory
npm run build

Attributions

Icons used in this project:

๐Ÿ–๏ธ (Crayon) & ๐Ÿฆœ (Parrot) & ๐Ÿ”Ž (Magnifying glass) from OpenMoji โ€“ CC BY-SA 4.0

noc-book-2023-cn's People

Contributors

shiffman avatar jasongao97 avatar tuantinghuang avatar 43-stuti avatar fturmel avatar moodvector 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.