Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
sylhare committed Nov 29, 2024
1 parent e4f3439 commit 49cacda
Showing 1 changed file with 23 additions and 17 deletions.
40 changes: 23 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,7 @@ Based on Rohan Chandra [type-theme](https://github.com/rohanchandra/type-theme)
## Usage

### As a ruby gem 💎

Check out this tutorial: [Use as Ruby Gem](#use-as-ruby-gem-)

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#/https://github.com/sylhare/Type-On-Strap)

### As a github page 📋
### As a GitHub page 📋

1. Fork and clone the [Type on Strap repo](https://github.com/sylhare/Type-On-Strap): `git clone https://github.com/Sylhare/Type-on-Strap.git`
2. Install [Jekyll](https://jekyllrb.com/docs/installation/): `gem install jekyll`, check [#1](https://github.com/Sylhare/Type-on-Strap/issues/1) if you have a problem.
Expand All @@ -42,6 +36,12 @@ Check out this tutorial: [Use as Ruby Gem](#use-as-ruby-gem-)
- GitHub Page: [update `_config.yml`](#site-configuration)
5. Run the Jekyll server: `bundle exec jekyll serve`

### As a ruby gem 💎

Check out this tutorial: [Use as Ruby Gem](#use-as-ruby-gem-)

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#/https://github.com/sylhare/Type-On-Strap)

## Structure

Here are the main files of the template
Expand Down Expand Up @@ -165,9 +165,10 @@ with suffix `-small` (620x320) and `-medium` (1240x640) to display on smaller sc
Localization string is a way to quickly change the template language for text like *Next Post* or *Follow on*, ...
You can find all the properties in `_data/language.yml`.

By default, it is in English, but you can easily add your own language.
By default, it is in English, but you can add your own language.

Here you also can set the date format, e.g., set `str_date_format: '%B %-d, %Y'` for "January, 13, 2024", `str_date_format: '%Y-%m-%d'` for 2024-01-13, or `str_date_format: '%d.%m.%Y'` for 13.01.2024.
Here you also can set the date format, e.g., set `str_date_format: '%B %-d, %Y'` for "January, 13, 2024",
`str_date_format: '%Y-%m-%d'` for 2024-01-13, or `str_date_format: '%d.%m.%Y'` for 13.01.2024.

### Google Analytics

Expand Down Expand Up @@ -295,7 +296,8 @@ Display icons in the footer.
All icon variables should be your username enclosed in quotes (e.g. "username") in `_data/icons.yml`.

You can update the RSS settings in `_data/social` to change the default feed path (generated by [jekyll-feel](https://github.com/jekyll/jekyll-feed)).
To enable the share icons at the bottom of each article set to true the one you'd like under `share` in the `_data/social.yml` file.
To enable the share icons at the bottom of each article,
set to true the one you'd like under `share` in the `_data/social.yml` file.

### Personalize your Blog Posts 📝

Expand All @@ -318,7 +320,7 @@ title: Hello World # Title of the page
hide_title: true # [Opt] Hide the title when displaying the post, but shown in lists of posts
feature-img: "assets/img/sample.png" # [Opt] Add a feature-image to the post
thumbnail: "assets/img/thumbnails/sample-th.png" # [Opt] Add a thumbnail image on blog view
color: rgb(80,140,22) # [Opt] Add the specified colour as feature image, and change link colors in post
color: rgb(80,140,22) # [Opt] Add the specified color as feature image and links in post
position: 1 # [Opt] Set position on the menu navigation bar
tags: [sample, markdown, html] # [Opt] Add tags to the page
---
Expand All @@ -339,7 +341,7 @@ It will respect the page and theme layout, mind the padding on the sides.

#### Post excerpt

The [excerpt](https://jekyllrb.com/docs/posts/#post-excerpts) are the first lines of an article that is displayed on the blog page.
The [excerpt](https://jekyllrb.com/docs/posts/#post-excerpts) is the head of the article rendered in the blog page.
The length of the excerpt has a default of around `250` characters or can be manually set in the post using:

in `conflig.yml`:
Expand Down Expand Up @@ -369,8 +371,12 @@ The html is stripped out of the excerpt, so it only displays text.

To easily add align images side by side in your article using the `aligner.html` include:

```ruby
{% include aligner.html images="path/to/img1.png,path/to/img2.png,path/to/img3.png" column=3 %}
```liquid
{% include aligner.html
images="path/to/img1.png,path/to/img2.png,path/to/img3.png"
column=3
caption="some description"
%}
```

Use it in any markdown file. There are two fields in the _include_ you need to look into:
Expand Down Expand Up @@ -546,7 +552,7 @@ The Tag page can be hidden with the `hide` option. You can remove the icon by re

Jekyll works with [liquid](https://shopify.github.io/liquid/) tags usually represented by:

```
```liquid
{{ liquid.tag | filter }}
```

Expand Down Expand Up @@ -606,7 +612,7 @@ You can use Type-on-strap as a [gem](https://rubygems.org/gems/type-on-strap).
Using the [Ruby Gem Method](https://sylhare.github.io/2021/03/25/Run-type-on-strap-jekyll-theme-locally.html).
Add this line to your Jekyll site's Gemfile (or create one):

```ruby
```shell
gem "type-on-strap"
```

Expand All @@ -618,7 +624,7 @@ theme: type-on-strap

Then run Bundler to install the theme gem and dependencies:

```bash
```shell
bundle install
```

Expand Down

0 comments on commit 49cacda

Please sign in to comment.