<commit_before># Jekyll::Embed

Use links to build Jekyll page data.

## Installation

Follow [Jekyll's instructions for installing Jekyll plugins](http://jekyllrb.com/docs/plugins/#installing-a-plugin). The **Jekyll::Embed** plugin is available from the `jekyll-embed` gem.

## Usage

**Jekyll::Embed** relies on two special fields in the Jekyll page front matter to do its thing - `_links` and `_embedded`. These concepts come from the Hypermedia Application Language (HAL) media type specification.

* `_links` is a container of links to other resources
* `_embedded` is a container of other resources

**Jekyll::Embed** uses `_links` to populate `_embedded`.

> For the purposes of this plugin, a Jekyll page and resource can be considered the same thing.

### Steps

1. Define `_links` to other resources in each Jekyll page's front matter.

  In the following example, Jill has links to her friends Bob and Jack inside of `_links`.

  ```yaml
  # people/jill.md (front matter only)

  title: Jill
  age: 6
  _links:
    friends:
      - title: Bob
        href: /people/bob

      - title: Jack
        href: /people/jack
  ```

2. Use the embedded resources in the Jekyll pages.

  The following example is the result of embedding the previous example. Notice that Jill's friends are now included in their entirety in `_embedded`.

  ```yaml
  # people/jill.md (front matter only)

  title: Jill
  age: 6
  _links:
    friends:
      - title: Bob
        href: /people/bob

      - title: Jack
        href: /people/jack

  _embedded:
    friends:
      - title: Bob
        age: 5
        _links:
          friends:
            - title: Jill
              href: /people/jill

      - title: Jack
        age: 7
        _links:
          friends:
            - title: Jill
              href: /people/jill
  ```

## Contributing

1. Fork it (https://github.com/gregoryjscott/jekyll-embed/fork).
2. Create your feature branch (`git checkout -b my-new-feature`).
3. Commit your changes (`git commit -am 'Add some feature'`).
4. Push to the branch (`git push origin my-new-feature`).
5. Create a new Pull Request.<commit_msg>Readme improvements<commit_after># Jekyll::Embed

Use links to build Jekyll page data.

## Installation

Follow [Jekyll's instructions for installing Jekyll plugins](http://jekyllrb.com/docs/plugins/#installing-a-plugin). The **Jekyll::Embed** plugin is available from the `jekyll-embed` gem.

## Usage

**Jekyll::Embed** relies on two special fields in the Jekyll page front matter to do its thing - `_links` and `_embedded`. These concepts come from the [Hypermedia Application Language (HAL)](http://stateless.co/hal_specification.html) media type specification.

* `_links` is a container of links to other resources
* `_embedded` is a container of other resources

**Jekyll::Embed** finds resources using `_links` and puts them in `_embedded`.

> For the purposes of this plugin, a resource and Jekyll page (specifically its front matter, aka data) can be considered the same thing.

### Steps

1. Define link objects to other resources in a `_links` field as part of the Jekyll page's front matter (aka data). Every link object should have `title` and `href` fields, but this plugin only needs `href` to work.
2. Use the embedded resources in the Jekyll page.

In the following example, Jill has links to her friends Bob and Jack inside of `_links` defined in the `people/jill.md` page.

```yaml
# people/jill.md (front matter only)

title: Jill
age: 6
_links:
  friends:
    - title: Bob
      href: /people/bob

    - title: Jack
      href: /people/jack
```

Below is the data that will be available to the `people/jill.md` page during the Jekyll build process. Notice that Jill's friends Bob and Jack are now included in their entirety in `_embedded` and are available to be displayed on the Jill's page.

```yaml
# people/jill.md (front matter only)

title: Jill
age: 6
_links:
  friends:
    - title: Bob
      href: /people/bob

    - title: Jack
      href: /people/jack

_embedded:
  friends:
    - title: Bob
      age: 5
      _links:
        friends:
          - title: Jill
            href: /people/jill

    - title: Jack
      age: 7
      _links:
        friends:
          - title: Jill
            href: /people/jill
```

## Contributing

1. Fork it (https://github.com/gregoryjscott/jekyll-embed/fork).
2. Create your feature branch (`git checkout -b my-new-feature`).
3. Commit your changes (`git commit -am 'Add some feature'`).
4. Push to the branch (`git push origin my-new-feature`).
5. Create a new Pull Request.
{'fraction_non_alphanumeric': 0.09665427509293681, 'fraction_numerical': 0.004810846271594139, 'mean_word_length': 2.932932072226999, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '431356', 'n_tokens_mistral': 1433, 'n_tokens_neox': 1336, 'n_words': 574}