Is it possible to setup configuration values within the config.yml file and have them be printed within the HTML page within Jekyll? I would like to set the default title and description of my website within the config.yml file and have them printed out in the header of all my layouts.
Is it possible to setup configuration values within the config.yml file and have them
Share
Every template has a
sitevariable, which contains the settings from_config.yml. For example, if you have something likemy_setting: "string"in_config.yml, you can access the value in a template using{{ site.my_setting }}.Note: if you are using
jekyll serve, you will need to restart the process for changes to take place. Indeed,_config.ymlis not reloaded with the watch option.