Become a Pro / website · becomeapro.ai / commits / d27a4e23
Normalize Cloudflare library routes to the canonical links new
Pushed by atom-backup to main 29 min ago · written by protomota · d27a4e234d2622fe12dfe92667dd00367e1dc2de · parent 0104128d
11 files changed
cloudflare-worker.mjs changed
| 6 | 6 | |
| 7 | 7 | // One home: the old AI Resource Pro addresses and www all move to becomeapro.ai, keeping the path and query. |
| 8 | 8 | const CANONICAL = 'becomeapro.ai'; |
| 9 | + // Next pre-renders catalog routes without trailing slashes. Normalize public | |
| 10 | + // library links here before looking up a static page; leave API and assets alone. | |
| 11 | + const LIBRARY_WITH_SLASH = /^\/(?:practice|(?:trades|knowledge-work|health-care|driving-and-logistics|service|english|math|teaching)(?:\/[a-z0-9-]+){0,2})\/$/; | |
| 9 | 12 | const OLD_HOSTS = new Set(['www.becomeapro.ai', 'airesourcepro.com', 'www.airesourcepro.com', 'airesource.pro', 'www.airesource.pro']); |
| 10 | 13 | |
| 11 | 14 | export default { |
| ⋯ | ||
| 13 | 16 | const url = new URL(request.url); |
| 14 | 17 | if (OLD_HOSTS.has(url.hostname)) { |
| 15 | 18 | return Response.redirect(`https://${CANONICAL}${url.pathname}${url.search}`, 301); |
| 19 | + } | |
| 20 | + if ((request.method === 'GET' || request.method === 'HEAD') && LIBRARY_WITH_SLASH.test(url.pathname)) { | |
| 21 | + url.pathname = url.pathname.slice(0, -1); | |
| 22 | + return Response.redirect(url.href, 308); | |
| 16 | 23 | } |
| 17 | 24 | const response = await handler.fetch(request, env, ctx); |
| 18 | 25 | const headers = new Headers(response.headers); |
content/lessons/driving-and-logistics/warehouse-and-logistics/reconcile-a-pick-list.mdx changed
| 43 | 43 | |
| 44 | 44 | Switch the quantities and repeat. Give yourself a list with two similar identifiers, one missing piece, and one correctly counted item. Try checking each line in order, then deliberately try checking only the total. Ask what the second method would have missed. |
| 45 | 45 | |
| 46 | - [Explore more practice lessons](/practice/). | |
| 46 | + [Explore more practice lessons](/practice). |
content/lessons/english/work-words/repeat-back-a-request.mdx changed
| 43 | 43 | |
| 44 | 44 | Practice in both roles. As the speaker, correct one part of your partner’s repeat-back. As the listener, say the corrected instruction once more. Then try a request about a deadline rather than a location. The test is whether both people now expect the same action. |
| 45 | 45 | |
| 46 | - [Explore more practice lessons](/practice/). | |
| 46 | + [Explore more practice lessons](/practice). |
content/lessons/knowledge-work/design/design-for-a-quick-read.mdx changed
| 43 | 43 | |
| 44 | 44 | Try moving the direction to its own line before making it larger. Test again with the same distance and a different reader. Try to change one variable at a time so you can see what actually helped. A short label does not excuse low contrast or thin lettering. |
| 45 | 45 | |
| 46 | - [Explore more practice lessons](/practice/). | |
| 46 | + [Explore more practice lessons](/practice). |
content/lessons/knowledge-work/project-management/find-the-blocker.mdx changed
| 43 | 43 | |
| 44 | 44 | Now imagine that one person does both editing and illustration. Your arrows describe the order the work needs, but they do not describe who is free. Rewrite the schedule to avoid assigning that person to two tasks at once. This is why a dependency diagram is a starting point, not proof a real deadline can be kept. |
| 45 | 45 | |
| 46 | - [Explore more practice lessons](/practice/). | |
| 46 | + [Explore more practice lessons](/practice). |
content/lessons/math/measurement-and-fractions/plan-a-cut-list.mdx changed
| 43 | 43 | |
| 44 | 44 | Try a new layout with two 18-inch parts. Keep the cut width the same. Compare the leftover on this new list with the earlier one. If you were working with real stock, you would also confirm usable length, trim allowances and actual cutting width before committing; the ⅛-inch figure belongs to this paper exercise. |
| 45 | 45 | |
| 46 | - [Explore more practice lessons](/practice/). | |
| 46 | + [Explore more practice lessons](/practice). |
content/lessons/service/retail/make-a-clear-handoff.mdx changed
| 43 | 43 | |
| 44 | 44 | Cover your note and have someone else read it aloud. Ask them where they would go first, what they would look for, and what they would tell the customer while checking. If they need you to fill a gap, add only the detail that answers it. |
| 45 | 45 | |
| 46 | - [Explore more practice lessons](/practice/). | |
| 46 | + [Explore more practice lessons](/practice). |
content/lessons/teaching/lesson-design/design-a-five-minute-check.mdx changed
| 43 | 43 | |
| 44 | 44 | If two messages could reasonably be ranked first, ask what detail would settle the choice. Either write a clearer prompt or accept both answers when backed by evidence. Use wrong answers to decide which example to teach next, not just which score to record. |
| 45 | 45 | |
| 46 | - [Explore more practice lessons](/practice/). | |
| 46 | + [Explore more practice lessons](/practice). |
content/lessons/trades/carpentry/square-before-assembly.mdx changed
| 43 | 43 | |
| 44 | 44 | Once you can square the paper frame, make a smaller one with different dimensions and try it again. This time predict which diagonal will shorten when you push one corner. Check the result against your prediction. Keep the exercise on paper; you do not need power tools or a load-bearing assembly. |
| 45 | 45 | |
| 46 | - [Explore more practice lessons](/practice/). | |
| 46 | + [Explore more practice lessons](/practice). |
src/app/page.tsx changed
| 16 | 16 | <h1 className="mt-2 text-[clamp(2.8rem,8vw,4.6rem)] font-bold leading-none tracking-tight">Become a Pro</h1> |
| 17 | 17 | <p className="mt-4 max-w-[32rem] text-xl">Free lessons that teach the useful skills of your trade, step by step.</p> |
| 18 | 18 | <nav aria-label="Start learning" className="mt-5 flex flex-wrap items-center gap-x-5 gap-y-3"> |
| 19 | - <Link href="/practice/" className="inline-block bg-foreground px-4 py-2 text-base font-semibold text-background">Start a practice lesson</Link> | |
| 19 | + <Link href="/practice" className="inline-block bg-foreground px-4 py-2 text-base font-semibold text-background">Start a practice lesson</Link> | |
| 20 | 20 | <a href="#subjects" className="text-base underline">Browse all subjects</a> |
| 21 | 21 | </nav> |
| 22 | 22 | <figure className="mt-7"> |
| ⋯ | ||
| 33 | 33 | <li key={lesson.href}><Link href={lesson.href} className="underline">{lesson.title}</Link> <span className="text-sm text-[var(--ash)]">· {lesson.time}</span></li> |
| 34 | 34 | ))} |
| 35 | 35 | </ul> |
| 36 | - <p className="mt-4"><Link href="/practice/" className="font-semibold underline">See all eight practice lessons</Link></p> | |
| 36 | + <p className="mt-4"><Link href="/practice" className="font-semibold underline">See all eight practice lessons</Link></p> | |
| 37 | 37 | </section> |
| 38 | 38 | <h2 id="subjects" className="mt-10 text-3xl font-bold tracking-tight">Browse all subjects</h2> |
| 39 | 39 |
src/lib/practice.ts changed
| 1 | 1 | export const practiceLessons = [ |
| 2 | 2 | { |
| 3 | 3 | "title": "Check a frame for square", |
| 4 | - "href": "/trades/carpentry/square-before-assembly/", | |
| 4 | + "href": "/trades/carpentry/square-before-assembly", | |
| 5 | 5 | "time": "12 min", |
| 6 | 6 | "outcome": "Catch a skewed rectangle before fastening it." |
| 7 | 7 | }, |
| 8 | 8 | { |
| 9 | 9 | "title": "Plan a cut list that fits", |
| 10 | - "href": "/math/measurement-and-fractions/plan-a-cut-list/", | |
| 10 | + "href": "/math/measurement-and-fractions/plan-a-cut-list", | |
| 11 | 11 | "time": "15 min", |
| 12 | 12 | "outcome": "Use fractions to plan cuts without counting material twice." |
| 13 | 13 | }, |
| 14 | 14 | { |
| 15 | 15 | "title": "Find what’s blocking delivery", |
| 16 | - "href": "/knowledge-work/project-management/find-the-blocker/", | |
| 16 | + "href": "/knowledge-work/project-management/find-the-blocker", | |
| 17 | 17 | "time": "15 min", |
| 18 | 18 | "outcome": "Work out which tasks can happen together and which one controls the finish." |
| 19 | 19 | }, |
| 20 | 20 | { |
| 21 | 21 | "title": "Design a sign people can scan", |
| 22 | - "href": "/knowledge-work/design/design-for-a-quick-read/", | |
| 22 | + "href": "/knowledge-work/design/design-for-a-quick-read", | |
| 23 | 23 | "time": "14 min", |
| 24 | 24 | "outcome": "Make the important message visible before the reader loses interest." |
| 25 | 25 | }, |
| 26 | 26 | { |
| 27 | 27 | "title": "Catch a pick-list mismatch", |
| 28 | - "href": "/driving-and-logistics/warehouse-and-logistics/reconcile-a-pick-list/", | |
| 28 | + "href": "/driving-and-logistics/warehouse-and-logistics/reconcile-a-pick-list", | |
| 29 | 29 | "time": "12 min", |
| 30 | 30 | "outcome": "Compare a request with what’s actually in the bin without hiding a discrepancy." |
| 31 | 31 | }, |
| 32 | 32 | { |
| 33 | 33 | "title": "Hand off an unresolved request", |
| 34 | - "href": "/service/retail/make-a-clear-handoff/", | |
| 34 | + "href": "/service/retail/make-a-clear-handoff", | |
| 35 | 35 | "time": "10 min", |
| 36 | 36 | "outcome": "Give the next person enough detail to act without asking the customer to start over." |
| 37 | 37 | }, |
| 38 | 38 | { |
| 39 | 39 | "title": "Repeat back a work instruction", |
| 40 | - "href": "/english/work-words/repeat-back-a-request/", | |
| 40 | + "href": "/english/work-words/repeat-back-a-request", | |
| 41 | 41 | "time": "8 min", |
| 42 | 42 | "outcome": "Check your understanding without sounding like you are reading a script." |
| 43 | 43 | }, |
| 44 | 44 | { |
| 45 | 45 | "title": "Check whether a lesson worked", |
| 46 | - "href": "/teaching/lesson-design/design-a-five-minute-check/", | |
| 46 | + "href": "/teaching/lesson-design/design-a-five-minute-check", | |
| 47 | 47 | "time": "15 min", |
| 48 | 48 | "outcome": "Write one concrete exercise that tests the skill you meant to teach." |
| 49 | 49 | } |