Git Product home page Git Product logo

dropcms's Introduction

DROPCMS

Static site generator using content synced from Dropbox.

Installation

$ pip install dropcms

Setup

Set the following environmental variables:

Variable Description
DROPBOX_ACCESS_TOKEN Generate a Dropbox API token that has access to your account (see here for instructions)
DROPBOX_ROOT_FOLDER The folder within your Dropbox root folder that will be the root of the content to render on your site
REDIS_URL (Optional) to reduce the amount of time it takes to refresh the data, set up Redis caching by setting the URL here
DROPCMS_S3_BUCKET The S3 buck to sync content with

Folder Structure

dropcms will render markdown files one folder deep in DROPBOX_ROOT_FOLDER. If there's an index.md file in any folder, it will act as the index of the folder. Otherwise, dropcms will render a unordered list of the pages in the folder as the folder index.

For example, if the DROPBOX_ROOT_FOLDER is set to my_content and the folder structure is as follows:

~/Dropbox/my_content/index.md
~/Dropbox/my_content/file1.md
~/Dropbox/my_content/folder1/file2.md
~/Dropbox/my_content/folder1/file3.md
~/Dropbox/my_content/folder1/folder2

file2.md, file3.md will be rendered but file1.md and folder2 will be ignored. The root index of the site will be read from index.md but the index of folder1 will be automatically generated.

Syncing With Amazon S3

Note: to sync with S3, you must have AWS configured. See here for instrucitons.

$ fab sync

CLI Usage

Build static files locally:

dropcms build -s config.json -o _build

Run the site locally (to test):

dropcms run -s config.json -u 0.0.0.0:5000

Configuration

JSON file containing settings. Parameters:

  • dropbox_root: the folder within your Dropbox to load content from
  • dropbox_token: API token. Generate a Dropbox API token that has access to your account (see here for instructions). Alternatively, the token can be set as the environmental variable DROPBOX_ACCESS_TOKEN
  • S3_bucket The S3 buck to sync content with
  • redis_url (Optional) to reduce the amount of time it takes to refresh the data, set up Redis caching by setting the URL here

dropcms's People

Contributors

jeffroche avatar

Watchers

 avatar James Cloos 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.