README.md 5.2 KB
Newer Older
1
# jekyll-kde-theme
Carl Schwan's avatar
Carl Schwan committed
2
3
4
5
6

This is a jekyll theme for a unified layout across the kde websites.

## Installation

7
To create a new applications, copy the directory `examples/applications`
Carl Schwan's avatar
Carl Schwan committed
8

9
And replace
Carl Schwan's avatar
Carl Schwan committed
10
11

```ruby
Carl Schwan's avatar
Carl Schwan committed
12
gem "jekyll-kde-theme", path: '../../'
Carl Schwan's avatar
Carl Schwan committed
13
14
```

15
with
Carl Schwan's avatar
Carl Schwan committed
16

Carl Schwan's avatar
Carl Schwan committed
17
```ruby
18
gem "jekyll-kde-theme", :git => 'https://invent.kde.org/websites/jekyll-kde-theme.git'
Carl Schwan's avatar
Carl Schwan committed
19
20
21
22
```

And then execute:

Carl Schwan's avatar
Carl Schwan committed
23
    $ bundle install --path vendor/bundle
24

Carl Schwan's avatar
Carl Schwan committed
25
26
27
28
29
You can now start editing the website.

To test your change do:

    $ bundle exec jekyll server
30

Carl Schwan's avatar
Carl Schwan committed
31
You can also find a tutorial in the community wiki: https://community.kde.org/KDE.org/Jekyll
Carl Schwan's avatar
Carl Schwan committed
32
33
34
35
36

## Usage

### Collections:

Carl Schwan's avatar
Carl Schwan committed
37
* Changelogs (optional): put the software changelog in \_changelogs. Example metadata:
Carl Schwan's avatar
Carl Schwan committed
38
39
40
41
42
43
44
45
46
47
48
49
```
---
layout: changelog
title: Konsole 1.1.1 / KDE 3.0.1
sorted: 3001 # version for sorting
css-include: /css/main.css
---

* Feature 1
* Feature 2
```

50
51
52
53
54
55
56
57
58
59
60
61
62
63

### Blog

In `_config.yml`, put
```
paginate: 3
```

And in the `index.html` page, you can include the blog component.

```
{% include blog.html %}
```

64
65
66
67
### Options

Following options are available in `_config.yml`

68
* `use-kde-logo`: if you want to use the kde logo instead of an application icon
Anuj Bansal's avatar
Anuj Bansal committed
69
* `hide-title-nav`: To hide the site title besides logo in navigation bar
70
* `app_icon`: Path to the icon displayed in the navbar
71
* `donation`: Set `false` to hide donation form at the bottom of the website. `true` by default
72
73
74
* `navigation`: Navigation menu settings
  * `navigation.top[].title`: Title for the top navigation menu item
  * `navigation.top[].url`: URL for the top navigation menu item
Carl Schwan's avatar
Carl Schwan committed
75
  * `navigation.top[].blank`: URL open a new tab if set
Anuj Bansal's avatar
Anuj Bansal committed
76
77
78
  * `navigation.top[].components[].title`: Title for the Component
  * `navigation.top[].components[].url`: URL for the Component
  * `navigation.top[].components[].background`: Background Image URL for the Component
79
80
81
  * `navigation.bottom[].name`: Section title for the bottom links
    * `navigation.bottom[].items[].title`: Title for the bottom links
    * `navigation.bottom[].items[].url`: URL for the bottom links
Jumpei Ogawa's avatar
Jumpei Ogawa committed
82
83
84
85
86
87
88
89
90
91
92
93
94
* `maintainer`: Maintainer name and link shown at the bottom left of the pages
  * `maintainer.name`: Display name of the maintainer team. "KDE www" by default
  * `maintainer.href`: URL or email address link for the maintainer team. "mailto:kde-www@kde.org" by default
* `social`: Settings for social links shown at the bottom right of the pages. If you do not specify this parameter, default social links would be shown.
  * `social.facebook`: Link to the Facebook page. e.g. "https://www.facebook.com/kde/"
  * `social.twitter`: Link to the Twitter profile. e.g. "https://twitter.com/kdecommunity"
  * `social.diaspora`: Link to the Diaspora profile. e.g. "https://joindiaspora.com/people/9c3d1a454919ef06"
  * `social.mastodon`: Link to the Mastodon profile. e.g. "https://mastodon.technology/@kde"
  * `social.linkedin`: Link to the LinkedIn profile. e.g. "https://www.linkedin.com/company/29561/"
  * `social.reddit`: Link to the Reddit discussion page. e.g. "https://www.reddit.com/r/kde/"
  * `social.youtube`: Link to the YouTube channel. e.g. "https://www.youtube.com/channel/UCF3I1gf7GcbmAb0mR6vxkZQ"
  * `social.peertube`: Link to PeerTube channel. e.g. "https://peertube.mastodon.host/accounts/kde/videos"
  * `social.vk`: Link to VK profile. e.g. "https://vk.com/kde_ru"
Carl Schwan's avatar
Carl Schwan committed
95
* `favicon` add a favicon otherwise use kde logo
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117

`navigation` option example:

```yaml
navigation:
  top:
    - title: Changelog
      url: /changelog.html
    - title: Download
      url: /download.html
  bottom:
    - name: Community
      items:
        - title: Konsole Forums
          url: https://forum.kde.org/viewforum.php?f=227&sid=2e54340bf2c58589fec0f3406a4ce171
    - name: News & Press
      items:
        - title: Announcements
          url: https://www.kde.org/announcements/
        - title: KDE.news
          url: https://dot.kde.org/
```
118

Carl Schwan's avatar
Carl Schwan committed
119
120
121
122
123
124
125
126
## Build example

```bash
cd example/simple
bundle install --path vendor/bundle
bundle exec jekyll serve
```

Carl Schwan's avatar
Carl Schwan committed
127
128
129
130
131
132
133
134
135
136
137
138
## List site using this theme

* konsole.kde.org
* cantor.kde.org
* kirogi.org
* fr.kde.org
* conf.kde.in
* kphotoalbum.org WIP
* kmymoney.org WIP

Please tell me if you create a new website using this theme. So that I can do the modification in case of breaking change.

Carl Schwan's avatar
Carl Schwan committed
139
140
## Contributing

141
Bug reports and pull requests are welcome on the KDE Gitlab at https://invent.kde.org/websites/jekyll-kde-theme.
Carl Schwan's avatar
Carl Schwan committed
142
143
144
145
146
147
148
149

## Development

To set up your environment to develop this theme, run `bundle install`.

Your theme is setup just like a normal Jekyll site! To test your theme, run `bundle exec jekyll serve` and open your browser at `http://localhost:4000`. This starts a Jekyll server using your theme. Add pages, documents, data, etc. like normal to test your theme's contents. As you make modifications to your theme and to your content, your site will regenerate and you should see the changes in the browser after a refresh, just like normal.

When your theme is released, only the files in `_layouts`, `_includes`, `_sass` and `assets` tracked with Git will be bundled.
150
To add a custom directory to your theme-gem, please edit the regexp in `jekyll-kde-theme.gemspec` accordingly.
Carl Schwan's avatar
Carl Schwan committed
151
152
153

## License

154
This program is licensed under the GNU AGPL. See [KDE Licensing policy](https://community.kde.org/Policies/Licensing_Policy).