jluszcz / ListOfLists-rs

MIT License
2 stars 0 forks source link

ListOfLists

ListOfLists can generate a static website, hosted on AWS in an S3 bucket, from a json file stored in S3.

Status

Status Badge

List JSON

{
    "title": "The List",
    "lists": [
        {
            "title": "Letters",
            "hidden": true,
            "list": [
                "A",
                "B",
                "C"
            ]
        },
        {
            "title": "Numbers",
            "list": [
                "1",
                "2",
                "3"
            ]
        },
        {
            "title": "With Tooltips",
            "list": [
                "Foo",
                "Bar",
                "Baz",
                {
                    "item": "Quux",
                    "tooltip": "Not many people know this one"
                }
            ]
        }
    ],
    "footerLinks": [
        {
            "url": "https://github.com/jluszcz/ListOfLists-rs",
            "icon": "github"
        }
    ]
}

Update Site

Helper Script

#!/usr/bin/env sh

export LOL_SITE_URL="list-of-l.ist"
export LOL_SITE=$(echo ${LOL_SITE_URL} | sed 's/\.//')

export TF_VAR_aws_acct_id="123412341234"
export TF_VAR_site_name=${LOL_SITE}
export TF_VAR_site_url=${LOL_SITE_URL}

Update AWS Configuration

  1. source env-helper
  2. Build
  3. terraform apply

Update List

  1. Upload a ${LOL_SITE}.json to s3://${LOL_SITE_URL}-generator/${LOL_SITE}.json