sagemath / documentation

Only hosting https://doc.sagemath.org/ files. Updates to the documentation must be made with PRs to https://github.com/sagemath/sage, not here.
https://doc.sagemath.org
11 stars 9 forks source link

Add prepare.py replacing index.py #27

Closed kwankyu closed 3 months ago

kwankyu commented 1 year ago

Fixes #26

Configure prepare.cfg and then run ./prepare.py. Note that the script copies the html and pdf files from $SAGE_ROOT.

haraldschilly commented 3 months ago

I saw you requested my review. I don't have much time and I don't really know what this even supposed to do. Is there a description somewhere, maybe with a screenshot to compare? How does this differ from the current approach? Just by starting reading the script, it points to a *.cfg file, which defines sage_root: /path/to/sage/root. The initial comment says, it takes $SAGE_ROOT. So, what do I have to do? Merge this, and then modify the cfg file? Do I have to set the $SAGE_ROOT env variable and is this taken into account somehow automatically? (I'm absolutely not familiar with *.cfg files).

kwankyu commented 3 months ago

... So, what do I have to do? Merge this, and then modify the cfg file?

Yes. Replace "/path/to/sage/root" with the absolute path to your sage root directory

Do I have to set the $SAGE_ROOT env variable and is this taken into account somehow automatically?

No.

Replace "index.py" with "prepape.py" in your workflow of deploying the new doc.

haraldschilly commented 3 months ago

Ok, let's see how this plays out. fingers crossed.

The only actual detail I'll change on my end is the copying step. Instead of rsync with a real copy, I do cp -alR $SAGE_ROOT/local/share/doc/sage/pdf . for just a hardlink copy. That saves disk space. Looks like there is no reason why not to do this.

The other difference I noticed is the index page. It only points to the main PDFs in the "reference" section. What's up right now also points to all the smaller chapter-wise PDFs. I guess the real question is if those smaller chapter PDFs should even exist in the first place. A question for another day …

kwankyu commented 3 months ago

Thanks!