ipfs website
- Install
- Relative paths
- Site structure
- Theme
- Pages content
- Blog content
- Building the site
- Contribute
- License
Simply clone this repository.
This site uses Pelican as a custom configured static site generator.
pip install pelican markdown
You may need to easy_install pip
if pip
gives you not found warnings.
If you have issues with any of the packages, it may be a good idea to use a virtual environment. To do this:
virtualenv venv/
. venv/bin/activate
pip install pelican markdown
Open locally in the browser.
The site is presently built so that all paths are relative, making it easy to deploy to IPFS.
Here's the key highlights of various important files and folders:
content
is where the site's content goes. There are subfolders for:ipfs.io-theme
contains the site's look and feel. This folder includes atemplates
folder, using fairly straightforward templates to build the site with. The_styl
folder contains the stylus files that are used to build the site's CSS.ipfs.io-theme/templates/latest.html
automatically adds the latest blog posts, plus includes custom links to featured articles and videos.- [
pelican-plugins
] just has relevant plugins used by pelican to build the site.
The site theme files are contained in the ipfs.io-theme
directory.
To work on the theme, install Grunt:
npm grunt-cli
CSS is compiled from stylus in the _styl
directory.
Pages go in ./content/pages
Pages should set their title at the top of each md file and add content below. Optionally, they can also set section
, pagetype
, and constellation
. For example, see this one for the Contact page:
pagetype: major
title: Contact | IPFS
section: Contact
constellation: constellation-01.svg
A "pagetype" that includes "major" will get a larger header. The text in "section" will denote what the title embedded in the header will be, and "constellation" will allow selection of one of the pieces of constellation artwork that accompanies the headers.
Page urls can be defined (see the docs
subfolder) or will default to a slugified version of the page name (i.e. about.md
will end up at /about
)
Blog articles go in ./content/posts
and should have a title, date,
and author.
If you have images to associate with a blog post, add them to content/images
. Then, to refer to them in a way that will allow them to be built as siblings of the blog post html, prefix their path with {attach}, like so:
![]({attach}/images/earthrise.png)
If you have files like Asciinema, add those to content/static
and refer to them as
{attach}/static/file
The site is built via make. Type make
to see your options.
You can run ./develop_server start
and the site will be automagically rebuilt while you're working on it.
./develop_server stop
will stop the server
Feel free to join in. All welcome. Open an issue!
This repository falls under the IPFS Code of Conduct.