<commit_before>h1 = site.fn

form method="post" action=site.route("sync")
	button type="submit" Sync & Build

- unless site.makefile?
	p.error YOU DO NOT HAVE A MAKEFILE. THIS IS VERY BAD.
	form method="post" action=site.route("files/Makefile")
		label
			| Select your build system
			select name="build_system"
				option value="jekyll" Jekyll
		button type="submit" Add a default Makefile

- if site.show_config_warning? && !site.config_file.exist?
	p.error You do not have a .tint.yml file. This is not terrible, but maybe you should add one.

	div style="background: #ccc; padding: 1rem"
		form method="post" action=site.route("files/.tint.yml")
			label
				| Select your build system
				select name="build_system"
					option value="jekyll" Jekyll
			button type="submit" Add a default .tint.yml

		form method="post" action=site.route
			input type="hidden" name="_method" value="PUT"
			input type="hidden" name="show_config_warning" value="false"
			button type="submit" Stop telling me about this

- unless ENV["SITE_PATH"]
	form method="post" action=site.route
		input type="hidden" name="_method" value="DELETE"
		button type="submit" Delete this site

- if !site.valid_config?
	p.error We were unable to parse your .tint.yml file.

- if [:build_failed, :build_errored].include?(site.status)
	p.error Your most recent build failed.
- elsif [:build_created, :build_received, :build_started].include?(site.status)
	p You have a build running...

- if site.cloned?
	nav
		ul: li: a href=site.route("files") Edit Files
- elsif site.status == :clone_failed
	p.error We were unable to clone your site. Please make sure the repository exists.
- else
	p Please wait, we are syncing your remote...

form method="post" action=site.route
	input type="hidden" name="_method" value="PUT"

	label
		| Name
		input type="text" name="fn" value=site.fn

	label
		| Remote
		input type="text" name="remote" value=site.remote

	button type="submit" Update

- unless ENV["SITE_PATH"]
	section
		h1 Setup
		p Add access for this SSH public key to your remote:
		code = ENV.fetch('SSH_PUBLIC')
		p And add this script as a post-receive hook:
		pre
			code
				= open('templates/post-receive').read.gsub(/http:\/\/localhost:9292\/1\//, ENV.fetch('APP_URL') + "#{site.route}")
<commit_msg>Only show these warnings if the site has been cloned.<commit_after>h1 = site.fn

form method="post" action=site.route("sync")
	button type="submit" Sync & Build

- if site.cloned?
	- unless site.makefile?
		p.error YOU DO NOT HAVE A MAKEFILE. THIS IS VERY BAD.
		form method="post" action=site.route("files/Makefile")
			label
				| Select your build system
				select name="build_system"
					option value="jekyll" Jekyll
			button type="submit" Add a default Makefile

	- if site.show_config_warning? && !site.config_file.exist?
		p.error You do not have a .tint.yml file. This is not terrible, but maybe you should add one.

		div style="background: #ccc; padding: 1rem"
			form method="post" action=site.route("files/.tint.yml")
				label
					| Select your build system
					select name="build_system"
						option value="jekyll" Jekyll
				button type="submit" Add a default .tint.yml

			form method="post" action=site.route
				input type="hidden" name="_method" value="PUT"
				input type="hidden" name="show_config_warning" value="false"
				button type="submit" Stop telling me about this

- unless ENV["SITE_PATH"]
	form method="post" action=site.route
		input type="hidden" name="_method" value="DELETE"
		button type="submit" Delete this site

- if !site.valid_config?
	p.error We were unable to parse your .tint.yml file.

- if [:build_failed, :build_errored].include?(site.status)
	p.error Your most recent build failed.
- elsif [:build_created, :build_received, :build_started].include?(site.status)
	p You have a build running...

- if site.cloned?
	nav
		ul: li: a href=site.route("files") Edit Files
- elsif site.status == :clone_failed
	p.error We were unable to clone your site. Please make sure the repository exists.
- else
	p Please wait, we are syncing your remote...

form method="post" action=site.route
	input type="hidden" name="_method" value="PUT"

	label
		| Name
		input type="text" name="fn" value=site.fn

	label
		| Remote
		input type="text" name="remote" value=site.remote

	button type="submit" Update

- unless ENV["SITE_PATH"]
	section
		h1 Setup
		p Add access for this SSH public key to your remote:
		code = ENV.fetch('SSH_PUBLIC')
		p And add this script as a post-receive hook:
		pre
			code
				= open('templates/post-receive').read.gsub(/http:\/\/localhost:9292\/1\//, ENV.fetch('APP_URL') + "#{site.route}")

{'fraction_non_alphanumeric': 0.12335561785637265, 'fraction_numerical': 0.003450506793185249, 'mean_word_length': 4.014054054054054, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '5798714', 'n_tokens_mistral': 1652, 'n_tokens_neox': 1500, 'n_words': 485}