Many thanks for all your help and for looking at the files for me and fixing those issues.
In regard to the assets folder, is that a security reason to place it on the same level as the content folder I have it in the same position on a few other sites.
David
Your head content is built very static. Is there a reason for this?
If on all pages the identical canonical link appears…
<link rel="canonical" href="https://mindfulsensoryot.co.uk/about">
…this will cause problems with Google, because the correct assignment of the pages will be lost. Therefore it is important to build up some areas in the head dynamically. The starterkit shows a clear example of a dynamic setup.
What are the security reasons for the assets folder? This is just as easily accessible in the content folder, since the path is evident in the source code. The recommended content structure helps minimize errors. Of course, everyone is free to deviate from it.
On the back of what @GB_DESIGN was saying, you do have a lot of static hardcoded stuff in there. For example, i noticed you have a meta tag snippet for each template. You dont need to do that. you can drive that from the content and have just one dynamic snippet for all templates.
There are a number of seo plugins that can help you with that, incuding my own, that can help you with that without hardcoding stuff.
Thanks for the info.
As I have a hard enough time getting anything to work in Kirby, even following the cookbook, it usually does not work and I just end up with PHP errors. Using plugins which I have tried using in the past usually don’t seem to work for me. Yes, I have hardcoded code because I can see that it is there and it works.
I removed the ‘listed’ in the code below but it still shows the list of articles in the navigation which I don’t want to show.
They are probably showing in the navigation because of the use of listed()
in the for each loop. If you take that out or change it to unlisted()
you’ll get everything or the ones without numbers.
<?php foreach($page->children()->listed()->flip() as $article): ?>`
<?= $page->text()->kirbytext() ?>
<?php foreach($page->children()->flip() as $article): ?>
<article class="flow">
<h1 class="article-head">
<?= $article->title()->link() ?></h1>
<span class="date">
<p> <time class="blog-date"><?= $article->date()->toDate("d F Y") ?></time></p>
</span>
<p><?= $article->text()->excerpt(250, false) ?>
<a href="<?= $article->url() ?>"><span class="article-more">Continue</span></a></p>
</article>
<?php endforeach ?>