[racket] External CSS w/ Templates?
If my link tag is
<link rel="stylesheet" href="index.css" type="text/css">
Then browser does not find index.css , but when my link tag is
If it is :
<link rel="stylesheet" href="/index.css" type="text/css">
Then browser is able to apply the index.css .
I am not too sure why is it so.
Also add current directory to the #:extra-files-paths , assuming this
is where html and css files resides.
(serve/servlet start
#:extra-files-paths (list (current-directory)))
HTH
On Wed, Sep 7, 2011 at 10:20 AM, Jeremy Kun <kun.jeremy at gmail.com> wrote:
> Hi there,
> I went through Templates: Conversion Example, and am doing something similar
> with my page. I have a static template.html file and an external .css which
> I'd rather not include verbatim in the .html template as done in the example
> (my CSS is a hundred lines and will get larger), so it's linked via the
> standard link tag in my template. For some reason I can't get the displayed
> .html file to find its .css.
> I'm running DrRacket from the same directory as my servlet source file, and
> I have the template and css files both in that directory as well. I'm
> running a simple servlet with serve/servlet, but I can't seem to figure out
> what options I need to specify. #:extra-files-paths doesn't seem to work,
> and messing with the various roots seem to get me in trouble. Does DrRacket
> need to know about the CSS file at compile time? Where exactly does Racket
> serve the html from?
> Could someone suggest a good configuration setup for this? Or a better
> alternative?
> Jeremy
>
> _________________________________________________
> For list-related administrative tasks:
> http://lists.racket-lang.org/listinfo/users
>