New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make Nixpkgs docs less frustrating to hack on #37749
Conversation
Looks good to me. Only running $ make
make
make: Circular manual-full.xml <- manual-full.xml dependency dropped.
jing "$RNG" manual-full.xml
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=lcd -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel
mkdir -p out/html
xsltproc $xsltFlags \
--nonet --xinclude \
--output out/html/index.html \
"$XSL/docbook/xhtml/docbook.xsl" \
./manual-full.xml
cp ./style.css out/html/style.css
mkdir -p out/html/images/callouts
cp "$XSL/docbook/images/callouts/"*.gif out/html/images/callouts/
cp: cannot create regular file 'out/html/images/callouts/10.gif': Permission denied
cp: cannot create regular file 'out/html/images/callouts/11.gif': Permission denied
cp: cannot create regular file 'out/html/images/callouts/12.gif': Permission denied
cp: cannot create regular file 'out/html/images/callouts/13.gif': Permission denied
cp: cannot create regular file 'out/html/images/callouts/14.gif': Permission denied
cp: cannot create regular file 'out/html/images/callouts/15.gif': Permission denied
cp: cannot create regular file 'out/html/images/callouts/1.gif': Permission denied
cp: cannot create regular file 'out/html/images/callouts/2.gif': Permission denied
cp: cannot create regular file 'out/html/images/callouts/3.gif': Permission denied
cp: cannot create regular file 'out/html/images/callouts/4.gif': Permission denied
cp: cannot create regular file 'out/html/images/callouts/5.gif': Permission denied
cp: cannot create regular file 'out/html/images/callouts/6.gif': Permission denied
cp: cannot create regular file 'out/html/images/callouts/7.gif': Permission denied
cp: cannot create regular file 'out/html/images/callouts/8.gif': Permission denied
cp: cannot create regular file 'out/html/images/callouts/9.gif': Permission denied
make: *** [Makefile:19: out/html/index.html] Error 1 |
Also generated files/directories should be added to |
Oops, I forgot to verify that flow and the .gitignore after I ported over the image copying. Fixed! The generated files should already be ignored? |
Note after this I want to do it to NixOS docs, too, which desperately need a better debug flow. |
I'm going to mere this in about 24 hours unless there are outstanding problems. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great improvement, thanks!
doc/contributing.xml
Outdated
</screen> | ||
|
||
<para>If you experience problems, run <command>xmloscopy --docbook5 | ||
./manual.xml ./manual-full.xml</command> inside the nix-shell to help |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small improvement idea: add a make debug
shortcut command for that scenario
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would run like nix-shell --run 'xmloscopy ...'
. Does that sound right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do the other make targets assume a nix-shell environment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its complicated because this is the only one that won't work with the default.nix, where the makefile will be called automatically.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to merge, we can improve this in a separate commit :)
This makes a makefile-driven developer workflow nicer.
Motivation for this change
Editing the docs is frustrating!
try it: nix-shell in the doc dir, break the XML, and run
xmloscopy --docbook5 manual.xml manual-full.xml
.cc @zimbatm @domenkozar @garbas @Mic92 @makefu