One of the goals while build­ing the new Mag­num web­site was to lower the bar­ri­er for con­trib­ut­ing con­tent. With Git and Git­Hub it’s already very easy to con­trib­ute code to the pro­ject it­self, so why not ex­tend that to the web­site as well?

Guest posts were kicked off with the Area Lights post by Jonath­an Hale last week and there are already more art­icles be­ing pre­pared for the next rounds. Guest posts are about shar­ing suc­cess stor­ies, present­ing re­search, show­ing pro­ductiv­ity tricks or, for ex­ample, show­ing a deep­er in­sight in­to a fea­ture that was just re­cently in­teg­rated in­to Mag­num.

We be­lieve that pub­lish­ing your con­tent here can be be­ne­fi­cial for many sides — for you, as it has the po­ten­tial to reach people out­side of your usu­al circles, for the com­munity, as fresh and ex­traordin­ary things al­ways spark new in­terest, and of course, for Mag­num it­self. Maybe you are work­ing on some­thing cool and don’t have an es­tab­lished place to show it to the world, or maybe you just fin­ished a pa­per about a new ren­der­ing tech­nique and need a place to present a WebGL demo? We’re set up for that.

In­ter­est­ing times ahead.

Be­ing this open to new con­tent would be very hard to achieve with a cent­ral­ized CMS, as po­ten­tial con­trib­ut­ors would either need ac­cess rights or would have to sub­mit a post with no pos­sib­il­ity to check the out­put be­fore it gets pub­lished. Here, how­ever, you can just build a copy of the whole site on your ma­chine and it­er­ate on the con­tent loc­ally.

Writ­ing a guest post

So, how does one write a guest blog post? First of all, please get in touch so we can make a mu­tu­al agree­ment on the top­ic, scope and time­frame for when it gets pub­lished. The top­ic should in­volve Mag­num in some way, ob­vi­ously.

The con­tent is writ­ten in re­Struc­tured­Text and can be sub­mit­ted via a pull-re­quest to the mosra/mag­num-web­site re­pos­it­ory on Git­Hub. If you don’t know reST from Sphinx or oth­er doc­u­ment­a­tion sys­tems, the m.css docs have a ba­sic in­tro­duc­tion to writ­ing reST markup. Or you can have a look at source files in the re­pos­it­ory. For ex­ample, the whole ori­gin­al con­tent of the Area Lights post is con­tained in the fol­low­ing com­mit: mosra/mag­num-web­site@fd3e­f28

The best way for writ­ing a post is set­ting up a loc­al copy of the web­site for im­me­di­ate visu­al feed­back. It’s not strictly re­quired, though — you can also con­trib­ute the blog post copy simply as a plain text, for ex­ample, if that’s a bet­ter al­tern­at­ive for you.

The bor­ing tech­nic­al de­tails

In or­der to set up a loc­al copy of the web­site you need Py­thon 3 with Pel­ic­an, Pyphen and Pil­low pack­ages in­stalled and op­tion­ally some LaTeX dis­tri­bu­tion for math ren­der­ing.

On Arch­Linux it’s the fol­low­ing pack­ages:

sudo pacman -S texlive-most pelican python-pillow
cower -d python-pyphen # Build the python-pyphen package from AUR

On Ubuntu you need these:

sudo apt install texlive-base texlive-latex-extra texlive-fonts-extra python3-matplotlib graphviz
pip3 install pelican Pyphen Pillow

On Win­dows and ma­cOS pick some LaTeX dis­tri­bu­tion and make it avail­able in the PATH. Py­thon pack­ages can be in­stalled via pip3 as well:

pip3 install pelican Pyphen Pillow

Next, make sure to clone the re­pos­it­ory (or your fork of the re­pos­it­ory) in­clud­ing sub­mod­ules so m.css is prop­erly in­cluded (use git clone --recursive, for ex­ample).

That’s it. Now you can build the web­site and start a web­serv­er on http://localhost:8000 with the fol­low­ing com­mand. The web­site is auto­mat­ic­ally re­built on changes in the in­put files.

cd magnum-website
make devserver

By the way…

The last weeks were quite busy with up­dates — in case you didn’t see yet, there is a bunch of new WebGL ex­amples and demos on the Show­case page:

Bullet Physics example screenshot
Bul­let Phys­ics Ex­ample webgl1 phys­ics in­stan­cing
Shows a ro­tat­ing table full of cubes that you can shoot down.
Object picking example screenshot
Ob­ject Pick­ing Ex­ample webgl2
Show­cases us­age of mul­tiple frame­buf­fer at­tach­ments to im­ple­ment ob­ject pick­ing.
WebXR example screenshot
WebXR Ex­ample webgl1 webxr
A ba­sic demon­stra­tion of how to use the Em­scripten WebXR lib­rary with Mag­num.
Magnum::Ui Gallery screenshot
Mag­num::Ui Gal­lery webgl2 ui
A gal­lery of vari­ous wid­gets (but­tons, la­bels, in­puts, mod­als) provided by the Mag­num::Ui lib­rary.