/global

🌍 Hack Club's websites translated for a global audience

Primary LanguageJavaScript

Hack Club Global Websites

The goal of this project is to enable the creation of simplified versions of our Hack Club site that are translated into global languages. These sites should require practically no maintenance and be very brief. An example is hackclub.es.

This site uses Next.js' internationalization and middleware features. MDX is used for content and Theme UI for styling.

Sites

Adding a Site

  1. Create a new MDX file in the pages/copy directory. The name of the file should be the ISO 639-1 code for the language you intend to write the site in. For example, if I was adding a Portuguese site I would create a pages/copy/pt.mdx file.

  2. Add content to the MDX file. Base this off of the content on the Spanish site (view it at pages/copy/es.mdx). It should contain: a headline such as "By the students, for the students", a sentence long description of Hack Club and then a large button pointing to the English site.

  3. Edit the locales field in next.config.js to include the ISO 639-1 code of your language.

  4. Add your domain to the domains field in next.config.js following the format below. Unless we have acquired a special domain for the site you are adding, use a .hackclub.com subdomain.

    {
      domain: 'japan.hackclub.com',
      defaultLocale: 'jp',
      http: true
    }
  5. Make a PR to this repo! The maintainers will support you in setting up the domain for hosting.

Reach out to @sampoder on Slack if you need any support. Thank you for your help!