Code Monkey home page Code Monkey logo

shogun-web2's Introduction

Shogun-Web2

Re-write and re-design of the Shogun website

currently running at: http://shogun-web.herokuapp.com/

Overview

Shogun-Web2 is written in python using Flask. The application has no database and instead pulls most of its data from other locations via APIs.

Twitter Bootstrap is used for the frontend framework along with the Stanley Theme

Details

  • Latest News section pulls from our Twitter feed using the Twitter API

  • Recent Activity shows the most recent commits from Github using their API

  • The main showcase reel at the top and the multi carousel of notebooks at the bottom fetches notebooks and demos from directories on the production server. Several notebooks are included in this repo and the site will use them when running it locally.

  • The site features a link to the latest Shogun docs generated by doxygen

  • IRC logs are recorded by an irssi bot on our channel running on the same server as the website. A cron job runs every 17 minutes copying the latest irc logs into HTML (using logs2html for the site

  • The blog is a combination of several RSS feeds of interest and is fetched using the Google Feeds Javascript API. The combination feed itself is generated by another Flask application running on Heroku http://shogun-planet.herokuapp.com/feed

Deploying

The site is currently deployed to Heroku under Kevin Hughes' account (kevinhughes27 on Github) until we move it to the Shogun-toolbox.org server.

To deploy run script/deploy.sh

If you need to update credentials on Heroku run script/creds2heroku.sh

Developing

To run the app locally you can either run ./script/server.sh or use the Heroku toolbelt manual and run foreman start. Both of these approaches will export the required environment variables before starting the main program. In order to run the app locally with full functionality you will need a copy of the credentials in the .env file. Message someone to get these credentials securely.

Embedding markdown files

To embed a markdown file from the docs submodule (see shogun-toolbox/docs).

Prerequisites:

  • DOCS_SUBMODULE_DIR const in shogun_web.py defines the relative path to app's root folder
  • Fetch the docs submodule into the docs folder in the root

Create a <div> in the template file (e.g. templates/install.html) based on the following template:

    <div class="md" data-type="md" data-url="/docs/README.md">
      <div class="md-container" style="text-align: justify"></div>
    </div>

This example also shows how to pass a paragraph style (here: text-align).

For more detail see static/javascripts/markdown.js.

shogun-web2's People

Contributors

karlnapf avatar kevinhughes27 avatar lisitsyn avatar sperka avatar vigsterkr 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.