How to build a company directory and profile pages
Add company browse, search, profile, jobs, similar companies, markets, and salary pages.
A
JCompany pages turn isolated listings into an employer directory. Build a browse/search route, one canonical profile route, and related job and salary sections. All reads are public; feature and entitlement flags still decide whether each surface appears.
Browse with numbered pages
1234567const page = Math.max(1, Number(searchParams.page ?? '1'));const limit = 24;const companies = await board.companies.list({limit,offset: (page - 1) * limit,});
Preserve filters and search terms when linking to another page. Disable “next” when the response contains no further results; do not invent a total when the envelope does not provide one.
Search when the visitor supplies a query
123const companies = query? await board.companies.search({ query, limit: 24 }): await board.companies.list({ limit: 24, offset: 0 });
Use one canonical directory URL and encode query state in search parameters. Search result pages with arbitrary queries should generally not become separate canonical landing pages.
Compose a company profile
123456const [company, jobs, similar, salaries] = await Promise.all([board.companies.retrieve(companySlug),board.companies.listJobs(companySlug, { limit: 12 }),board.companies.similar(companySlug, { limit: 6 }),board.companies.salaries(companySlug, { limit: 12 }),]);
Render the employer description, verified links, markets, locations, open jobs, salary data, and related companies only when returned. Map a typed not-found error to the framework’s 404 boundary.
Add market landing pages
Resolve a market slug before using it as a filter:
12345const market = await board.companies.markets.resolve(marketSlug);const companies = await board.companies.list({marketSlug: market.sourceSlug,limit: 24,});
If market.redirectTo is present, redirect to that canonical route. Otherwise use market.sourceSlug for the list filter. Redirect aliases instead of publishing duplicates.
Verify the company journey
- Search for a known employer and confirm its profile links to the canonical company route.
- Change
pageand confirm the offset changes by exactly the page size without duplicate cards. - Open an unknown company and confirm a native 404 response.
- Confirm closed jobs disappear from the open-jobs section after the public cache revalidates.
- Inspect raw HTML for canonical metadata on directory, market, and profile routes.
Continue with Blog and editorial pages to add durable search landing content around the catalog.