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.
- hackclub.es
- fr.hackclub.com
- zh.hackclub.com
- kr.hackclub.com
- tr.hackclub.com
- hin.hackclub.com
- pl.hackclub.com
- gr.hackclub.com
- ms.hackclub.com
- ur.hackclub.com
- jp.hackclub.com
- thai.hackclub.com
-
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 apages/copy/pt.mdx
file. -
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. -
Edit the locales field in
next.config.js
to include the ISO 639-1 code of your language. -
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: 'jp.hackclub.com', defaultLocale: 'jp', http: true }
a. If you're using a
.hackclub.com
subdomain, submit a PR tohackclub/dns
to add your.hackclub.com
subdomain. Add a record tohackclub.yaml
in the following format:SUBDOMAIN_NAME: - ttl: 1 type: CNAME value: cname.vercel-dns.com.
-
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!