Skip to content

Latest commit

 

History

History
384 lines (268 loc) · 15.1 KB

File metadata and controls

384 lines (268 loc) · 15.1 KB

Contributing

1. Setting Up

Ways to Contribute

If you are new to open source, we recommend reading GitHub's open source guide and their Hello World tutorial.

Feel free to contribute to the Techqueria website in one or more of the following ways and thank you for being willing to help out! 😊

  • Tackle any of the open issues that are labeled help wanted, good first issue or hacktoberfest.
    • If an issue has the label in progress, someone is already working on it.
    • If an issue has the label admin, an admin probably needs to get involved since it requires admin access.
    • Even if an issue has someone assigned, it still might need extra help so check it out if it appeals to you!
  • Open a new issue
  • Report a bug
  • Request a new feature
  • Improve our contributing guidelines (this file) or other documentation
  • Fix typos or grammar errors on pages or across the code base
  • Refactor code
  • Anything else you can think of! 😆

Fork the repo

Fork this repository and clone it locally.

Connect your local to the original "upstream" repository by adding it as a remote.

Pull in changes from "upstream" often so that you stay up to date so that when you submit your pull request, merge conflicts will be less likely.

See more detailed instructions through this GitHub article called "Syncing a Fork".

Installation

If you've never used npm before, we recommend following these instructions to get npm up and running properly.

npm install

This will install all the packages needed to run this website locally.

2. Local Development

Live Server

npm start

This will automatically open a browser tab with the website and BrowserSync will automatically reload the CSS or refresh the whole page, when stylesheets or content changes.

At this point, you are able to preview the website locally and can make changes to the source code.

Our pipeline was inspired by Victor Hugo which is a Hugo boilerplate for creating truly epic websites.

Branding

You can view https://techqueria.org/about/brand as a reference for how we tackle our organization branding.

Service Workers

We are using Workbox to register a service worker on the production version of the website.

A service worker allows users to view the homepage of Techqueria even when they are offline and therefore caches the necessary assets.

❗ If you see a console error complaining about the service worker not registering while developing locally, that's okay! The service worker registration should fail in development since we don't want caching.

Tools

  • Hugo
    • static site generator or CMS
  • Bulma.io
    • design system
  • Gulp
    • asset pipeline
    • PostCSS for Sass compilation
    • ImageMin to optimize images
    • CSSO for CSS minification
  • Webpack
    • asset pipeline
    • Workbox to create a service worker
  • Babel
    • JavaScript compilation and transpilation
  • Twemoji
    • Emoji rendering the same regardless of platform or browser
  • Font Awesome
    • Standardized icons

Platforms

Languages

  • JavaScript
  • SASS
  • HTML
  • TOML
  • JSON

Translations

Content is in the progress of being translated to Español.

Configuration

The language dropdown is located at site/layouts/partials/footer/language-dropdown.html which is referenced at site/layouts/partials/footer/who-we-are.html. It is currently disabled until parent pages are translated.

Language names are configured using site/data/i18n/languages.toml. For now, these only have English and Español but more can be added.

Translated strings can be located at site/i18n/en.toml and site/i18n/es.toml

How to translate content

1. Replace individual strings from the HTML templates in the layouts folder.

Here's an example of translating one string from the who-we-are.html layout template.

The syntax for translated strings in the HTML is {{ i18n "translation_id" }}.

<!-- who-we-are.html -->
<p>{{ i18n "join_us" }}</p>

The translation IDs must be the same in both en.toml and es.toml.

# site/i18n/en.toml
[join_us]
other = "Join us and share your experience with Techqueria."
# site/i18n/es.toml
[join_us]
other = "Únete a nosotros y comparte tu experiencia con Techqueria."
2. Create a separate Markdown file with the language code extension

Here's an example of translating the "Brand" page in Markdown.

So for Markdown pages to be translated in Spanish, add an identical file with .es.md at the end.

site/content/about/brand.md

title: Brand 🎨
description: Download our assets and discover our style guide.

site/content/about/brand.es.md

title: Marca 🎨
description: Descarga nuestros recursos y descubre nuestra guía de estilo.

Directory Structure

├── .github
|  ├──  CODE_OF_CONDUCT.md         // code of conduct
|  ├──  CODEOWNERS                 // automatic reviewers for certain files and directories
|  ├──  CONTRIBUTING.md            // how to contribute
|  ├──  ISSUE_TEMPLATE.md          // template for new issues
|  ├──  PULL_REQUEST_TEMPLATE.md   // template for new pull requests
|  └──  stale.yml                  // configuration for Stale bot
├── .vscode
|  └──  settings.json       // VS Code workspace settings
├── dist                    // (ignored) static files generated and served through Netlify using npm start or npm build
├── site                    // HUGO site folder
|  ├── archetypes           // default post formats
|  ├── content              // content goes here (Markdown files with posts and pages)
|  ├── data                 // languages configuration
|  ├── i18n                 // translations for strings in HTML layouts
|  ├── layouts              // HTML Liquid templates for pages
|  ├── static               // files that go into root of dist directory
|  └── config.toml          // configuration file (Hugo)
├── src                     // folder of assets handled by Gulp/Webpack
|  ├── img                  // images are optimized through Gulp
|  ├── js                   // compressed and transpiled to a single JS file
|  └── sass                 // compressed and compiled to a single CSS file
├── _redirects              // redirect configuration for Netlify
├── .babelrc                // configuration for Babel
├── .editorconfig           // configuration for editors
├── .eslintrc               // configuration for ESLint
├── .gitignore              // ignored files and folders
├── .hound.yml              // configuration for Hound (GitHub integration)
├── .nvmrc                  // configuration for NVM
├── .prettierrc             // configuration for Prettier formatter
├── CNAME                   // domain name
├── gulpfile.babel.js       // configuring Gulp build process for assets
├── LICENSE                 // repo license
├── netlify.toml            // configuration for Netlify deployment
├── package.json            // managing NPM packages
├── README.md               // overview
├── renovate.json           // configuration for Renovate bot
├── webpack.dev.js          // Webpack build configuration for local development
└── webpack.prod.js         // Webpack build configuration for production

Available Commands

References package.json and gulpfile.babel.js

We've covered one of them already - npm start - here are the others.

  • npm build
    • Build production ready files
  • npm build:dev
    • Build local files
  • npm start
    • Local server for development
  • npm start:prod
    • Local server for production ready website
  • npm start:preview
    • Preview draft and future posts.
  • npm lint
    • This will report any ESLint issues within the command line.

Audits

We use Google's Lighthouse to check for performance, accessibility, SEO, our PWA score and to make sure we follow best practices.

If you are using Chrome, Lighthouse is the default audit system so it's easy to use!

Chrome DevTools - Lighthouse

As of October 2018, we have scores of 100 or close to that for every metric and we strive to keep it that way through automated checks in PRs (see more below).

Techqueria - Lighthouse Scores

Deployment

Heads up, you do not need to run this command for development purposes.

npm run build

This will build a static version of the website inside the /dist folder.

This command is just used to handle production deployments through Netlify and does not need to be run locally - refer to netlify.toml and gulpfile.babel.js.

3. Opening a Pull Request

A Good PR

Make sure to do the following when opening your pull request (or PR)

  • include a useful description of your PR after opening it
  • make sure all the checks have been filled out
  • reference any relevant issues or supporting documentation in your PR (for example, "Closes #37.")

Below is an example of what the Markdown for a good PR looks like.

Notice it has a with a description with a reference to an existing issue. It also has all the checks filled in with an x.

This adds a contact form to the website using Bulma - fixes #92.

---

<!-- Thank you for contributing to Techqueria, it is much appreciated! 😊 -->

<!-- Before creating a PR, make sure to verify the following. -->

> ✅️ By submitting this PR, I have verified the following

- [x] Checked to [see if a similar PR has already been opened](https://github.com/techqueria/website/pulls) 🤔️
- [x] Reviewed the [contributing guidelines](https://github.com/techqueria/website/blob/master/.github/CONTRIBUTING.md) 🔍️
- [x] Added my name to the bottom of the list under the **Contributors** section in the [README.md](https://github.com/techqueria/website/blob/master/README.md) with a link to my personal website or GitHub profile 👥️

Checks

We use several GitHub integrations/bots to make it easy to catch errors for every new PR created.

Here's an example of how that would look like for a great PR.

GitHub Checks

GitHub Integrations

Issue Tracker

Waffle.io - Columns and their card count

We are using Waffle.io to track open issues and progress being made.

There are 2 labels being used to track progress - these are used Wafflebot to automate most of the process.

  1. in progress

    Maintainers are responsible for adding the label in progress once someone has decided to take on an open issue.

  2. review

    A PR has been opened and references a specific issue.

Waffle.io Columns

Stale Pull Requests

If after a week you haven't heard from any of the maintainers, please mention @techqueria/admins in the PR.

Questions?

If you have any questions, comments, concerns or general feedback, we're happy to help!

GitHub Mentions

Please make a comment mentioning @techqueria/admins in your issue or PR and one of us will get back to you ASAP.

Slack

If you are part of the Techqueria Slack workspace, we also have a dedicated #website channel for discussion and a #website-gh for GitHub notifications.

Email

If needed, there is also the option of emailing us using organizers@techqueria.org.

Troubleshooting

Error: Cannot find module

Try rm -rf node_modules and then npm install again.

Not seeing changes live

Outdated pages, service worker still loading on local development

Try running npm run clean - this will delete the dist directory.

You can then run npm start to spin up a local server.