libigl / libigl.github.io

Repository for the libigl website, online tutorial and documentation
http://libigl.github.io
4 stars 29 forks source link

Troubles with figureAltCaption when building the website. #8

Closed jdumas closed 4 years ago

jdumas commented 5 years ago

During the hackaton @alecjacobson had some trouble on macOS building the website with mkdocs. the problem mostly comes from the figureAltCaption plugin that I'm using to transform the markdown code for the figures in the tutorial into the html with caption text. There are two related problems here:

  1. Recent versions of Python-Markdown used by mkdocs break figureAltCaption. See tracked issue here.
  2. Even with older versions of the packages it seems that urls in the legends still do not appear correctly. I tried to create a conda environment for the versions of the packages I have on my machine (and that work), but I didn't manage to run it on my Windows machine, so I'll have to see if I an create the conda environment directly from a Windows machine see if it helps.

Anyway, if other mac users can pitch in an tell me if either the virtualenv/Pipenv/conda files that I've put on the root allow them to build the website correctly, or if you have the same issue with url in captions not showing properly, that'd be great. Alternatively, if any of our python power-user like @fwilliams or @jiangzhongshi can pitch in and try to help setting up a proper python environment for building the website, that'd be great.

BruegelN commented 5 years ago

Just wanted to let you know that with the current libigl-website.yml and anaconda 4.6.11 and 4.6.14 one can build the website on macOS following the steps from https://github.com/libigl/libigl.github.io#building-the-website.

Bildschirmfoto 2019-05-23 um 16 40 10

mkdocs gh-deploy works aswell!

jdumas commented 5 years ago

Awesome! Yes I spent some time fixing this yesterday. I've tested it on Linux and Windows. Glad to know it works on macOS as well. I'll close this issue then.

jdumas commented 5 years ago

@alecjacobson are you having trouble with the new conda environment?

alecjacobson commented 5 years ago

A little bit. I think I figured out now.

The sym link on README.md threw off my local instructions, so I didn't see the conda instructions right away. Now I have it working. Quite a process just to convert markdown to html, but I guess most of it just needs to be set up once.

side issue: Is there a way to install conda without it taking over my whole shell? I don't like that it's monkeying with my bash_profile

jdumas commented 5 years ago

Well, miniconda by itself will not add anything to your bashrc or bash_profile (I think it will ask you if you want to add anything to your bashrc during the installation process). If you don't put anything in your bashrc, you can simply enable conda when you need it by sourcing it:

source /opt/miniconda3/etc/profile.d/conda.sh

And then proceed to enable the environment for the website:

conda activate libigl-website

I agree it's a bit involved, but that' about the only way to ensure we have a reproducible working environment (after all, the plugin for the figure caption already broke with the latest update of the PythonMarkdown plugin...). Now that the environment is here, it guaranteed to not break in the future, which is a big plus :D

BruegelN commented 5 years ago

Overwriting systems' python with anaconda is indeed not optimal. I've baned all conda related stuff from my ~/.bash_profile (respectivly ~/.bashrc on my ubuntu workstation).

If you used homebrew cask to install anaconda it is located under /usr/local/anaconda3/. So you could run source /usr/local/anaconda3/bin/activate libigl-website to just activate the env for this repo.