You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Convert website to static GitHub Pages deployment
- Remove German language support, keep only English
- Configure Next.js for static export with GitHub Pages basePath support
- Add asset path utility function for proper GitHub Pages URL handling
- Update all hardcoded asset paths to use dynamic basePath
- Fix font URLs to work with GitHub Pages
- Add .nojekyll file to prevent GitHub Pages from ignoring _next files
- Update package.json with export script
- Remove German translation files and city data
- Format code with prettier
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Remove Vercel deployment configuration
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Replace Vercel workflow with GitHub Pages deployment
- Remove Vercel-specific GitHub Actions workflow
- Add GitHub Pages deployment workflow with proper Next.js static export
- Configure automatic deployment on push to master/main branches
- Use GitHub's official actions for Pages deployment
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Fix ESLint configuration for styled-jsx and dev server
- Add ignore rules for styled-jsx properties (jsx, global)
- Disable explicit-module-boundary-types warnings
- Fix React version detection in ESLint settings
- Resolves dev server startup issues with linting errors
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Add github-pages-new branch to deployment workflow
- Include github-pages-new branch in GitHub Pages workflow triggers
- Allows testing deployment from feature branch before merging
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Update GitHub Actions to latest versions
- Update actions/upload-pages-artifact from v2 to v3
- Update actions/deploy-pages from v2 to v4
- Fixes deprecated action version errors
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Fix static export configuration for GitHub Pages
- Add 'output: export' to next.config.js
- Ensures out/ directory is generated during build
- Fixes GitHub Actions artifact creation error
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Fix static export for Next.js 12 and GitHub Pages
- Remove output: 'export' config (Next.js 12 doesn't support it)
- Update export script to run 'next build && next export'
- Convert getInitialProps to getStaticProps/getStaticPaths for cities
- Remove getInitialProps from withLocale container and _document
- Fix data serialization in cities getStaticProps
- Update GitHub Actions workflow to use export command
- Successfully generates static files in out/ directory
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Fix hardcoded image paths for GitHub Pages deployment
Update all remaining hardcoded asset paths to use assetPath utility for proper GitHub Pages basePath support:
- CityHero component background images
- Meta component favicons and manifest links
- MarkdownTeam component member images
- Cities page social icons and about images
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Fix font paths for GitHub Pages basePath support
Update global CSS font declarations to use dynamic basePath for GitHub Pages deployment:
- Add environment detection for GitHub Actions
- Use GITHUB_REPOSITORY to extract repository name for basePath
- Apply basePath to OpenSans, Roboto, and Material Icons font URLs
- Ensures fonts load correctly when deployed with basePath on GitHub Pages
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Update README with GitHub Pages deployment instructions
- Replace outdated Zeit.co deployment information
- Add detailed instructions for building with GitHub Pages basePath locally
- Include environment variables needed for proper GitHub Pages build
- Explain difference between local and GitHub Pages builds
- Document asset path behavior with basePath configuration
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Remove Slack references from README
- Remove Slack channel mentions from contribution guidelines
- Replace Slack communication with GitHub issue discussions
- Encourage using GitHub issues for help and collaboration
- Simplify communication channels to focus on GitHub-based workflow
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Fix client-side navigation font loading issue
Add font preloading to _document.tsx to ensure fonts are cached during initial page load, preventing FOUT during client-side navigation. The preload links use environment-aware basePath detection for proper GitHub Pages deployment.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Update branch in deploy config
* Make build-time env vars available during runtime
* Make custom domain configurable in deploy config
* Prepare for custom domain
* CR
---------
Co-authored-by: Claude <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+49-22Lines changed: 49 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,11 +25,11 @@ If you want to contribute but don't know on what to work on, check our github is
25
25
26
26
If you are beginner, search for the label `good first issues`.<br />
27
27
Assign the issue to your self and when you are done, make a PR to review.<br />
28
-
Always feel free to reach out for help. You can write in the issue it self, you can open a PR as draft and ask suggestion about your code or you can contact us on [slack](https://opentechschool-slack.herokuapp.com) in the #website-dev channel.
28
+
Always feel free to reach out for help. You can write in the issue itself, you can open a PR as draft and ask suggestion about your code.
29
29
30
-
### Requisit:
30
+
### Requirements:
31
31
32
-
`Node version > 9`
32
+
`Node version >= 12` (recommended: Node 18+ or 20+)
Markdown for city can be found in data/cities.<br />
75
-
Inside this folder you will find subfolders based on language. Each city must have at least english language to be visible.<br />
76
-
Add as many language as you wish for your city. The files must have always the same name: `city-name.md`.<br />
74
+
Markdown for city can be found in `data/cities/en/`.<br />
75
+
Each city file should be named `city-name.md` and placed in the English directory.<br />
77
76
If you want to add a city that is currently inactive, just add `is_inactive` to the markdown.
78
77
79
78
Each city **MUST HAVE**:
@@ -116,26 +115,21 @@ members:
116
115
117
116
### Translation
118
117
119
-
Translation are located in `translations/`. Here there are some configuration and typescript file needed to make translation works but most important there are `json` files for each language.<br />
120
-
Those are translation for all the website except the city page.<br />
121
-
If you create new content, please remember to add your text to those files, at least to the english translation.
118
+
Translations are located in `translations/` directory. The website currently supports English only after the conversion to static site generation.<br />
119
+
If you create new content, please remember to add your text to the `en.json` translation file.
122
120
123
-
If you add a new language add a `yourLanguage.json` file in the `translations/` directory and remember to add your language to the `config.ts` files to make it available to the `<LocalSwitcher />`
121
+
To use translations in a component, use the `t()` function from the `useTranslation` hook:
124
122
125
-
If you want to use translation in a file, you can use the `t()` function, which it takes as a argument the string to translate from the language jons file.<br />
126
-
Example:
127
-
In my `en.json` i have such string:
123
+
```javascript
124
+
importuseTranslationfrom'../hooks/useTranslation'
128
125
129
-
```
130
-
"about": {
131
-
"title": "About OTS"
126
+
constMyComponent= () => {
127
+
const { t } =useTranslation()
128
+
return<h1>{t('about.title')}</h1>
132
129
}
133
130
```
134
131
135
-
in my `about.tsx` page i can use the `t` function like that: `t('about.title')`.
136
-
`t()` function always fall back to english. If the translation doesn't exists even in the `en.json` file, you will see printed the string of your translation (i.e. `about.title`) and a warning will show up in your console.
137
-
138
-
`t()` function can be extracted form the `useTranslation` hook and in order to be effective in a page, the page must be wrapped with the `WithLocale()` HOC.
132
+
The `t()` function takes a key from the `en.json` file and falls back to displaying the key if translation is missing.
139
133
140
134
### Conventions
141
135
@@ -151,7 +145,40 @@ Yet, we avoid using javascript-in-css as much as possible therefore it will be e
151
145
152
146
## Deployment
153
147
154
-
This website is being deployed to [Zeit.co](https://zeit.co/) on the free team account https://zeit.co/opentechschool. Every push to master goes live automatically via their Github integration.
148
+
This website is deployed to GitHub Pages. Every push to the `github-pages-new` branch automatically triggers the GitHub Actions workflow that builds and deploys the static site.
149
+
150
+
### Building for GitHub Pages Locally
151
+
152
+
To test the GitHub Pages build locally with the correct basePath configuration:
153
+
154
+
Note: We are using `out` instead of `websitenext`, but the github action will copy files from `out` to `websitenext`
155
+
156
+
```bash
157
+
# Build and export with GitHub Pages environment variables
158
+
GITHUB_ACTIONS=true GITHUB_REPOSITORY=OpenTechSchool/out npm run build
159
+
GITHUB_ACTIONS=true GITHUB_REPOSITORY=OpenTechSchool/out npx next export
160
+
161
+
# The static files will be generated in the 'out' directory
162
+
# All asset paths (images, fonts, links) will include the /out basePath
163
+
```
164
+
165
+
**Important:** When building for GitHub Pages, the build process:
166
+
167
+
- Adds `/websitenext` basePath to all asset URLs
168
+
- Configures static export for proper GitHub Pages deployment
169
+
- Ensures fonts, images, and internal links work correctly with the repository's subpath
170
+
171
+
For local development without basePath, use the standard commands:
172
+
173
+
```bash
174
+
npm run dev # Development server
175
+
npm run build # Production build (local)
176
+
npm run export# Static export (local)
177
+
```
178
+
179
+
### Using a custom domain
180
+
181
+
Set `CUSTOM_DOMAIN` to true in `deploy-github-pages.yml` when using a custom domain e.g. opentechschool.org
155
182
156
183
## Contact
157
184
@@ -161,4 +188,4 @@ Feel free to open a new issue here on github. Try to label it as best as you can
161
188
Have an idea and already know how to develop it? Go ahead and make a PR, we are very happy to review it.
162
189
163
190
Have an idea but would like to talk to someone to know how to better proceed?
164
-
Join us on [slack](https://opentechschool-slack.herokuapp.com): channel #website-dev
191
+
Feel free to open a GitHub issue to discuss your ideas and get guidance on implementation.
0 commit comments