crazko / statie-web

📖 [deprecated] Documentation site for Statie - PHP Static Site Generator
2 stars 2 forks source link

Articles to docs #24

Closed crazko closed 5 years ago

crazko commented 5 years ago

Closes #23

TomasVotruba commented 5 years ago

Friendly ping @crazko

crazko commented 5 years ago

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.

TomasVotruba commented 5 years ago

What problem do you mean?

crazko commented 5 years ago

extending layouts

TomasVotruba commented 5 years ago

I've answered the solution here: https://github.com/crazko/statie-web/pull/24#discussion_r240052607

Or what do you mean exactly?

crazko commented 5 years ago

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..

TomasVotruba commented 5 years ago

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?

crazko commented 5 years ago

@TomasVotruba please, check it out

crazko commented 5 years ago

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?

TomasVotruba commented 5 years ago

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 commented 5 years ago

@TomasVotruba please, check it out

I missed this comment so I get to it just now.

I checked it rougly and it looks good!

TomasVotruba commented 5 years ago

Thank you for separating issues into 2

TomasVotruba commented 5 years ago

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.

crazko commented 5 years ago

Can we add them to the documentation in the next PR?

TomasVotruba commented 5 years ago

Sure :+1: Step by step