Closed crazko closed 5 years ago
Friendly ping @crazko
ah, shame on me, I should have written earlier. I've dived into the layout problem, want it working correctly before the articles migration. I'll have more time for that in upcoming days.
What problem do you mean?
extending layouts
I've answered the solution here: https://github.com/crazko/statie-web/pull/24#discussion_r240052607
Or what do you mean exactly?
I know, but this is not really a solution for me, because it may lead to inconsistencies I've mentioned in https://github.com/crazko/statie-web/pull/24#discussion_r240042590. Will see what can I do..
It may, but it was broken in the past, since extending layout doesn't work outside Nette\Application
. In some situations it left layout name in the body, hard to spot.
I've added this feature without enough experience and inspired by Sculpin's syntax:
{% block content_wrapper %}{% block content '' %}{% endblock content_wrapper %}
Which is really WTF, but it solves layout inheritance in some bad way.
I've spent some 10-15 hours in the same path to explore Nette find this out in the end being very sad. It would be pitty if you'd have to come the same path, that could block this simple PR for months.
Adding content and upgrading code are 2 different problems, like adding a feature and upgrading whole app from PHP 5 to PHP 7 at the same time. Could you separate them so docs is updated and I can redirect blog posts?
@TomasVotruba please, check it out
I've just tried multiple layout inheritance (though I haven't used any parameters) with latte in blank php project and it is working without problem... so does it mean that just Statie does not implement it correctly?
You need to integrate *.md
rendering + latte code blocks as well. If you manage to work in Statie context with all current features, feel free to send PR to Symplify.
@TomasVotruba please, check it out
I missed this comment so I get to it just now.
I checked it rougly and it looks good!
Thank you for separating issues into 2
In the meantime, I wrote about init
command - https://www.tomasvotruba.cz/blog/2019/01/07/how-to-create-your-first-php-twig-static-website-under-2-minutes-with-statie/
At least 3 new commands are comming to the next version.
Can we add them to the documentation in the next PR?
Sure :+1: Step by step
Closes #23