~adnano/kiln-discuss

3 2

Change site root

Caleb Herbert <csh@bluehome.net>
Details
Message ID
<78f7ed43-7830-4299-9fba-c91ac29993f1@bluehome.net>
DKIM signature
missing
Download raw message
Greetings!

How do I change the site root to a subdirectory? I'm trying to migrate 
my site from Haunt (Guile Scheme) to kiln, for the Gemini support.

/ -> /csh/

I've already tried to do it several times in my repo.

https://codeberg.org/csh/gemini-capsule

Sorry if this question has been already asked. I tried searching for it 
in the mailing list archives.

Thanks,

-- 
Caleb S. Herbert
https://bluehome.net/csh/
Details
Message ID
<D0K5KK2IB5FO.3MK1C2FVRMK89@maolood.com>
In-Reply-To
<78f7ed43-7830-4299-9fba-c91ac29993f1@bluehome.net> (view parent)
DKIM signature
pass
Download raw message
On Sun Apr 14, 2024 at 12:32 PM EDT, Caleb Herbert wrote:
> Greetings!
>
> How do I change the site root to a subdirectory? I'm trying to migrate 
> my site from Haunt (Guile Scheme) to kiln, for the Gemini support.

You should set include the subdirectory in the url option in config.toml. If
you want kiln to create that folder as well, you can include it in the output
directory. Also, you should change all your templates to use .URL instead
of .Path to ensure the subdirectory is included in links. Path only includes the
path relative to the content directory, while URL includes the url configured
in config.toml.

Let me know if that works for you.
Caleb Herbert <csh@bluehome.net>
Details
Message ID
<e48377f2-2927-4642-8539-ff507742742a@bluehome.net>
In-Reply-To
<D0K5KK2IB5FO.3MK1C2FVRMK89@maolood.com> (view parent)
DKIM signature
missing
Download raw message
On 4/14/24 16:11, Adnan Maolood wrote:
> You should set include the subdirectory in the url option in config.toml. If
> you want kiln to create that folder as well, you can include it in the output
> directory. 

output_dir = "public_html/csh"

> Also, you should change all your templates to use .URL instead
> of .Path to ensure the subdirectory is included in links. 

.Path -> .URL

https://codeberg.org/csh/gemini-capsule/commit/c788aff66d3fff8b603628d6fafbb84c44abdd41

Problem: Home page is now at /csh/csh/.

https://bluehome.net/csh/csh/

-- 
Caleb S. Herbert
https://bluehome.net/csh/
Details
Message ID
<D0K658GD9TW7.QKTWN0SP0KBG@maolood.com>
In-Reply-To
<e48377f2-2927-4642-8539-ff507742742a@bluehome.net> (view parent)
DKIM signature
pass
Download raw message
On Sun Apr 14, 2024 at 5:35 PM EDT, Caleb Herbert wrote:
> Problem: Home page is now at /csh/csh/.
>
> https://bluehome.net/csh/csh/

Sounds like you don't want to include the subdirectory in output_dir, then. Can
you try that and see if it works?
Reply to thread Export thread (mbox)