This is source code for the website of MOLGENIS, including docs etc.
- All files that you can edit are inside the 'public' folder
- the main menu structure is defined in public/_data.json
- for the sub-menu's you make a folder; each folder can also have a _data.json
git clone https://github.com/molgenis/molgenis.org.git
cd molgenis.org
harp compile
you will find the generated website in folder www
The site is generated using harp.
install npm and harp (once)
#on mac you can use brew http://brew.sh/
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)
#install node
brew install node
#install harp
sudo npm install -g harp
clone this repo (once)
git clone
during development, run harp server for live rendering
cd molgenis.org
$ harp server
will enable live view on http://localhost:9000
for deploy, compile the website and upload to server
$ harp compile
will generate the static pages in ~/www
#html layout using jade The layout is implemented using .jade templates (http://jade-lang.com/). Below quick commands including access to harp data.
h1 my list
ul
li first
li second
just renders a h1 and a ul with nested li
p: #[b some bold] some normal and #[i some italic] text
allows nested elements to be defined on one line
#{myvalue}
or
p= myvalue
will render the value
for value, key in public._data
li
a(href="#{key}") #{value.title}
will iterate over the hashmap in _data.json (local _data file overrides a global one)
for value, key in public.articles._data
li
a(href="#{key}") #{value.title}
will iterate over the hashmap in folder + file articles/_data.json
a(style={color: 'red', background: 'green'})
will render with style="color:red; background: green"
a.button
will render as a class="button"
a#main
will render as a id="main"
//blaat
will render a html comment
//-blaat
will not render a html comment
#css using less
css stylesheets are implemented in .less files (http://lesscss.org/) See /res/css
Copyright (c) 2002-, Morris Swertz, MOLGENIS Team, Contributors Documentation released under Creative Commons. Documentation source code released under the MIT License.