regebro / hovercraft

Make dynamic impressive presentations from text files!
https://hovercraft.readthedocs.org
MIT License
1.48k stars 209 forks source link

Background image isn't loading #197

Closed b-jazz closed 4 years ago

b-jazz commented 4 years ago

My understanding of the tutorial.rst example is that the LEGO hovercraft image should be the background image on all pages due to the ..header and ..image directives. I can see that the image is being accessed by looking at the server log output, but upon investigation, it looks like the image is used in several places through the presentation. I changed the header/import line to reference a different png file in the same location and I don't see that new filename being accessed when doing a full reload of the presentation.

% hovercraft -p 8001 tutorial.rst 
Serving HTTP on 0.0.0.0 port 8001 ...
Presentation generated.

10.0.0.142 - - [28/Aug/2019 22:27:39] "GET / HTTP/1.1" 200 -
10.0.0.142 - - [28/Aug/2019 22:27:52] "GET / HTTP/1.1" 200 -
10.0.0.142 - - [28/Aug/2019 22:27:52] "GET /css/hovercraft.css HTTP/1.1" 200 -
10.0.0.142 - - [28/Aug/2019 22:27:52] "GET /css/impressConsole.css HTTP/1.1" 200 -
10.0.0.142 - - [28/Aug/2019 22:27:52] "GET /css/highlight.css HTTP/1.1" 200 -
10.0.0.142 - - [28/Aug/2019 22:27:52] "GET /tutorial.css HTTP/1.1" 200 -
10.0.0.142 - - [28/Aug/2019 22:27:52] "GET /js/impress.js HTTP/1.1" 200 -
10.0.0.142 - - [28/Aug/2019 22:27:52] "GET /images/hovercraft_logo.png HTTP/1.1" 200 -
10.0.0.142 - - [28/Aug/2019 22:27:52] "GET /js/impressConsole.js HTTP/1.1" 200 -
10.0.0.142 - - [28/Aug/2019 22:27:52] "GET /js/hovercraft.js HTTP/1.1" 200 -
10.0.0.142 - - [28/Aug/2019 22:27:53] code 404, message File not found
10.0.0.142 - - [28/Aug/2019 22:27:53] "GET /favicon.ico HTTP/1.1" 404 -
^C
Keyboard interrupt received, exiting.
% head tutorial.rst 
:title: Slideshow Tutorial
:author: Lennart Regebro
:description: The Hovercraft! tutorial.
:keywords: presentation, restructuredtext, impress.js, tutorial
:css: tutorial.css

.. header::

    .. image:: images/wallpaper.png

% ls -1 images/
hovercraft_logo.png
wallpaper.png
%
b-jazz commented 4 years ago

Sorry. My bad. Turns out the version of hovercraft! installed from the apt repo on ubuntu is 2.1. Installing a more modern version from git did the right thing.