Coder Social home page Coder Social logo

yhoiseth / staticgen Goto Github PK

View Code? Open in Web Editor NEW

This project forked from netlify/staticgen

0.0 1.0 0.0 5.25 MB

StaticGen.com, A leaderboard of top open-source static site generators

Home Page: http://www.staticgen.com

License: MIT License

JavaScript 100.00%

staticgen's Introduction

staticgen.com

staticgen.com, a leaderboard of top open-source static site generators.

Contributing

Missing a static site generator here? Just fork the repo and add your generator as a <name>.md in the source/projects folder.

Make sure to follow the following rules:

  • Static Site Generation: No "flat-file CMSs" or similar tools. The program must be able to output a static website that can be hosted in places like Netlify, S3 or Github Pages.
  • Open Source: The generator must have a public repository on Github that we can link to and pull in stats from.
  • Stick to the format: Fill out all the same fields as the other static site generators in content/projects.
  • Short description: Keep all the details for the body text, keep the description for the overview page short and sweet.

Usage

Be sure that you have the latest node and npm installed, then clone this repository and run:

npm install
npm start

In order to successfully retrieve Twitter followers and GitHub stars, you will need authentication keys for both services.

For GitHub, all you'll need is a personal access token. This can be generated at https://github.com/settings/tokens. For Twitter, you need to create an application at https://apps.twitter.com to get the necessary tokens. When deploying, you must set the environment variables per the example below. If you are developing locally, you can set these in a .env file at the root of the repo.

STATICGEN_GITHUB_TOKEN=examplekey123abc
STATICGEN_TWITTER_CONSUMER_KEY=examplekey231abc
STATICGEN_TWITTER_CONSUMER_SECRET=examplekey321abc
STATICGEN_TWITTER_ACCESS_TOKEN_KEY=examplekey231abc
STATICGEN_TWITTER_ACCESS_TOKEN_SECRET=examplekey321abc

GitHub and Twitter data is cached in the .tmp directory, and online in a Gist. If neither has data newer than 24 hours old, fresh data is fetched from GitHub and Twitter. Fetching caching occur automatically during the build.

Then visit http://localhost:3000/ - React Static will automatically reload when changes occur.

To test a production build locally, do:

npm run stage
npm run serve

To run a production build for deployment:

npm run build

Configuration

This repo uses a site.yaml file to provide high level configurability, with the eventual goal of deriving a generic boilerplate that can be used for generating an open source leaderboard without editing the site source.

The currently supported keys for site.yaml are present in the file itself, documentation of available options will be provided when the generic boilerplate is published.

Netlify

staticgen.com is built and maintained by Netlify, a hosting and automation service for static websites and apps.

License

StaticGen is released under the MIT License. Please make sure you understand its implications and guarantees.

staticgen's People

Contributors

biilmann avatar erquhart avatar bdougie avatar eliwilliamson avatar fool avatar philhawksworth avatar calavera avatar johnroper100 avatar alexchopin avatar rybit avatar vsopvsop avatar markseuffert avatar thanethomson avatar arnaudligny avatar anishkny avatar cjbrooks12 avatar dbohdan avatar verythorough avatar kyleamathews avatar thierrybgentile avatar nuex avatar maphew avatar danstowell avatar rafaelmartins avatar mitchellcash avatar dracos avatar leonstafford avatar cyberglot avatar gflohr avatar felipetavares avatar

Watchers

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.