<commit_before>page '/*.xml', layout: false
page '/*.json', layout: false
page '/*.txt', layout: false
page '/*.ico', layout: false
page '/', layout: :home
page '/404.html', layout: :'404', directory_index: false

Time.zone = 'Europe/Amsterdam'

set :website_title, 'Yorick Peterse'
set :blog_author, '<NAME>'
set :website_url, 'http://yorickpeterse.com'
set :feed_url, "#{config[:website_url]}/feed.xml"

set :markdown_engine, :kramdown

set :markdown,
    fenced_code_blocks: true,
    parse_block_html: true,
    auto_ids: true,
    auto_id_prefix: 'header-',
    tables: true,
    input: 'GFM',
    hard_wrap: false

set :haml, ugly: true, format: :html5

activate :syntax, line_numbers: false

activate :blog do |blog|
  blog.prefix = 'articles'
  blog.sources = '{title}.html'
  blog.permalink = '{title}/index.html'
end

activate :directory_indexes

activate :s3_sync do |s3|
  s3.bucket = 'yorickpeterse.com'
  s3.region = 'eu-west-1'
  s3.acl = 'public-read'
  s3.index_document = 'index.html'
  s3.error_document = '404.html'
end

default_caching_policy max_age: 24 * 60 * 60

activate :cloudfront do |cf|
  cf.distribution_id = 'E38R9TE90MPQA7'
end

configure :development do
  activate :livereload
end

configure :build do
  activate :minify_css
  activate :asset_hash
end
<commit_msg>Set AWS credentials via env variables<commit_after>page '/*.xml', layout: false
page '/*.json', layout: false
page '/*.txt', layout: false
page '/*.ico', layout: false
page '/', layout: :home
page '/404.html', layout: :'404', directory_index: false

Time.zone = 'Europe/Amsterdam'

set :website_title, 'Yorick Peterse'
set :blog_author, '<NAME>'
set :website_url, 'http://yorickpeterse.com'
set :feed_url, "#{config[:website_url]}/feed.xml"

set :markdown_engine, :kramdown

set :markdown,
    fenced_code_blocks: true,
    parse_block_html: true,
    auto_ids: true,
    auto_id_prefix: 'header-',
    tables: true,
    input: 'GFM',
    hard_wrap: false

set :haml, ugly: true, format: :html5

activate :syntax, line_numbers: false

activate :blog do |blog|
  blog.prefix = 'articles'
  blog.sources = '{title}.html'
  blog.permalink = '{title}/index.html'
end

activate :directory_indexes

activate :s3_sync do |s3|
  s3.bucket = 'yorickpeterse.com'
  s3.region = 'eu-west-1'
  s3.acl = 'public-read'
  s3.index_document = 'index.html'
  s3.error_document = '404.html'
end

default_caching_policy max_age: 24 * 60 * 60

activate :cloudfront do |cf|
  cf.distribution_id = 'E38R9TE90MPQA7'
  cf.access_key_id = ENV['AWS_ACCESS_KEY_ID']
  cf.secret_access_key = ENV['AWS_SECRET_ACCESS_KEY']
end

configure :development do
  activate :livereload
end

configure :build do
  activate :minify_css
  activate :asset_hash
end

{'fraction_non_alphanumeric': 0.13833701250919794, 'fraction_numerical': 0.02207505518763797, 'mean_word_length': 4.504048582995951, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1809312', 'n_tokens_mistral': 1068, 'n_tokens_neox': 1011, 'n_words': 255}