Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
salif committed Oct 22, 2024
1 parent b7c66d1 commit 937fba2
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 71 deletions.
159 changes: 88 additions & 71 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,36 +34,40 @@ A clean and elegant blog theme for [Zola](https://www.getzola.org/). Linkita is

## Linkita features

### UI localization
### i18n

- English
- Bulgarian
- Esperanto
- `en`: English
- `bg`: Bulgarian
- `eo`: Esperanto

## Installation
## Installing

1. Use it as a submodule:
1. Add this theme as a submodule:

```sh
git submodule add https://codeberg.org/salif/linkita.git themes/linkita
```

Alternatively, clone the repository:

```sh
# git clone https://codeberg.org/salif/linkita.git themes/linkita
```
Alternatively, clone the repository: `git clone https://codeberg.org/salif/linkita.git themes/linkita`.

2. It is recommended to switch from the `linkita` branch to the latest release:

```sh
cd themes/linkita
npm run switch-to-latest
# Alternatively, use this command:
# ./justfile switch-to-latest
```

3. Copy translations
Alternatively, use this command: `./justfile switch-to-latest`.

3. Set `linkita` as your theme in your `config.toml`.

```toml
theme = "linkita"
```

Also, make sure you have `title` and `default_language` set in your `config.toml`.

4. Copy translations

Open `themes/linkita/config.toml` and copy all translations to your `config.toml`.
The English translation is under `[languages.en.translations]`.
Expand All @@ -75,13 +79,70 @@ Error: Reason: Function call 'trans' failed
Error: Reason: Failed to retrieve term translation
```

4. Then set `linkita` as your theme in `config.toml`.
## Updating

```sh
git submodule update --remote themes/linkita
cd themes/linkita
npm run switch-to-latest
```

## Usage

### Front matter

```toml
theme = "linkita"
+++
title = ""
description = ""
date = ""
[taxonomies]
tags = ["", ""]
[extra]
comment = false
math = false
mermaid = false
[extra.cover]
image = ""
alt = ""
[extra.open_graph]
+++
```

## Inject support
| `extra.open_graph` keys | type | example |
| --- | --- | --- |
| `content_tier` | string | `"free"`, `"locked"`, or `"metered"` |
| `locations` | array of strings | `["county:COUNTY"]` or `["city:CITY,COUNTY"]` |
| `section` | string | |
| `tags` | array of strings | |
| `opinion` | boolean | `"true"` or `"false"` |
| `audio` | string | |
| `audio_mime` | string | |
| `video` | string | |
| `video_mime` | string | |
| `url` | string | |

### YAML front matter

```yaml
---
title: ""
description: ""
date: ""
taxonomies:
tags: ["", ""]
extra:
comment: false
math: false
mermaid: false
cover:
image: ""
alt: ""
open_graph:
---
```

### Inject support

You can easily use inject to add new features to your side without modifying the theme itself.

Expand All @@ -95,7 +156,7 @@ For example, to load a custom script, you can add a `templates/injects/head.html
<script src="js-file-path-or-cdn-url.js"></script>
```

## Configuration
## Configuring

| key | type | example | comment |
| --- | --- | --- | --- |
Expand Down Expand Up @@ -207,63 +268,19 @@ For date format, see [chrono docs](https://docs.rs/chrono/0.4/chrono/format/strf
| `extra.giscus.lang` | string | `"en"` | `en` |
| `extra.giscus.loading` | string | `"lazy"` | `lazy` |

## Front matter

```toml
+++
title = ""
description = ""
date = ""
[taxonomies]
tags = ["", ""]
[extra]
comment = false
math = false
mermaid = false
[extra.cover]
image = ""
alt = ""
[extra.open_graph]
+++
```
## License

| `extra.open_graph` keys | type | example |
| --- | --- | --- |
| `content_tier` | string | `"free"`, `"locked"`, or `"metered"` |
| `locations` | array of strings | `["county:COUNTY"]` or `["city:CITY,COUNTY"]` |
| `section` | string | |
| `tags` | array of strings | |
| `opinion` | boolean | `"true"` or `"false"` |
| `audio` | string | |
| `audio_mime` | string | |
| `video` | string | |
| `video_mime` | string | |
| `url` | string | |
See the [MIT License](https://codeberg.org/salif/linkita/src/branch/linkita/LICENSE) file.

### YAML Front Matter
## Contributing

```yaml
---
title: ""
description: ""
date: ""
taxonomies:
tags: ["", ""]
extra:
comment: false
math: false
mermaid: false
cover:
image: ""
alt: ""
open_graph:
---
```
Pull requests are welcome on [Codeberg](https://codeberg.org/salif/linkita) and [Github](https://github.com/salif/linkita).
Open *bug reports* and *feature requests* on [Codeberg](https://codeberg.org/salif/linkita/issues).

## License
If you want to add new translations or correct existing ones, please find another person who speaks the language to confirm your translations are good, by adding a comment or review on your pull request.

[MIT License](https://codeberg.org/salif/linkita/src/branch/linkita/LICENSE)
## Blogs using this theme

Copyright (c) 2023-present, st1020
- [salif.eu](https://salif.eu): My personal website (soon)

Copyright (c) 2024-present, salif
If you use Linkita, feel free to create a pull request to add your site to this list.
Binary file modified screenshot.dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions templates/partials/page_info.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
<time datetime="{{ page.updated }}">{{ page.updated | date(format=date_format) }}</time>
{%- endif %}
{%- endif %}
{%- endif %}
{%- if config.extra.reading_time[lang] %}
{%- for reading_time in config.extra.reading_time[lang] %}
<span class="mx-1">&middot;</span>
{%- if reading_time == "reading_time" %}
Expand Down

0 comments on commit 937fba2

Please sign in to comment.