Upgrade from 2.x to 3.x
The upgrade path from 2.x to 3.x of Reptar requires a few steps.
-
Create a new file in the same directory as your
_config.ymlfile namedreptar.config.js. -
Copy the contents of your
_config.ymlto JavaScript. Use this online JS-YAML converter. -
Copy the converted contents into the
reptar.config.jsfile. Prefix the content withmodule.exports =. This exports the config object and makes it accessible to Reptar. -
Update your config file's keys to adhere to the new required schema. Largely this means replacing any key that is in
snake_caseto usecamelCase. The updates needed are:
url_key -> urlKey
date_format -> dateFormat
future_date -> futureDate
page_size -> pageSize
clean_destination -> cleanDestination
new_file_permalink -> newFilePermalink
- Remove the following keys from your
reptar.config.jsfile:
path.pluginspath.themesthemesplugins
-
Move your asset files,
js,css,imagesto the top level of your site. -
Move your templates folder to the top level of your site. (Optionally) Rename the folder to
_templates. -
(Optionally) Delete the
_themesfolder as it's no longer used. -
Add
path.templatesto yourreptar.config.jsfile pointing to the location of your templates folder. -
The template variable
themehas been removed. You need to update your templates if you make any references to{{theme.<whatever>}}to point to the expected render location of the asset. Doing a global find and replace should be sufficient.