<commit_before># rob.gant.ninja

Personal Website

## Deployment

Install s3cmd on MacOS using Homebrew: `brew install s3cmd`.

Configure s3cmd: `s3cmd --configure`

```bash
s3cmd sync --no-preserve --cf-invalidate --cf-invalidate-default-index --delete-removed --exclude=* --rinclude-from=dist-files ./ s3://rob-gant-ninja/
```

When we build the website we should be able to cachebust the asset/css/img/js file
names using a hash and we won't need `--cf-invalidate`.

Should also setup [Cache-Control Headers](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html)
once we have cachebusting setup.

## Static Site Generator

* [Zodiac](https://github.com/nuex/zodiac)
* [Webpack for Static Sites](https://medium.com/riow/webpack-for-static-sites-9cbfd8363abb)
* [How To Bundle A Simple Static Site Using Webpack](https://www.sitepoint.com/bundle-static-site-webpack/)
* [Spike](https://www.spike.cf/)<commit_msg>Document effect of --no-preserve flag on s3cmd sync<commit_after># rob.gant.ninja

Personal Website

## Deployment

Install s3cmd on MacOS using Homebrew: `brew install s3cmd`.

Configure s3cmd: `s3cmd --configure`

```bash
s3cmd sync --no-preserve --cf-invalidate --cf-invalidate-default-index --delete-removed --exclude=* --rinclude-from=dist-files ./ s3://rob-gant-ninja/
```

When we build the website we should be able to cachebust the asset/css/img/js file
names using a hash and we won't need `--cf-invalidate`.

By default `s3cmd sync` preserves file attributes as metadata on the s3 key and that
data is then converted into an HTTP header in the response. Using `--no-preserve`
won't impact the ability of [sync to check](https://github.com/s3tools/s3cmd/blob/ae6a635312abba7e5353f257e60e845034ad9ecf/S3/Config.py#L163)
for changed files.

Should also setup [Cache-Control Headers](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html)
once we have cachebusting setup.

## Static Site Generator

* [Zodiac](https://github.com/nuex/zodiac)
* [Webpack for Static Sites](https://medium.com/riow/webpack-for-static-sites-9cbfd8363abb)
* [How To Bundle A Simple Static Site Using Webpack](https://www.sitepoint.com/bundle-static-site-webpack/)
* [Spike](https://www.spike.cf/)
{'fraction_non_alphanumeric': 0.13271193963604083, 'fraction_numerical': 0.024411895250776743, 'mean_word_length': 4.444444444444445, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 11, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5226000', 'n_tokens_mistral': 812, 'n_tokens_neox': 753, 'n_words': 203}