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.
-
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: 'japan.hackclub.com', defaultLocale: 'jp', http: true }
-
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!