<commit_before>---
topic: "Basic Concepts:"
desc: "Basics concepts for beginners"
---

# home pages

The home page of your site is likely is in the file `index.md` in the root of your repo.

# Front Matter

Each Markdown file has a section with so-called "front matter" which defines value using the YAML format.
This "front-matter" sits in between two lines of three hyphens each, like this:

```
---
layout: lab
num: lab00
ready: true
desc: "Getting Started"
assigned: 2019-01-10 16:00
due: 2019-01-18 17:00
signup_app: https://ucsb-cs-github-linker.herokuapp.com/
slack_url: https://ucsb-cs48-w19.slack.com
---
```

As explained below under "Using variables", the values in the front matter can be used as constants that are inserted into the text of the page.

# Using variables

On any page in the repo, you can use variables inside curly braces.  

For example, at the top of
each lab, you will typically have a variable in the front matter called `num` that has a value such as `lab01`, `lab02` etc.

If you want a student to create a repo inside the course github organization you could write something like this:

```
Please create a repo inside {{site.github_org}} with the name {{page.num}}_yourgithubid
```

# include files

When you see this in a file:

```
{% raw %}{% {% endraw %} include foo.html {% raw %}%} {% endraw %}
```

where does `foo.html` live?

The first place to look is in the `_includes` directory of the same repo as the file that contains
the include directive.  If you find the file there, and you want to change its contents, you can just edit it.
 
If the file isn't there, then Jekyll will look the remote theme repo.   That repo is specified in the `_config.yml` file,
and is likely this one:

* <https://github.com/ucsb-cs-course-repos/course-repo-jekyll-theme>

If the file is in the remote theme repo, then you probably shouldn't edit it directly, unless you really want to change
all of the repos that rely on that theme.  Instead, you can copy the contents of that file into a local copy in your own
`_includes` directory.  You can then edit your local copy.  The local copy takes precedence over the one provided by the
theme.   

This is similar to the concept of "overriding" a method in OOP.  <commit_msg>Update basic_concepts.md<commit_after>---
topic: "Basic Concepts:"
desc: "Basics concepts for beginners"
---

# home pages

The home page of your site is likely is in the file `index.md` in the root of your repo.

# Front Matter

Each Markdown file has a section with so-called "front matter" which defines value using the YAML format.
This "front-matter" sits in between two lines of three hyphens each, like this:

```
---
layout: lab
num: lab00
ready: true
desc: "Getting Started"
assigned: 2019-01-10 16:00
due: 2019-01-18 17:00
signup_app: https://ucsb-cs-github-linker.herokuapp.com/
slack_url: https://ucsb-cs48-w19.slack.com
---
```

As explained below under "Using variables", the values in the front matter can be used as constants that are inserted into the text of the page.

# Using variables

On any page in the repo, you can use variables inside curly braces.  

For example, at the top of
each lab, you will typically have a variable in the front matter called `num` that has a value such as `lab01`, `lab02` etc.
defined like this:

```
num: lab02
```

If you want a student to create a repo inside the course github organization you could write something like this:

```
Please create a repo inside {% raw %}{{site.github_org}}{% endraw %} with the name {% raw %}{{page.num}}{% endraw %}_yourgithubid
```

The value `site.github_org` shoudl be defined in the `_config.yml` for the site, like this:

```
github_org: ucsb-cs16-w19
```

The result would be text like this:

> Please create a repo inside ucsb-cs16-w19 with the name lab02_yourgithubid

# include files

When you see this in a file:

```
{% raw %}{% {% endraw %} include foo.html {% raw %}%} {% endraw %}
```

where does `foo.html` live?

The first place to look is in the `_includes` directory of the same repo as the file that contains
the include directive.  If you find the file there, and you want to change its contents, you can just edit it.
 
If the file isn't there, then Jekyll will look the remote theme repo.   That repo is specified in the `_config.yml` file,
and is likely this one:

* <https://github.com/ucsb-cs-course-repos/course-repo-jekyll-theme>

If the file is in the remote theme repo, then you probably shouldn't edit it directly, unless you really want to change
all of the repos that rely on that theme.  Instead, you can copy the contents of that file into a local copy in your own
`_includes` directory.  You can then edit your local copy.  The local copy takes precedence over the one provided by the
theme.   

This is similar to the concept of "overriding" a method in OOP.  
{'fraction_non_alphanumeric': 0.0855902418854662, 'fraction_numerical': 0.016539177175935497, 'mean_word_length': 3.8721047331319234, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, 'https://': 6, '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': '3710717', 'n_tokens_mistral': 1532, 'n_tokens_neox': 1412, 'n_words': 738}