Also, change local mode to use absolute "file://" references across
sites (makes "doc-site.js" plus "doc-site.css" work locally) and
add "index.html" to paths a needed, but add a `-r` relative mode for
the old behavior.
Separate the "generated resources" part of a site from the "rendered
element" part, so that a site that doesn't use full-page formatting
can take share the resources of one that does.
Also, hide the "resources" function in a site to narrow the interface
exported by `plt-web`.
The "plt-new-services" package defines the "meta/new-web"
collection, with the idea that it will be merged into
"plt-services" and later replace "meta/web".
Note that they're all copied "flatly" into the toplevel web directory.
There is no problem with overwriting, since if a resource file is
rendered twice the renderer will throw an error. There shouldn't be too
many chances for such clashes since each kind of resource has a unique
suffix, but if this happens it's easy to change `copydir/flat' to copy
files using their paths, or something similar (like copying "x/y.z" to
"x-y.z"). In that case references to these resources should change too.
Also move the logo and favicon files to that directory instead of
copying them individually.
Only one resource (`make-navbar') returns a function now, the others
return just misc contents. Dump the idea of a `head' resource which
complicated things whenever something new needed to be injected into the
head section -- and instead do the head assembly in the page layout
function.
Turn the preamble and postamble into resources too in preparation for
more contents taht is used in the postamble, mostly dealing with
resource files. (The former doesn't need to be one since it's just
static text, but make it symmetric.)
Finally, the resources (implemented in `make-resources') have some
symbols that return things that are constructed by the code, and the
rest are files that are copied. There are also some symbolic names that
stand for "special" resources -- these should get attention on changes,
since they are mostly there to expose some things for various pages.
For example, if more CSS is added, `style-path' should change to be a
list of CSS files and the code that uses it (in the git content that is
derived by gitweb) should also be adjusted to deal with more than one
file.
Note the `case-lambda' hack to avoid repeating the default file resource
target. (Do this since it might actually change in the future to not be
the "basefile" of the source file.)
Using some silly innerHTML hack for the prev/next things and quick text
to show how to add the book images too. Note that the book URLs are
better than the ones you used: drop www where applicable, use the PLAI
proper site. Also, I took the ROR cover from the PDF, so it's has a
much better resolution.
Note that I used "image/x-icon" for the "shortcut icon" type, even
though it's different from the one used on the "icon" type right above
it.
Need to sort the CSS mess: I think that "css/style.css" is meant to be
out global CSS (so it needs to change), and "css/scribble.css" is
probably what "more.css" is doing and it's being used only on the front
page since that has the scribble-rendered examples.
Also, need to scan all the "@;" comments here: some might need to be in
the actual HTML output, and some look like leftovers from wherever this
HTML was ripped from that are not applicable.