README.md 7.64 KB
Newer Older
Ravgeet Dhillon's avatar
Ravgeet Dhillon committed
1
# GTK's Official Website
Ravgeet Dhillon's avatar
Ravgeet Dhillon committed
2

Emmanuele Bassi's avatar
Emmanuele Bassi committed
3
The source for the [GTK website](https://www.gtk.org)
Ravgeet Dhillon's avatar
Ravgeet Dhillon committed
4

Ravgeet Dhillon's avatar
Ravgeet Dhillon committed
5
6
## About

Emmanuele Bassi's avatar
Emmanuele Bassi committed
7
8
9
10
11
GTK.org is a official website for GTK Project. The site is developed with
and maintained using [Jekyll][official-jekyll], a Static Site Generator
developed with Ruby. The site uses following types of files for the content
generation:

Ravgeet Dhillon's avatar
Ravgeet Dhillon committed
12
13
-   HTML files with extension `.html`
-   Markdown files with extension `.md`
Ravgeet Dhillon's avatar
Ravgeet Dhillon committed
14
15

The data used by the site is stored in the form of following files:
Emmanuele Bassi's avatar
Emmanuele Bassi committed
16

Ravgeet Dhillon's avatar
Ravgeet Dhillon committed
17
18
-   YAML files with extension `.yml`
-   JSON files with extension `.json`
Ravgeet Dhillon's avatar
Ravgeet Dhillon committed
19
20
21
22
23
24
25

## Project Structure

    ...
    ├── _data                               #contains site's data files
    │   ├── apps.yml                        #list of apps to show on index.html slider section
    │   ├── navigation.yml                  #links to be added to the site's header and footer sections
26
    │   ├── sample_codes.yml                #codes for language bindings
Ravgeet Dhillon's avatar
Ravgeet Dhillon committed
27
    │   └── labels.json
Ravgeet Dhillon's avatar
Ravgeet Dhillon committed
28
29
    ├── _includes                           #contains site's include files
    │   ├── footer.html                     #the footer of the site
Ravgeet Dhillon's avatar
Ravgeet Dhillon committed
30
31
    │   ├── header.html                     #the meta data of the site
    │   └── navbar.html                     #the navbar of the site
Ravgeet Dhillon's avatar
Ravgeet Dhillon committed
32
33
    ├── _layouts                            #contains layout designs for site's pages
    │   └── documentation.html              #layout design for pages that belong to GTK documentation
Ravgeet Dhillon's avatar
Ravgeet Dhillon committed
34
    ├── .gitlab                             #contains gitlab template files for bugs and merge requests
Ravgeet Dhillon's avatar
Ravgeet Dhillon committed
35
    ├── assets                              #contains site's valuable entities
Ravgeet Dhillon's avatar
Ravgeet Dhillon committed
36
37
    │   ├── font                            #contains site's font: Red Hat Display
    │   ├── img                             #contains site's images and illustrations
Ravgeet Dhillon's avatar
Ravgeet Dhillon committed
38
    │   └── scss                            #contains site's preprocessor stylesheets
39
40
41
    │       ├── colorful.scss               #stylesheet for syntax highlighting
    │       ├── index.scss                  #stylesheet for user defined styles
    │       ├── markdown.scss               #stylesheet for styling the markdown content
Ravgeet Dhillon's avatar
Ravgeet Dhillon committed
42
43
44
    │       └── theme.scss                  #stylesheet for website's theme. Generated from Bootstrap
    ├── _pages                              #contains site's main pages
    ├── _docs                               #contains pages for GTK documentation
Ravgeet Dhillon's avatar
Ravgeet Dhillon committed
45
46
47
48
    ├── _config.yml                         #contains Jekyll settings for the site
    ├── .gitignore
    ├── .gitlab-ci.yml                      #for Gitlab Continuous Integration and Deployment
    ├── 404.html
49
    ├── CODE_OF_CONDUCT.md
Ravgeet Dhillon's avatar
Ravgeet Dhillon committed
50
51
52
    ├── CONTRIBUTING.md
    ├── Gemfile                             #contains gem dependencies for the site.
    ├── Gemfile.lock
53
    ├── LICENSE.txt
Ravgeet Dhillon's avatar
Ravgeet Dhillon committed
54
55
    ├── package-lock.json
    ├── package.json                        #contains node dependencies for the site.
56
    ├── README.md
57
    ├── setuid.html			    #referenced in code, **cannot be moved**
58
    └── setup.sh                            #script for setting up the website
Ravgeet Dhillon's avatar
Ravgeet Dhillon committed
59
60
61

## Contributing

Emmanuele Bassi's avatar
Emmanuele Bassi committed
62
63
64
65
66
We always welcome people who want to contribute towards our project. For
suitable information on how can you contribute to the website, on how to
report bugs, on how to request new features or anything that can make the
website a better experience for the end users, please read on [how to
contribute][contributing].
Ravgeet Dhillon's avatar
Ravgeet Dhillon committed
67

68
## Setup the website locally
Ravgeet Dhillon's avatar
Ravgeet Dhillon committed
69

70
To get the site up and running locally, follow the below steps:
Ravgeet Dhillon's avatar
Ravgeet Dhillon committed
71

72
1. Install a full [Ruby development environment](https://jekyllrb.com/docs/installation/).
73
2. Create a local clone of the website:
Ravgeet Dhillon's avatar
Ravgeet Dhillon committed
74

75
```
76
git clone https://gitlab.gnome.org/Infrastructure/gtk-web.git
77
```
Ravgeet Dhillon's avatar
Ravgeet Dhillon committed
78

79
3. Change into the gtk-web directory
Ravgeet Dhillon's avatar
Ravgeet Dhillon committed
80

81
```
Ravgeet Dhillon's avatar
Ravgeet Dhillon committed
82
cd gtk-web
83
```
Ravgeet Dhillon's avatar
Ravgeet Dhillon committed
84

85
4. Perform the following commands to install dependencies and structure the website properly:
Ravgeet Dhillon's avatar
Ravgeet Dhillon committed
86

87
88
```
chmod +x setup.sh && bash setup.sh
89
```
Ravgeet Dhillon's avatar
Ravgeet Dhillon committed
90

91
5. Build the site and make it available on your local server
Ravgeet Dhillon's avatar
Ravgeet Dhillon committed
92

93
```
94
95
$ bundle exec jekyll serve
```
Ravgeet Dhillon's avatar
Ravgeet Dhillon committed
96

97
6. Browse to [http://localhost:4000](http://localhost:4000) to view the website.
Ravgeet Dhillon's avatar
Ravgeet Dhillon committed
98
99
100

## Dependencies

Emmanuele Bassi's avatar
Emmanuele Bassi committed
101
102
103
GTK.org relies on the dependencies as well. These dependencies are provided
in the Ruby `Gemfile` or NPM's `package.json`. Following table shows the
list of dependencies used by this project:
Ravgeet Dhillon's avatar
Ravgeet Dhillon committed
104

Ravgeet Dhillon's avatar
Ravgeet Dhillon committed
105
106
| Package                       | Version  | File                         | Source                                                |
| ----------------------------- | -------- | ---------------------------- | ----------------------------------------------------- |
107
108
109
| bootstrap                     | `4.5.2`  | [package.json][package.json] | [Github](https://github.com/twbs/bootstrap)           |
| @fortawesome/fontawesome-free | `5.14.0` | [package.json][package.json] | [Github](https://github.com/FortAwesome/Font-Awesome) |
| jquery                        | `3.5.1`  | [package.json][package.json] | [Github](https://github.com/jquery/jquery)            |
Ravgeet Dhillon's avatar
Ravgeet Dhillon committed
110
111
| popper.js                     | `1.16.1` | [package.json][package.json] | [Github](https://github.com/FezVrasta/popper.js/)     |
| slick-carousel                | `1.8.1`  | [package.json][package.json] | [Github](https://github.com/kenwheeler/slick/)        |
112
113
| moment                        | `2.27.0` | [package.json][package.json] | [Github](https://github.com/moment/moment/)           |
| node-sass                     | `4.14.1` | [package.json][package.json] | [Github](https://github.com/sass/node-sass/)          |
Ravgeet Dhillon's avatar
Ravgeet Dhillon committed
114
| jekyll                        | `4.0.1`  | [Gemfile][gemfile]           | [Github](https://github.com/jekyll/jekyll/)           |
Ravgeet Dhillon's avatar
Ravgeet Dhillon committed
115

Ravgeet Dhillon's avatar
Ravgeet Dhillon committed
116
117
118
119
Read about adding/updating/removing dependencies on [how to contribute](CONTRIBUTING.MD#addingupdatingremoving-dependencies).

## Pipeline

Emmanuele Bassi's avatar
Emmanuele Bassi committed
120
121
The pipeline used by the website is the top-level component of continuous
integration, delivery, and deployment.
Ravgeet Dhillon's avatar
Ravgeet Dhillon committed
122

Emmanuele Bassi's avatar
Emmanuele Bassi committed
123
124
125
126
127
128
The pipeline defined by the GTK.org uses the `Ruby2.5` image. The pipeline
consists of a script that runs before the site is tested/deployed. The
script that runs before the test/deployment of the website basically
installs all the `gem/npm dependencies`, fetches the API data regarding the
GTK from its [gitlab instance][gtk-gitlab] and then structurizes the website
before testing/deploying.
Ravgeet Dhillon's avatar
Ravgeet Dhillon committed
129

Emmanuele Bassi's avatar
Emmanuele Bassi committed
130
131
`test` stage is performed on all branches but `master`. `deploy` stage on
the other hand is performed only on `master` branch.
Ravgeet Dhillon's avatar
Ravgeet Dhillon committed
132

Ravgeet Dhillon's avatar
Ravgeet Dhillon committed
133
134
135
136
137
## Maintainers

You can reach out to the following individuals if you have any doubt or suggestion regarding the GTK.org:

**Ravgeet Dhillon**
Ravgeet Dhillon's avatar
Ravgeet Dhillon committed
138

139
-   You can contact me via my [email](mailto:ravgeetdhillon@gmail.com) or through my [website](https://ravgeetdhillon.github.io).
Ravgeet Dhillon's avatar
Ravgeet Dhillon committed
140
141
-   You can also find me on IRC. I am `ravgeetdhillon` on `irc.gnome.org` in the `#gtk` or
    `#gnome-hackers` channels.
Ravgeet Dhillon's avatar
Ravgeet Dhillon committed
142
143

**Emmanuele Bassi**
Ravgeet Dhillon's avatar
Ravgeet Dhillon committed
144
145

-   You can contact me via my [email](mailto:ebassi@gnome.org).
Ravgeet Dhillon's avatar
Ravgeet Dhillon committed
146
147
148

## Code of Conduct

Emmanuele Bassi's avatar
Emmanuele Bassi committed
149
150
151
GTK is an open source project with a contributor community that spans across
the globe. We want everyone in our community to feel safe and encourage the
participation of people from all forms of backgrounds, regardless of
Ravgeet Dhillon's avatar
Ravgeet Dhillon committed
152
experience level, age, gender, identity, race, religion, or nationality. We
Emmanuele Bassi's avatar
Emmanuele Bassi committed
153
expect all contributors to uphold the [Code of Conduct][code-of-conduct].
Ravgeet Dhillon's avatar
Ravgeet Dhillon committed
154
155
156
157
158
159

## License Information

GTK.org is licensed under the [Creative Commons BY-SA-4.0][license].

<!-- markdown variables -->
Ravgeet Dhillon's avatar
Ravgeet Dhillon committed
160

Ravgeet Dhillon's avatar
Ravgeet Dhillon committed
161
162
163
164
[contributing]: CONTRIBUTING.MD
[code-of-conduct]: CODE_OF_CONDUCT.MD
[official-jekyll]: https://jekyllrb.com
[package.json]: package.json
Ravgeet Dhillon's avatar
Ravgeet Dhillon committed
165
[gemfile]: Gemfile
166
[license]: LICENSE.txt
Ravgeet Dhillon's avatar
Ravgeet Dhillon committed
167
[gtk-gitlab]: https://gitlab.gnome.org/GNOME/gtk/