TWMC / Website

Website Development, Issues & Bugs
2 stars 0 forks source link

website API #1

Closed lfoppiano closed 5 years ago

lfoppiano commented 5 years ago

Hey guys, I was wondering if for the migration of the content from the old website we could use an API to create new pages. If that is possible we could automate the first import of the pages and then review them manually.

What do you think?

nishad commented 5 years ago

@lfoppiano could you elaborate on the API concept?

Sent with GitHawk

lfoppiano commented 5 years ago

Basically I'm looking for ways to avoid manually copy-paste the club activities information manually.. Eventually they might need to be manually reviewed but that's less work.

Rouhgly... I have in mind something like

POST /activities/2001

and I pass a JSON containing some of the field of the page

{
 "name": 
 "location":
 "report":
 "description": 
}

and that will create a new page under /activities/2001

If needs to be implemented then let's forget about it, cause it's just for migrating the old content to the new website.

Thanks

nishad commented 5 years ago

Super,

I will look into it.

However, the site uses static files as sources[1]. I assume it is much easier to generate the static files programmatically than going through an API.

[1] https://github.com/TWMC/content/tree/master/2-activities/2015/otama-trail

Sent with GitHawk

lfoppiano commented 5 years ago

I see. Let's forget about the API. I'll look into how to convert the static pages (or some cut and paste of them) into the static file... đź‘Ť

lfoppiano commented 5 years ago

@nishad one more thing, would be possible to update the github code with the latest version of the website?

nishad commented 5 years ago

@lfoppiano creating static files for Kirby is simple than automating a restful API. If you are interested, see this [1], you can find some gold in there.

TWMC website’s git based workflow is obsolete; let me see if I can bring it back.

[1] https://github.com/bcorporaal/kirby-python-scripts

Sent with GitHawk