Giter VIP home page Giter VIP logo

lightning-dev-site's Introduction

Lightning Network Daemon Developer Site

Developer guides and resources for the Lightning Network Daemon

Overview

This repository contains functionality for programmatically pulling guides from the lnd repo, using a Python script and Jinja2 templates to output markdown files, which are the corresponding pages in the fully rendered Jekyll static site.

Pay special attention to these files:

  • templates/base.md: The Jinja2 template fed into the Python script, holding the Jeykll header to be prepended to the guide content pulled from Github. The templates dir also holds the templates for special cases where for example a dev site-specific footer needs to be appended
  • update_and_render.sh: Update local guides to the latest version available
  • render.py: The Python script that uses local guides and Jinja template to strip out redundant titles, add page headers/footers, and output Jekyll markdown
  • deploy.sh: Build static site from Jekyll markdown and deploy to Google Cloud Platform

The rest of the files in this repo are the standard Jekyll site files.

Running the site locally

Install Jekyll:

$ gem install jekyll bundler

Run the site and watch for changes:

$ bundle exec jekyll serve

Regenerating documentation

# Install Jinja for python templating
pip install Jinja2

Get the latest INSTALL.md

curl -o INSTALL.md -s https://raw.githubusercontent.com/lightningnetwork/lnd/master/docs/INSTALL.md

Get the latest gRPC guides

curl -o python.md -s https://raw.githubusercontent.com/lightningnetwork/lnd/master/docs/grpc/python.md
curl -o javascript.md -s https://raw.githubusercontent.com/lightningnetwork/lnd/master/docs/grpc/javascript.md

Let's run the script to render the guides:

python render.py

Now that you're all set up, you can just run ./update_and_render.sh to automatically pull the latest markdown files and render the local Jekyll docs.

Deployment

The Lightning API is deployed with Google Cloud Platform. Visit this blog post for more information.

Steps

  1. Install Google Cloud SDK and authenticate into it:
brew cask install google-cloud-sdk
gcloud auth login
  1. Build
jekyll build
  1. Push to Google Cloud Bucket
# -m use faster multithreaded uploads
# -d delete remote files that aren't in the source
# -r recurse into source subdirectories
gsutil -m rsync -d -r ./_site gs://dev.lightning.community

In the future, you can just run ./deploy.sh to deploy automatically.

lightning-dev-site's People

Contributors

aakselrod avatar bryanvu avatar cbarraford avatar ckcollab avatar jamesob avatar magomimmo avatar maxfangx avatar ndeet avatar roasbeef avatar sangaman avatar tanx avatar xgess 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.