To check if any such duplicate exists, run hugo with the -v flag. For theme-specific data items that shouldn’t be overridden, it can be wise to prefix the folder structure with a namespace e.g. Therefore, theme authors should be careful not to include data files that could be easily overwritten by a user who decides to customize a theme. That is, Given two files with the same name and relative path, the data in the file in the root project data directory will override the data from the file in the themes//data directory for keys that are duplicated). However, note that the theme data files are merged with the project directory taking precedence. To access the data using the index function, the file name is irrelevant. To access the data using the notation, the file name must begin with an underscore or a Unicode letter, followed by zero or more underscores, Unicode letters, or Unicode digits. The data will be accessible as a map in the. These files must be YAML, JSON, XML, or TOML files (using the. In both cases, it’s a good idea to outsource the data in their (own) files. showing a larger dataset in a template (see the example below). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |