- Craft 3 Documentation: Craft 3 Docs
- Twig Template Language: Twig Symfony Twig Primer
- All templates are separated according to the Atomic Design Pattern
- All pages with url's are found in
/templates/_pages
from there on all elements are split into includes. Its easiest to look for the include in_pages
for orientation. - All templates inherit
_layout.twig
so if you need global variables, put them there. - There is a file called
_incl/docMacros.twig
which contain a few twig snippets. (eg. every wysiwyg field is sanitised trough a macro). - SEO Code: All twig SEO is written in
_organisms/seoPage
. It grabs all the seo fields of each page and puts it into the head. If there are empty seo fields on a page it will grab the fallback text fromGlobale Inhalte
- Some Craft Entry IDs are hard-wired in the templates:
- Main menu entries: in _layout.twig
- Special direct buttons on Home page: in indexOversight.twig
- Stylesheets are also separated according to the Atomic Design Pattern (Although it doesn't work as nicely as in the twig markup)
- There is no Framework in place. It is all custom CSCC
- The stylesheet
IEhack.scss
is applied on IE 11 and contains all adjustments. Pleas place IE stuf only there. - For npm package specific styling there is a
plugins.scss
for ugly overrides (e.g. Lightbox Plugin).
- All layouts are made with either grid or flexbox
- Each page has it's own grid stylesheet. They are suposed for layout mechanics only!!
- Static translations in Craft are stored in the
translations
and then called in twig with thet
Filter:{{ 'Deine übersetzung' | t }}
Static Translations
- on dev environements run:
npm i
once and then for development:npm run dev
- Craft 3 uses DOTENV principle
- All custom vlaues are stored in a
.env
file which are applied into the files inconfig
. The.env
file mustn't be checked in because the whole idea is to not have any passwords in the repo. Just rename.env-example
and adjust values accordingly
- copy the db from the specific server
- Folders where CMS users can upload files trough the CMS are not in the repo. See
.gitignore
for said folders.
npm run dev cd www php -S localhost:8000