You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Statik uses SQLAlchemy under the hood to build up an in-memory SQLite database from which your views and templates can execute queries. You define your models in YAML format.
Throw some YAML/Markdown in data/<ModelName> - one file per instance
Write some views with YAML
path: /template: home # The .html is automatically added by Statikcontext:
static:
page-title: Welcome to my blogdynamic:
posts: session.query(Post).all()
Make some Jinja templates - they can reference info they get from the views
{%extends"base.html"%}{%blockbody%}
<h1>Welcome to My Blog!</h1>
<p>These are my latest posts</p>
<ul>
{%forpostinposts%}
<li><ahref="{% url "post", post %}">{{ post.title }}</a></li>
{%endfor%}
</ul>
{%endblock%}
https://getstatik.com
Good thing initially - the models are not static. You can build whatever (as opposed to typical blog models in these things).
Quickstart: https://github.com/thanethomson/statik/wiki/Walkthrough
The text was updated successfully, but these errors were encountered: