Commit 5fa216ee authored by Ravgeet Dhillon's avatar Ravgeet Dhillon 💬
Browse files

Code Refactoring

parent 80dbe495
* linguist-language=Ruby
\ No newline at end of file
_site
.sass-cache
_site/
.sass-cache/
.jekyll-cache/
.jekyll-metadata
node_modules/
assets/@fortawesome/
......@@ -10,5 +11,4 @@ assets/popper.js/
assets/slick-carousel/
assets/moment/
assets/css/
.vscode
_data/api_fetch/
\ No newline at end of file
_data/api_fetch/
{
"prettier.tabWidth": 4,
"prettier.printWidth": 120,
"prettier.disableLanguages": ["html", "yaml"]
}
......@@ -8,7 +8,7 @@
<div class="row justify-content-center">
<div class="col-12 col-sm-8 d-flex flex-column align-items-center">
<h3 class="text-center">404 Page not found</h3>
<img src="{{ '/assets/img/wall-404.svg' | prepend: site.url }}" class="img-fluid w-75 w-sm-50 py-3" alt="404 Not Found" />
<img src="{{ '/assets/img/wall-404.svg' | absolute_url }}" class="img-fluid w-75 w-sm-50 py-3" alt="404 Not Found" />
<div class="w-100 py-3 px-3">
<p>The requested page could not be found. If you feel this is not normal, then you create an issue on the Gitlab.</p>
<a href="javascript:window.history.go(-1);" class="btn btn-sm btn-primary" role="button">Go Back</a>
......
......@@ -8,21 +8,21 @@ Therefore this document suggests what we consider ideal behaviour, so you know w
### Advice
* Be respectful and considerate:
* Disagreement is no excuse for poor behaviour or personal attacks. Remember that a community where people feel uncomfortable is not a productive one.
* Be patient and generous:
* If someone asks for help it is because they need it. Do politely suggest specific documentation or more appropriate venues where appropriate, but avoid aggressive or vague responses such as "RTFM".
* Assume people mean well:
* Remember that decisions are often a difficult choice between competing priorities. If you disagree, please do so politely.
* If something seems outrageous, check that you did not misinterpret it. Ask for clarification, but do not assume the worst.
* Try to be concise:
* Avoid repeating what has been said already. Making a conversation larger makes it difficult to follow, and people often feel personally attacked if they receive multiple messages telling them the same thing.
- Be respectful and considerate:
- Disagreement is no excuse for poor behaviour or personal attacks. Remember that a community where people feel uncomfortable is not a productive one.
- Be patient and generous:
- If someone asks for help it is because they need it. Do politely suggest specific documentation or more appropriate venues where appropriate, but avoid aggressive or vague responses such as "RTFM".
- Assume people mean well:
- Remember that decisions are often a difficult choice between competing priorities. If you disagree, please do so politely.
- If something seems outrageous, check that you did not misinterpret it. Ask for clarification, but do not assume the worst.
- Try to be concise:
- Avoid repeating what has been said already. Making a conversation larger makes it difficult to follow, and people often feel personally attacked if they receive multiple messages telling them the same thing.
### Applies to
* [GNOME Bugzilla](http://bugzilla.gnome.org/)
* [GNOME mailing lists](http://mail.gnome.org/)
* [Individuals](https://wiki.gnome.org/Foundation/CodeOfConduct/Signatures/) who have signed our list.
- [GNOME Bugzilla](http://bugzilla.gnome.org/)
- [GNOME mailing lists](http://mail.gnome.org/)
- [Individuals](https://wiki.gnome.org/Foundation/CodeOfConduct/Signatures/) who have signed our list.
### Code of Conduct Committee
......@@ -31,4 +31,5 @@ The [Code of Conduct Committee][code-of-conduct-committee] is appointed by the G
The [committee's page][code-of-conduct-committee] has links to the Codes of Conduct for conferences, events, our photography policy, and the incident response guidelines for organizers.
<!-- markdown variables -->
[code-of-conduct-committee]: https://wiki.gnome.org/CodeOfConductCommittee/
\ No newline at end of file
[code-of-conduct-committee]: https://wiki.gnome.org/CodeOfConductCommittee/
......@@ -17,29 +17,47 @@ As for everything else in the project, the contributions to GTK.org are governed
## What can you contribute
GTK.org is an open source project and we love to receive contributions from our community — you! You can contribute to the GTK.org in any way you want, that has the potential to make GTK.org a better website. Some common ways to contribute are listed below:
* Improving documentation
* Bug Tracking
* Feature Requests
* Design Refactoring
* Images and Illustrations
* New Content
* Blog Posts
* Usecase Studies
- Improving documentation
- Bug Tracking
- Feature Requests
- Design Refactoring
- Images and Illustrations
- New Content
- Blog Posts
- Usecase Studies
### Adding Documentation pages
Documentation pages are those which are listed under the `/docs/*` URL pattern.
To add a new documentation page, follow the steps below:
#### To add a new documentation section, follow the steps below:
1. Create a new directory under `_docs` with all letters lowercase.
2. Add `index.md` to this new directory that you created in the abpve step and add the following to allow Jekyll to convert the Markdown files into HTML format:
```
---
---
```
3. Send a merge request using one of the merge request template.
#### To add a new documentation page, follow the steps below:
1. Add a new `.md` file with the following naming convention:
* `<doc-page-name>.md` where `<doc-page-name>` is the name of the page. (Name should be assigned according to how it will appear in the URL)
2. In this new Markdown file, add the following front matter along with the file's content:
- `<doc-page-name>.md` where `<doc-page-name>` is the name of the page. (Name should be assigned according to how it will appear in the URL)
2. In this new Markdown file, add the following to allow Jekyll to convert the Markdown files into HTML format:
```
permalink: /path/to/:name
# specifies the URL path of the file which will be appended to the site's url
---
---
```
3. Add the information about the new file to [\_data/stuff.yml](_data/stuff.yml).
4. Send a merge request using one of the merge request template.
3. Send a merge request using one of the merge request template.
> If want a more detailed explanation about how to do the thing, you can check this [blog post](https://ravgeetdhillon.github.io/blog/adding-pages-to-jekyll-site/) by [Ravgeet Dhillon](https://gitlab.gnome.org/ravgeetdhillon/) on how to add documentation pages to the GTK website.
......@@ -50,9 +68,10 @@ All the images and illustrations are present in the [assets/img][image-directory
`<role>-<name>.<ext>`
where
* `<role>` is the context for which the image is used in the website. For example if the image is going to be used in documentation pages, the `<role>` would be doc
* `<name>` is the name of the image. (Make sure that you provide a unique name for the image)
* `<ext>` is the extension of the image. Valid extensions are `.jpg`, `.jpeg`, `.svg`, `.png` and others. (Make sure that the images/illustrations you provide are optimized for size and quality)
- `<role>` is the context for which the image is used in the website. For example if the image is going to be used in documentation pages, the `<role>` would be doc
- `<name>` is the name of the image. (Make sure that you provide a unique name for the image)
- `<ext>` is the extension of the image. Valid extensions are `.jpg`, `.jpeg`, `.svg`, `.png` and others. (Make sure that the images/illustrations you provide are optimized for size and quality)
> A valid image name for an image to be used as a wallpaper or just a display image is: `wall-computer.png` or `wallpaper-computer.png`
......@@ -63,51 +82,68 @@ All the links and paths are relative to the website URL. Donot give absolute URL
### Adding/Updating/Removing Dependencies
1. Create a local clone of the website:
```
$ git clone https://gitlab.gnome.org/Infrastructure/gtk-web.git
```
2. Change into the gtk-web directory:
```
$ cd gtk-web
```
3. Based on what you want to do, proceed further as given below:
* #### Adding Dependency
To add a new dependency, run the following command:
```
$ npm install <package-name> --save
```
* #### Updating Dependency
To add update a particular dependency, run the following command:
```
$ npm update <package-name> --save
```
To add update all the dependencies, run the following command:
```
$ npm update --save
```
* #### Removing Dependency
To remove a new dependency, run the following command:
```
$ npm uninstall <package-name> --save
```
- #### Adding Dependency
To add a new dependency, run the following command:
```
$ npm install <package-name> --save
```
- #### Updating Dependency
To add update a particular dependency, run the following command:
```
$ npm update <package-name> --save
```
To add update all the dependencies, run the following command:
```
$ npm update --save
```
- #### Removing Dependency
To remove a new dependency, run the following command:
```
$ npm uninstall <package-name> --save
```
## How to submit a contribution
#### For listing bugs
1. Open an issue and provide us with appropriate information using our [Issue Template]().
2. (Optional) If you can solve the issue filed by you, read below on how to submit a pull request.
#### For feature requests
If you find yourself wishing for a something that doesn't exist in GTK.org, you are probably not alone. Open an issue which describes the feature you would like to see, how it would affect the community, and how it should work.
#### For sending Pull Requests
1. Create your own fork of the code.
2. Do the changes in your fork.
3. Send us a pull request with appropriate information using our Pull Request Template.
## Community
You can chat with the core team on IRC. The core is available to discuss about the things that can make the website better.
<!-- markdown variables -->
[code-of-conduct]: CODE_OF_CONDUCT.MD/
[image-directory]: assets/img/
source "https://rubygems.org"
gem "jekyll", "~> 3.8.5"
gem "jekyll", "~> 4.0.0"
group :jekyll_plugins do
gem "jekyll-feed", "~> 0.6"
gem "jekyll-feed"
gem "jekyll-sitemap"
end
......
......@@ -4,40 +4,45 @@ GEM
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
colorator (1.1.0)
concurrent-ruby (1.1.5)
concurrent-ruby (1.1.7)
em-websocket (0.5.1)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
eventmachine (1.2.7)
eventmachine (1.2.7-x64-mingw32)
ffi (1.12.1)
ffi (1.12.1-x64-mingw32)
ffi (1.13.1)
ffi (1.13.1-x64-mingw32)
forwardable-extended (2.6.0)
http_parser.rb (0.6.0)
i18n (0.9.5)
i18n (1.8.5)
concurrent-ruby (~> 1.0)
jekyll (3.8.6)
jekyll (4.0.1)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
i18n (~> 0.7)
jekyll-sass-converter (~> 1.0)
i18n (>= 0.9.5, < 2)
jekyll-sass-converter (~> 2.0)
jekyll-watch (~> 2.0)
kramdown (~> 1.14)
kramdown (~> 2.1)
kramdown-parser-gfm (~> 1.0)
liquid (~> 4.0)
mercenary (~> 0.3.3)
pathutil (~> 0.9)
rouge (>= 1.7, < 4)
rouge (~> 3.0)
safe_yaml (~> 1.0)
jekyll-feed (0.13.0)
terminal-table (~> 1.8)
jekyll-feed (0.15.0)
jekyll (>= 3.7, < 5.0)
jekyll-sass-converter (1.5.2)
sass (~> 3.4)
jekyll-sass-converter (2.1.0)
sassc (> 2.0.1, < 3.0)
jekyll-sitemap (1.4.0)
jekyll (>= 3.7, < 5.0)
jekyll-watch (2.2.1)
listen (~> 3.0)
kramdown (1.17.0)
kramdown (2.3.0)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (4.0.3)
listen (3.2.1)
rb-fsevent (~> 0.10, >= 0.10.3)
......@@ -45,29 +50,32 @@ GEM
mercenary (0.3.6)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (4.0.3)
rb-fsevent (0.10.3)
public_suffix (4.0.6)
rb-fsevent (0.10.4)
rb-inotify (0.10.1)
ffi (~> 1.0)
rouge (3.15.0)
rexml (3.2.4)
rouge (3.22.0)
safe_yaml (1.0.5)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
tzinfo (2.0.1)
sassc (2.4.0)
ffi (~> 1.9)
sassc (2.4.0-x64-mingw32)
ffi (~> 1.9)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
tzinfo (2.0.2)
concurrent-ruby (~> 1.0)
tzinfo-data (1.2019.3)
tzinfo-data (1.2020.1)
tzinfo (>= 1.0.0)
unicode-display_width (1.7.0)
PLATFORMS
ruby
x64-mingw32
DEPENDENCIES
jekyll (~> 3.8.5)
jekyll-feed (~> 0.6)
jekyll (~> 4.0.0)
jekyll-feed
jekyll-sitemap
tzinfo-data
......
......@@ -9,13 +9,13 @@ and maintained using [Jekyll][official-jekyll], a Static Site Generator
developed with Ruby. The site uses following types of files for the content
generation:
* HTML files with extension `.html`
* Markdown files with extension `.md`
- HTML files with extension `.html`
- Markdown files with extension `.md`
The data used by the site is stored in the form of following files:
* YAML files with extension `.yml`
* JSON files with extension `.json`
- YAML files with extension `.yml`
- JSON files with extension `.json`
## Project Structure
......@@ -24,9 +24,7 @@ The data used by the site is stored in the form of following 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
│ ├── sample_codes.yml #codes for language bindings
│ ├── labels.json
│ ├── members_all.json
│ ├── members.json
│ └── labels.json
├── _includes #contains site's include files
│ ├── footer.html #the footer of the site
│ ├── header.html #the meta data of the site
......@@ -37,14 +35,13 @@ The data used by the site is stored in the form of following files:
├── assets #contains site's valuable entities
│ ├── font #contains site's font: Red Hat Display
│ ├── img #contains site's images and illustrations
│ └── scss #contains site's preprocessor stylesheets
│ └── scss #contains site's preprocessor stylesheets
│ ├── colorful.scss #stylesheet for syntax highlighting
│ ├── index.scss #stylesheet for user defined styles
│ ├── markdown.scss #stylesheet for styling the markdown content
│ └── theme.scss #stylesheet for website's theme. Generated from Bootstrap
├── collections #contains the site's collections
│ ├── _pages #contains site's main pages
│ └── _docs #contains pages for GTK documentation section
│ └── theme.scss #stylesheet for website's theme. Generated from Bootstrap
├── _pages #contains site's main pages
├── _docs #contains pages for GTK documentation
├── _config.yml #contains Jekyll settings for the site
├── .gitignore
├── .gitlab-ci.yml #for Gitlab Continuous Integration and Deployment
......@@ -57,7 +54,6 @@ The data used by the site is stored in the form of following files:
├── package-lock.json
├── package.json #contains node dependencies for the site.
├── README.md
├── setuid.html #referenced by GTK's source code
└── setup.sh #script for setting up the website
## Contributing
......@@ -74,21 +70,29 @@ To get the site up and running locally, follow the below steps:
1. Install a full [Ruby development environment](https://jekyllrb.com/docs/installation/).
2. Create a local clone of the website:
```
git clone https://gitlab.gnome.org/Infrastructure/gtk-web.git
```
3. Change into the gtk-web directory
```
cd gtk-web
```
4. Perform the following commands to install dependencies and structure the website properly:
```
chmod +x setup.sh && bash setup.sh
```
5. Build the site and make it available on your local server
```
$ bundle exec jekyll serve
```
6. Browse to [http://localhost:4000](http://localhost:4000) to view the website.
## Dependencies
......@@ -97,16 +101,16 @@ 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:
Package | Version | File | Source
--- | --- | --- | ---
bootstrap | `4.4.1` | [package.json][package.json] | [Github](https://github.com/twbs/bootstrap)
@fortawesome/fontawesome-free | `5.12.0` | [package.json][package.json] | [Github](https://github.com/FortAwesome/Font-Awesome)
jquery | `3.4.1` | [package.json][package.json] | [Github](https://github.com/jquery/jquery)
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/)
moment | `2.24.0` | [package.json][package.json] | [Github](https://github.com/moment/moment/)
node-sass | `4.13.1` | [package.json][package.json] | [Github](https://github.com/sass/node-sass/)
jekyll | `3.8.5` | [Gemfile][Gemfile] | [Github](https://github.com/jekyll/jekyll/)
| Package | Version | File | Source |
| ----------------------------- | -------- | ---------------------------- | ----------------------------------------------------- |
| 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) |
| 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/) |
| 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/) |
| jekyll | `4.0.1` | [Gemfile][gemfile] | [Github](https://github.com/jekyll/jekyll/) |
Read about adding/updating/removing dependencies on [how to contribute](CONTRIBUTING.MD#addingupdatingremoving-dependencies).
......@@ -130,19 +134,21 @@ the other hand is performed only on `master` branch.
You can reach out to the following individuals if you have any doubt or suggestion regarding the GTK.org:
**Ravgeet Dhillon**
* You can contact me via my [email](mailto:ravgeetdhillon@gmail.com) or through my [website](https://ravgeetdhillon.github.io).
* You can also find me on IRC. I am `ravgeetdhillon` on `irc.gnome.org` in the `#gtk` or
`#gnome-hackers` channels.
- You can contact me via my [email](mailto:ravgeetdhillon@gmail.com) or through my [website](https://ravgeetdhillon.github.io).
- You can also find me on IRC. I am `ravgeetdhillon` on `irc.gnome.org` in the `#gtk` or
`#gnome-hackers` channels.
**Emmanuele Bassi**
* You can contact me via my [email](mailto:ebassi@gnome.org).
- You can contact me via my [email](mailto:ebassi@gnome.org).
## Code of Conduct
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
experience level, age, gender, identity, race, religion, or nationality. We
experience level, age, gender, identity, race, religion, or nationality. We
expect all contributors to uphold the [Code of Conduct][code-of-conduct].
## License Information
......@@ -150,10 +156,11 @@ expect all contributors to uphold the [Code of Conduct][code-of-conduct].
GTK.org is licensed under the [Creative Commons BY-SA-4.0][license].
<!-- markdown variables -->
[contributing]: CONTRIBUTING.MD
[code-of-conduct]: CODE_OF_CONDUCT.MD
[official-jekyll]: https://jekyllrb.com
[package.json]: package.json
[Gemfile]: Gemfile
[gemfile]: Gemfile
[license]: LICENSE.txt
[gtk-gitlab]: https://gitlab.gnome.org/GNOME/gtk/
......@@ -21,7 +21,6 @@ twitter_username: GTKtoolkit
# the current stable version of GTK
website_repo: https://gitlab.gnome.org/Infrastructure/gtk-web
# jekyll configuration options
# baseurl: 'www.gtk.org'
......@@ -30,7 +29,7 @@ encoding: utf-8
# markdown converter
markdown: kramdown
kramdown:
kramdown:
parse_block_html: true
input: GFM # github flavored markdown
auto_ids: true
......@@ -44,7 +43,7 @@ plugins:
- jekyll-sitemap
# exclude these files from production site
exclude:
exclude:
- documents/
- node_modules/
- Gemfile
......@@ -58,9 +57,6 @@ exclude:
- '*.sh'
- gtk-web.doap
# folder which contains all the collections
collections_dir: collections
collections:
docs:
output: true
......@@ -71,16 +67,17 @@ defaults:
- scope:
type: docs
values:
permalink: /docs/:path
layout: documentation
navbar_type: dark
# website statistics
# Fill in your Google Analytics gtag.js ID to track your website using gtag
gtag: ""
gtag: ''
# Fill in your Google Analytics ID to track your website using GA
google_analytics: ""
google_analytics: ''
# Google Tag Manager ID
gtm: ""
gtm: ''
{
"name": {
"_xml:lang": "en",
"__text": "gtk"
},
"shortname": "gtk",
"shortdesc": {
"_xml:lang": "en",
"__text": "Multi-platform toolkit"
},
"description": {
"_xml:lang": "en",
"__text": "GTK is a multi-platform toolkit for creating graphical user\ninterfaces. Offering a complete set of widgets, GTK is suitable for\nprojects ranging from small one-off tools to complete application\nsuites.\n\nGTK has been designed from the ground up to support a range of\nlanguages, not only C. Using GTK from languages such as Perl, \nPython, JavaScript, C++, Rust, and many more, and it provides\nan effective method of rapid application development.\n\nGTK is free and open source software, released under the terms of the GNU Lesser General Public License,\nand can be used by all developers, including those developing proprietary software, without\nany license fees or royalties."
},
"homepage": {
"_rdf:resource": "http://www.gtk.org/"
},
"license": {
"_rdf:resource": "http://usefulinc.com/doap/licenses/lgpl"
},
"bug-database": {
"_rdf:resource": "https://gitlab.gnome.org/GNOME/gtk/issues/"
},
"download-page": {
"_rdf:resource": "http://download.gnome.org/sources/gtk+/"
},
"mailing-list": [
{
"_rdf:resource": "http://mail.gnome.org/mailman/listinfo/gtk-list"
},
{
"_rdf:resource": "http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list"
},
{
"_rdf:resource": "http://mail.gnome.org/mailman/listinfo/gtk-devel-list"
},
{
"_rdf:resource": "http://mail.gnome.org/mailman/listinfo/gtk-doc-list"
},
{
"_rdf:resource": "http://mail.gnome.org/mailman/listinfo/gtk-i18n-list"
},
{
"_rdf:resource": "http://mail.gnome.org/mailman/listinfo/gtk-perl-list"
},
{
"_rdf:resource": "http://mail.gnome.org/mailman/listinfo/language-bindings"
}
],
"category": {
"_rdf:resource": "http://api.gnome.org/doap-extensions#core"
},
"programming-language": "C",
"repository": {
"GitRepository": {
"browse": {
"_rdf:resource": "https://gitlab.gnome.org/GNOME/gtk/"
},
"location": {
"_rdf:resource": "https://gitlab.gnome.org/GNOME/gtk.git"
}
}
},
"maintainer": [
{
"Person": {
"name": {
"__prefix": "foaf",
"__text": "Matthias Clasen"
},
"mbox": {
"_rdf:resource": "mailto:mclasen@redhat.com",
"__prefix": "foaf"
},
"userid": {
"__prefix": "gnome",
"__text": "matthiasc"
},
"__prefix": "foaf"
}
},
{
"Person": {
"name": {