Re-write and re-design of the Shogun website
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
-
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
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.
To embed a markdown file from the docs submodule
(see shogun-toolbox/docs).
Prerequisites:
DOCS_SUBMODULE_DIR
const inshogun_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
.