On this page:
6.1 Tilde Club members

6 Embedding a blog in an existing site

If you want to embed the entire blog in an existing site, one way is to use a subdomain, e.g. blog.example.com.

Another way is to embed your blog "under" the existing site’s URI path structure, e.g. example.com/blog/. To do so:

  1. In your Post template change URIs from / to /blog/ as appropriate.

  2. In darwin.rkt use (current-uri-prefix "/blog"). This causes URIs generated by Darwin to be prefixed with /blog. (Other URIs — such as current-posts-index-uri and current-permalink will automatically be prefixed with blog/, so don’t change those!)

Using raco darwin -p should open on your blog’s index page at "/blog/index.html", automatically. But you can add a --root flag in case you need to control it more specifically.

6.1 Tilde Club members

Will your blog be hosted at http://example.com/~user?

In your Darwin project directory, create an output directory named "~user":

$ mkdir \~user  #use \~ in shell for literal ~

Then follow the steps above, including (current-output-dir "~user") and (current-uri-prefix "/~user")} in your darwin.rkt, and adjusting your Page template and so on.