Updated for the newest bootstrap version
A layout for Hyde using the Bootstrap framework. Current stable version: v0.3
This is based loosely on this Bootstrap example layout. The fluid columns are disabled though
The simplest way to use this layout is to:
- Download the latest zip archive
- Unzip it
- Place the unzipped files wherever you want your new Hyde site to be
- From the terminal run
hyde gen
to generate the Bootstrap-based site in it's default state - Poke around on the site by opening mynewsite/deploy/index.html in your browser
Run these commands on the terminal:
#setup a new virtual environment
virtualenv --no-site-packages --distribute mynewsite/env
# clone the code into that new enviornment.
git clone http://github.com/anandtrex/hyde-bootstrap.git mynewsite/env/code
# change your directory into the virtual environment and run the activate command.
cd mynewsite/env && activate
# install the requirements into the virtual environment.
pip install -r requirements.txt
# change into the code directory and generate the Bootstrap-based site in it's default state
cd code && hyde gen
# start the dev server and surf to http://localhost:8080
hyde serve
Poke around on the site by opening mynewsite/deploy/index.html in your browser
There are a variety of templates that you can subclass using `{% extends "templatename.j2" %} on the top of your article or post.
base.j2
- Contains the bulk of the layout logic, but not the best for subclassing because it doesn't have any grid attached to it.columns.j2
- Has a main content area and a sidebar. Based on Bootstrap's fluid.html example.topbar.j2
- Adds a top bar to the base layout
To make real use of this package, you will need to create your own templates.
You can subclass topbar.j2
or base.j2
to cover most use cases. All of the templates that are provided serve as a
starting point and as an examlpe of possible approaches you can use.
Look at all of the .html
files in the content
directory for an example of how to begin adding your own content.
You can also go to a separate, fresh directory and run hyde create mysamplehydesite
to check out their default layout
and content.
To extend the CSS of a given page, use the {% block css %}{% endblock %}
block. You can do this with a <style>
block
or a <link>
to a CSS file.
To publish the site, first edit site.yaml to match your preferred publishing (github, sftp, etc). See the Hyde README for details. Then run:
hyde publish -c prod.yaml
Use prod.yaml makes it easy to switch your site.config.mode
variable to "production"
which can enable production-only
elements of your site. In the default hyde-bootstrap setup, analytics is only rendered in production mode.
Built using:
- There's a bit of code mixed in from the HTML5 Boilerplate project for jQuery and and IE PNG fix.
- To update the js and css files of bootstrap to newer versions, run
./update-bootstrap-libs.sh
Built by Jeremy Blanchard. Contributions by Anand S.