The next version of halfstackconf.com. ✨
After forking the repo from GitHub and installing pnpm:
git clone https://github.com/<your-name-here>/halfstackconf-next
cd halfstackconf-next
pnpm install
This repository includes a list of suggested VS Code extensions. It's a good idea to use VS Code and accept its suggestion to install them, as they'll help with development.
You'll now be able to run a local Next.js dev server with:
pnpm dev
To create a full static site build and serve it locally:
pnpm build
pnpm start
Prettier is used to format code. It should be applied automatically when you save files in VS Code or make a Git commit.
Alternately, you can manually format everything with:
pnpm format:write
This package includes several forms of linting to enforce consistent code quality and styling. Each should be shown in VS Code, and can be run manually on the command-line:
pnpm lint
(ESLint with typescript-eslint): Lints JavaScript and TypeScript source filespnpm lint:md
(Markdownlint): Checks Markdown source filespnpm lint:package
(npm-package-json-lint): Lints thepackage.json
filepnpm lint:packages
(pnpm-deduplicate): Deduplicates packages in thepnpm-lock.yml
filepnpm lint:prune
(ts-prune): Detects unused exports in TypeScript source filespnpm lint:spelling
(cspell): Spell checks across all source files
Run TypeScript locally to type check and build source files from src/
into output files in lib/
:
pnpm tsc --watch
You should also see suggestions from TypeScript in your editor.
Sometimes the pnpm-lock.yaml
file can get out of sync if different versions of pnpm are used over time.
When that happens, to refresh it:
- Uninstall pnpm
- Install the latest version of pnpm
rm -rf pnpm-lock.yaml node_modules
- (Optional, for if you want the latest version of everything)
npx npm-check-updates -u
pnpm install
This runs on a cron and picks up changes every 5 minutes. Saving the commands here for reference.
# Stop pm2
pm2 stop "pnpm testbed"
echo "Updating main"
git fetch
git reset --hard origin/main
pnpm install
# Start pm2
pm2 start "pnpm testbed"
This has to be manually run as the website
user. Navigate to the production directory, then:
# Stop pm2
pm2 stop "pnpm production"
echo "Updating main"
git fetch
git reset --hard origin/main
pnpm install
# Start pm2
pm2 start "pnpm production"
Events are all stored in src/data
as .json
files.
src/data/events/index.ts
contains the array of event lines that are listed on the homepage- The `src/data/events/ directory contains a directory for each of those event lines, each of which contains:
current.json
: Data for the current event shown on and linked to by the homepagedefault.json
: Default data for the current event and all historical events in that line20**.json
: Files for each past year in that event line
Event pages read in that data by utilities in src/data/index.ts
.
See src/data/types.ts
for the precise data formats expected.
Adding a new year for an event generally involves changing the event's current year to a historical event, and adding a new current event:
- Copy the event's
current.json
to a file with current year (e.g.2023.json
) - Create a new blank
current.json
copying over any data that's the same year-to-year (most likely:"description"
and"geolocation"
) - Copy over any fields from the past event data to the current event data as they become known
Speaker speaker are stored in order in the event's sessions
data.
Each "by"
field should be given a kebab-case.jpg
image in public/speakers
.
Event sponsors are stored under the "sponsors"
data, within their tier: "complete"
, "large"
, "medium"
, or "small"
.
Each should have a "src"
with a path starting with /logos/
that points to an image under public/images/
.
If the event's sponsorship is available, it should have a "sponsorship"
object with the property "available": true
in its event data.
- Copy and paste an exting event folder into the new slug for the event
- Delete any historical data from the folder
- Modify the event's
default.json
andcurrent.json
for the new event's details - Add the event's slug to
src/data/events/index.ts
- Add branding images and styles for the new event line:
- In
src/components/EventTheme/index.module.css
, add a new class selector for the event slug - Create a new folder for the event's images under
public/events/
- For each of the images referenced in those styles, add it under that new folder
- In
See .github/CONTRIBUTING.md
.
Thanks! 💖