Sha256: c28134f02ae3a2e5a66438b9ee3f36d5781d24f4c5f0510c8cb816b69f9d84e0

Contents?: true

Size: 1.46 KB

Versions: 3

Compression:

Stored size: 1.46 KB

Contents

# Zybooks Liquid Tag Plugin


This allows a link to the most recent version of zybooks, without having to 
change links throughout the entire website. Instead the link updates based on the contents 
of the _config.yml direction.

## Setup
Make sure the _config.yml includes the line zybook, and book-id

```yaml
zybook:  
  book_id: "COLOSTATECS1634Summer2020"
```
Replace COLOSTATE... with your latest book ID, that is find in the URL of the book. For example:

```
https://learn.zybooks.com/zybook/COLOSTATECS1634Summer2020/`
```


## Usage

```
{% zybook chapter:x section:x %}Link text{% endzybook %}
```

For example:
```
{% zybook chapter:13 section:2 %}Loops{%endzybook%}
```
would create the following link (assuming Summer Book)
```html
<a href="https://learn.zybooks.com/zybook/COLOSTATECS1634Summer2020/chapter/13/section/2" target="_blank">Loops</a>
```

Arguments are optional, possible arguments are as follows:

* chapter  
  defaults to nothing, directing the link to the zybook TOC if omitted
* section  
  defaults to 1 
* resource_id  
  for the content_resource_id in links, defaults to nothing
  
The text between the tag block is used for the link text.

## _config.yml options
All arguments can also be included in the _config.yml. They will
be used as default arguments, but local (placing in the tag) use overwrites
the _config.yml setting. In most cases, the only option 
in _config.yml that makes sense is `book-id`.

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
jekyll-zybook-tag-0.1.5 README.md
jekyll-zybook-tag-0.1.4 README.md
jekyll-zybook-tag-0.1.3 README.md