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.yml
file namedreptar.config.js
. -
Copy the contents of your
_config.yml
to JavaScript. Use this online JS-YAML converter. -
Copy the converted contents into the
reptar.config.js
file. 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_case
to 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.js
file:
path.plugins
path.themes
themes
plugins
-
Move your asset files,
js
,css
,images
to 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
_themes
folder as it's no longer used. -
Add
path.templates
to yourreptar.config.js
file pointing to the location of your templates folder. -
The template variable
theme
has 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.