Skip to content
This repository has been archived by the owner on Aug 12, 2020. It is now read-only.

notes on kirby api #2

Open
swyxio opened this issue Sep 13, 2019 · 0 comments
Open

notes on kirby api #2

swyxio opened this issue Sep 13, 2019 · 0 comments

Comments

@swyxio
Copy link
Owner

swyxio commented Sep 13, 2019

from conversaiton with limitlessloop today

swyx
#2697

swyxToday at 4:45 PM
have you looked at react-static?

limitlessloopToday at 4:47 PM
No, I was originally put off when I tried React so I haven't really gone back to it. I found Svelte and Vue much easier to get to grips with. But maybe I should take another look at it.

swyxToday at 4:47 PM
well, its a valid feeling. just trying to help you find the right tech, as someone who spends every day in this space
i agree graphql is annoying overkill much of the time

limitlessloopToday at 4:49 PM
Thanks. I really appreciate it. I've been back and fourth looking for the right tool for building static sites. Hard to find the right balance of things.
I'll check out react-static. So far VuePress has been my favourite. Components are automatically registered, lots of support for markdown, not much to configure, support for PostCSS, Less, Sass etc.
Just lacks and easy way to get at content.

swyxToday at 4:52 PM
i'm surprised to hear that
you should give this feedback to the vuepress team
(i dont personally use it so i dont know.. but still)

limitlessloopToday at 4:53 PM
Yeah I've reached out to the creator to see if I can get their thoughts on it.

swyxToday at 4:54 PM
meanwhile i am working on my own version
https://npm.im/ssg
but nowhere near ready for you to try it lol

limitlessloopToday at 4:55 PM
Well if I can be of any help let me know. I'll certainly take a look at it regardless.

swyxToday at 4:56 PM
well i think the better i understand usecases the better i can make this thing
i want to make it really fast, taking the best lessons ive had from every SSG i've used

limitlessloopToday at 4:57 PM
Sounds really interesting and promising. Svelte/Sapper is a great thing to build it from.
Have you ever used Kirby? Although it's not a ssg, it's by far the best flat file CMS I've ever seen/used. And I'm not even talking about the admin panel, just the way it allows you to create views and reference content from files.

swyxToday at 4:59 PM
nope
tell me more about how it allows you to create views and reference content from files?
this $pages thing you linked doesnt really help

limitlessloopToday at 5:01 PM
For example by default templates look to content files with the same name for their content.

swyxToday at 5:01 PM
example?

limitlessloopToday at 5:01 PM
That means creating a page is as simple as creating a template with the same name as its content counter part.

swyxToday at 5:01 PM
foo.template.js -> foo.md?

limitlessloopToday at 5:01 PM
Yes

swyxToday at 5:01 PM
if its a 1:1 relationship why do you even need a template
templates are for many:1

limitlessloopToday at 5:03 PM
So you can keep template markup separate from content I guess. And also I'd argue that idea that templates are for the many. In a lot of my projects which are simpler static sites as apposed to apps and a lot of the pages are fairly unique in their layout, so a one to one relationship is simpler and easier to manage. It's "flatter" by nature.

swyxToday at 5:04 PM
ok. any other features that you feel strongly about?
also can you link to an example repo with this filestructure
so i can see this in action

limitlessloopToday at 5:06 PM
The other features I really enjoy are 1) ability to reference data from text files using their API and filter it, manipulate it, traverse it. 2) Kirby has a really nice system for building the backend CMS UI using what they call blueprints. I'll send some repos over.
https://github.com/getkirby/starterkit
GitHub
getkirby/starterkit
Kirby's demo site is the easiest way to get started with Kirby. - getkirby/starterkit

In particular these folders
https://github.com/getkirby/starterkit/tree/master/content
GitHub
getkirby/starterkit
Kirby's demo site is the easiest way to get started with Kirby. - getkirby/starterkit

https://github.com/getkirby/starterkit/tree/master/site/templates
GitHub
getkirby/starterkit
Kirby's demo site is the easiest way to get started with Kirby. - getkirby/starterkit

https://github.com/getkirby/starterkit/tree/master/site/blueprints
GitHub
getkirby/starterkit
Kirby's demo site is the easiest way to get started with Kirby. - getkirby/starterkit

swyxToday at 5:09 PM
for 1), that feels like just "lodash-like utilties". for 2) taking a look
blueprints are indeed very nice. i will try to steal this
sorry, i mean the templates
blueprints arent my concern right now but i do think netlifycms kinda works like that
ok, here it is
https://github.com/getkirby/starterkit/blob/master/site/templates/home.php
GitHub
getkirby/starterkit
Kirby's demo site is the easiest way to get started with Kirby. - getkirby/starterkit

limitlessloopToday at 5:13 PM
Yeah blueprints would be least of my concerns too.
Its worth trying Kirby if you can. You only need to install MAMP and download the starter kit, it's pretty easy to get setup.

swyxToday at 5:14 PM
nahh its ok you've given me a good enough idea
my MAMP days are years ago

limitlessloopToday at 5:15 PM
I like how you can put numbers before folders and files to give them an order but the number is removed.
So posts are automatically order by date in the file name but the date is removed for the url

swyxToday at 5:16 PM
what if you really wanted it there

limitlessloopToday at 5:17 PM
I think there is a way to keept it there by adding another prefix but I've never had a need to.
Yeah my MAMP days are over too, but I wonted to refresh my memory about Kirby so I installed it just to try it again.
Im tired of configing my machine for PHP when I never use it anymore

swyxToday at 5:21 PM
oh well. this is helpful. but for my thing im not even there yet.. i'm still at the "should i use sapper or fork it" stage

limitlessloopToday at 5:22 PM
Yup I understand.
I wish you all the best.

swyxToday at 5:24 PM
thanks!

limitlessloopToday at 5:24 PM
Let me know how you get / what you decide

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant