‹ Back to README
Settings & customization
All files you could create or edit have to be put in
custom/ directory at the main root of the project. Any other location will be deleted or override by the build or upgrade processes.
The build process will also create empty files if they don't already exists.
There are two files in Geotrek-rando managing client side settings:
This file should remain a valid JSON file. Remember to check its validity each time you alter it.
src/app/config/ there is a file named
settings.default.json that contains the default setup. Each option of it can be copied to another one:
settings.custom.json located in
Both files are always loaded by the app, but every rules from the second one will override those from first one.
See JSON settings for more details about each available options.
This file should remain a valid SCSS file. Remember to check its validity each time you alter it.
should never be modify. But any setting you want to change should be added
_configuration.scss located in
Caution: Default options use a
!default switch for each parameter.
You should not copy this switch when adding your own options to
See SCSS settings for more details about each available options.
Beyond settings, you also have ways to customize look & feel but also create new behaviors.
By creating HTML files in
custom/public and enabling there use in settings, you have the possibility
to use your own markup for some elements of the interface. For example :
The filename does not really matter as far as
custom/templates will be used as root directory.
See templates settings for a complete list of templates you can configure.
See templates widgets for a partial list of widgets you can use in your templates.
The file named
custom/_customisation.scss allows you to write as many SCSS as you need.
If you want to split your styles in multiple files, you have to use the
@import 'filename' rule to include other
customisation.scss must remain directly in
custom/ directory but the files you
@import in it may be wherever you want.
Having your own behavior available for your templates is possible through three files:
Those files have also to be in
You may follow the
src/app/custom/*.example to use the right structure.
Images, fonts and others things
Everything from the
public/ directory is directy served by the web server.
But you sould not put anything directly there.
public/custom is a symbolic link pointing directy to
So all elements that you want to be accessible through
http should be placed in the
custom/public/ directory and would be accessed with the path:
/custom/. For example:
custom/public/my_picture.png would be accessed by the link
You should use absolute links for these files rather than relative ones (particulary if you activate HTML5 mode). Example:
You can override default translation files available in
src/app/translation/po. Don't edit these default files, use them to find which messages you want to override.
custom/po/ folder. Then create the files for each language you are using (
fr.po as an example).
Override the translations that you want in these files.
Example of content for
msgid "" msgstr "" "Project: Geotrek-rando\n" "Project-Id-Version: \n" "POT-Creation-Date: \n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: en\n" "X-Generator: Poedit 1.7.4\n" msgid "BANNER_TEXT" msgstr "Rando in my park" msgid "DEFAULT_META_TITLE" msgstr "Rando my park" msgid "DEFAULT_META_DESCRIPTION" msgstr "Discover the treks in the national park!"