Changeset - 892f60bb75ff
[Not reviewed]
0 1 0
Michael Guravage (guravage) - 11 years ago 2015-01-09 16:54:39
m.a.guravage@cwi.nl
Markdown syntax error.
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
README.txt
Show inline comments
 
@@ -58,98 +58,98 @@ be installed before Pelican can use it::
 
    pelican-themes --symlink ${PWD}/cwi/theme/cwi
 

	
 
Usage
 
=====
 

	
 
To generate html output, go to the project directory and invoke Pelican via make::
 

	
 
    cd cwi/projects/cwi
 
    make html
 

	
 
Previewing
 
----------
 

	
 
Pelican has its own built-in server. You can invoke it with make; or
 
you can regenerate the HTML and serve it in one command::
 

	
 
    make html serve
 

	
 
The server uses port 8000 by default. After starting the server point
 
you browser to the url: localhost:8000.
 

	
 

	
 
Uploading the generated HTML to a server
 
----------------------------------------
 

	
 
The Pelican Makefile contains several targets for uploading its
 
generated HTML. List all make's targets with::
 

	
 
    make -n
 

	
 
To use rsync, edit the Makefile and customize the values of SSH_HOST,
 
SSH_USER and SSH_Target_DIR.
 

	
 

	
 
If CWI is hosting your site, SSH_HOST and SSH_TARGET_DIR name the host
 
and document root configured for you by ITF staff.
 

	
 

	
 
Archiving your site
 
-------------------
 

	
 
The url from which you cloned the cwi-pelican-template repository is
 
called the clone's 'origin.' To archive your clone you should change
 
its origin to point to a new repository and push it there. For
 
example, if I had created a new repository at scm.cwi.nl named
 
itf-pelican-site, I could push my site there with the following two
 
commands::
 

	
 
git remote add origin https://guravage@scm.cwi.nl/ITF/itf-pelican-site
 
git push -u origin master
 
    git remote add origin https://guravage@scm.cwi.nl/ITF/itf-pelican-site
 
    git push -u origin master
 

	
 

	
 
Creating new Pelican projects
 
-----------------------------
 

	
 
Pelican provides a scrip, appropriately named 'pelican-quickstart', to
 
help create new project hierarchies.  To use it, go to the projects
 
directory and invoke 'pelican-quickstart' at the command prompt. The
 
script will solicit your answers to a number of questions, and
 
generate your new project hierarchy accordingly.
 

	
 

	
 
The CWI Template and Theme
 
==========================
 

	
 
The project content is a hierarchy of folders and files containing
 
your content, the CWI theme and the Pelican generated HTML.
 

	
 

	
 
Content hierarchy structure
 
---------------------------
 

	
 
The first and most important hierarchy is the one that holds the
 
content of your website. Here is where you add your content that
 
becomes pages on your static website.  Browse through the content
 
hierarchy to familiarize yourself with its structure and contents.
 

	
 
Folder names become Pelican categories, so folders named, 'blog',
 
'news', 'pages', 'private' and 'static' contain exactly what you
 
expect them to have. By default, files in the blog folder are
 
displayed on the index page. Files in the pages folder produce
 
corresponding tabs. The events.md file contains explicit links to
 
files in the news folder. The about.md file contains a link to a
 
static PDF file.
 

	
 
You can customize how Pelican will handle your content by editing the
 
configuration files: pelicanconf.py and publishconf.py::
 

	
 
    ├──  projects
 
    │   ├──  cwi
 
    │   │   ├──  pelicanconf.py
 
    │   │   ├──  publishconf.py
 
    │   │   ├──  develop_server.sh
 
    │   │   ├──  fabfile.py
 
    │   │   ├──  Makefile
 
    │   │   ├──  content
 
    │   │   │   ├──  blog
 
    │   │   │   │   └──  cwi.md
0 comments (0 inline, 0 general)