Download
We're evolving to serve you better! This current forum has transitioned to read-only mode. For new discussions, support, and engagement, we've moved to GitHub Discussions.

what is the variable for the domain.tld of my site

  • #3127
    Avatar photo[anonymous]

    Hi;

    In my override theme I want to insert via variable a media

    • @website.url – site URL (it can contain index.html at the end in some cases – such as during website settings or in preview mode),

    this variable will work if it was returning only the domain.tld without the index.html

    I didn’t found in the doc and also by trying different variation.

    from my understanding it would be something like @config.domain but when I preview it don’t work.

    so what is the answer doc ?

    #3135
    Avatar photo[anonymous]

    it is not @config.sitedomain neither

    #3136
    Avatar photoBob

    All global variables are listed on this page https://getpublii.com/dev/website-global-variable/

    What exactly do you want to achieve?

    #3137
    Avatar photo[anonymous]

    I want

    • @website.url – site URL (it can contain index.html at the end in some cases – such as during website settings or in preview mode),

    without index.html

    such as I’ll be able to reach my image located in Documents/Publii/sites/website/input/media/website/myimage.png

    #3147
    Avatar photoBob

    If I may suggest, upload all the images you want to use in the theme to the assets folder  (Documents ▸ ⁨Publii⁩ ▸ ⁨sites⁩ ▸ ⁨YOUR_SITE ▸ ⁨input⁩ ▸ ⁨themes⁩ ▸ ⁨YOUR_THEME ▸ assets ▸ images)
    Then you can grab the files via {{@website.assetsUrl}}/images/your_image.png