<commit_before>
# www.kumpulaspace.fi

This site is built on Hakyll, but you do not need to know Hakyll to make even
big changes in the site, as explained in the next section.

## Modifying the content

This section assumes knowing the very basics of version control (git).

In short, the site is updated by the modifying files (under the
`content`-directory) in this repo, `git commit`ing and `git push`ing to the
server. Git hooks installed on the server takes care of the rest.

Here is an example modification session, using `$EDITOR` to make changes (you
can modify the files in whatever editor or file browser you want):

    git clone h209.it.helsinki.fi:/var/www/ksc
    cd ksc
    git checkout master
    $EDITOR content/index-en.markdown # make changes...
    git commit -am "Changed something"
    git push

*To avoid unnecessary headaches, always work with the master branch checked out
locally.* Pushing to the master branch *always* modifies only the /test section
of the site - **to update production instance**, refer to the section "To
production" below (in short, do a push master:production).

In the last step the git hooks installed on the server check that your
modifications were sensible, then regenerates the site html. **git push will
fail if you made an error while modifying (for example, messed up markdown
syntax). So watch the output!** Edit, commit and push again if necessary.

When adding a new page, say, `content/newpage-en.markdown`, you need to
explicitly say you want it included with `git add content/newpage-en.markdown`,
and then commit as normal. Note that multilingual pages are not enforced, and
there is (curretly) no failover in languages that are not supported. so remember
to **add the content in all languages you want to support!**

Things to remember:

- Almost all content is in `content` subdirectory. Files with the `.markdown`
  extension are rendered with the default layout, and `.pdf`'s are copied as-is.
  All other extensions are ignored.
- Finnish and English pages are given `-en` and `-fi` suffixes respectively (e.g.
  `content/index-en.markdown`). **The language suffix is mandadory.**

### 1. Modifying existing pages

- Modify any file under `content/` and its subdirectories.
- Default template in templates/default.html is also easily modifiable, though it
  should normally not be necessary to modify it. Only if you're
  1. Adding a new language, or
  2. modifying the top navigation bar.

### 2. Adding new pages

- New **top-level** page directly under content-folder:<commit_msg>Update readme intstructions<commit_after>
# www.kumpulaspace.fi

This site is built on Hakyll, but you do not need to know Hakyll to make even
big changes in the site, as explained in the next section.

## Modifying the content

This section assumes knowing the very basics of version control (git).

In short, the site is updated by the modifying files (under the
`content`-directory) in this repo, `git commit`ing and `git push`ing to the
server. Git hooks installed on the server takes care of the rest.

Here is an example modification session, using `$EDITOR` to make changes (you
can modify the files in whatever editor or file browser you want):

    git clone h209.it.helsinki.fi:/var/www/ksc
    cd ksc
    git checkout master
    $EDITOR content/index-en.markdown # make changes...
    git commit -am "Changed something"

    # To /test
    git push

    # To production
    git push origin master:production


*To avoid unnecessary headaches, always work with the master branch checked out
locally.* Pushing to the master branch *always* modifies only the /test section
of the site - to update the production instance, refer to the section "To
production" below.

In the last step the git hooks installed on the server check that your
modifications were sensible, then regenerates the site html. **git push will
fail if you made an error while modifying (for example, messed up markdown
syntax). So watch the output!** Edit, commit and push again if necessary.

When adding a new page, say, `content/newpage-en.markdown`, you need to
explicitly say you want it included with `git add content/newpage-en.markdown`,
and then commit as normal. Note that multilingual pages are not enforced, and
there is (curretly) no failover in languages that are not supported. so remember
to **add the content in all languages you want to support!**

Things to remember:

- Almost all content is in `content` subdirectory. Files with the `.markdown`
  extension are rendered with the default layout, and `.pdf`'s are copied as-is.
  All other extensions are ignored.
- Finnish and English pages are given `-en` and `-fi` suffixes respectively (e.g.
  `content/index-en.markdown`). **The language suffix is mandadory.**

### 1. Modifying existing pages

- Modify any file under `content/` and its subdirectories.
- Default template in templates/default.html is also easily modifiable, though it
  should normally not be necessary to modify it. Only if you're
  1. Adding a new language, or
  2. modifying the top navigation bar.

### 2. Adding new pages

- New **top-level** page directly under content-folder:
{'fraction_non_alphanumeric': 0.06824350523458705, 'fraction_numerical': 0.002714230321830167, 'mean_word_length': 3.9893617021276597, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, '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': '2511365', 'n_tokens_mistral': 1410, 'n_tokens_neox': 1352, 'n_words': 758}