Welcome, fellow developers, to DNArtworks' CodeIgniter
4.7.4 template. You may have read
the instructions in README.md and I'm sure you want to
start as fast as possible. Unfortunately, client requirements are
growing overtime, and you may want to take care or at least take note
of the following.
When you use basic CodeIgniter4 template, it will show the default
"fire" favicon in .ico. The <head>
section of this page contains example of using a proper favicon in PNG
format that is also preferred by Google. Easily replace the plain grey
favicon.png.
Most websites should have sitemap.xml for search engine to
understand the structure. Also, meta tags like og and twitter are useful
for sharing the webpage in social media.
Therefore, there are implementations that you need to be aware of, and adjust to your website:
meta_header.php and MetaHeaderCell.php
under app/Cells: this is the View Cell
for automatically attaching the proper meta tags in each page.
To use it, code <?= view_cell('MetaHeaderCell') ?>
within your <head> tag. Note that for each
page that implements this, it has to be configured for that
page. Otherwise, an exception will occur to warn you.
app/Config/Sitemap.php is the code where you
configure the sitemap data. It is a associative array of:
'*' if you want to have default values
for all pages
uri_string().
meta_title (for social media)meta_description (for social media)meta_image (for social media)priority (for sitemap)lastmod (for sitemap)weekly (for sitemap)app/Controllers/Sitemap.php is the controller to
show sitemap.xml. You can customize this code to
add more mappings.
That's it for now.