How can I create Dynamic YAML files

Please help

I am creating a simple website where I need to Display Profile Pictures and name of People

which I have Done like this

Created a members.yml file
  • name: Spruce

  • phone: +234…

  • Avatar: some image url

  • name: Blah

  • phone: 3445

  • Avatar

And so on…
Then I used them accordingly

where the problem is

The above should be fine if I only had two members…
Now am not sure how many members I will have
And I don’t want to be adding new members manually

is there a way I could

Create a form where each user can fill in details upload a picture And when they click on submit My members.yml file gets updated??? Pls Or any other way you could recommend for this problem

What you are asking for is a CMS for managing data on a static site.

Tools exist for this like Forestry
I wrote about it here

It’s a free solution which is great for non coders to use

You can invite 3 admin users and they can upload images and add data to your data file in a format you setup.

Netlify CMS is a good alternative but requires more coding to setup.

In both cases you allow users to use a form to edit and save content which causes a commit on Github and therefore a rebuild of the site.

That would be relatively easy as in an hour. The solutions below would take days or weeks and so may be impractical for your needs but would serve a large public userbase better. You didn’t specify if your editors are admin users or general public.

Alternatively you can design your site to have a database like MySQL and a server in Python or NodeJS or PHP and then users can sign in and upload images, like on instagram.

Or keeping more with the Jekyll setup you can use React or similar to make a form that stores data in a firebase database without an API needed.

Having said that, Netlify allows up to 100 users to register themselves and add content which might be useful