Skip to content

Commit 0b568e7

Browse files
committed
Adds some more docs to the website
1 parent ba1d3f1 commit 0b568e7

4 files changed

Lines changed: 46 additions & 9 deletions

File tree

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ Some useful knowledge:
3030

3131
You can manually via GH Actions for [production here](https://github.com/microsoft/TypeScript-Website/actions?query=workflow%3A%22Monday+Website+Push+To+Production%22) and [staging here](https://github.com/microsoft/TypeScript-Website/actions?query=workflow%3A%22Build+Website+To+Staging%22).
3232

33+
Having issues getting set up? [Consult the troubleshooting](./docs/Setup Troubleshooting.md).
34+
3335
## Deployment
3436

3537
Deployment is automatic:
@@ -39,9 +41,14 @@ Deployment is automatic:
3941

4042
You can find the build logs in [GitHub Actions](https://github.com/microsoft/TypeScript-Website/actions)
4143

42-
## Overview
44+
## Docs
45+
46+
If you want to know _in-depth_ how this website works, there is an [hour long video covering the codebase, deployment and tooling on YouTube.](https://www.youtube.com/watch?v=HOvivt6B7hE). Otherwise there are some short guides:
4347

44-
If you want to know _in-depth_ how this website works, there is an [hour long video covering the codebase, deployment and tooling on YouTube.](https://www.youtube.com/watch?v=HOvivt6B7hE).
48+
- [Converting Twoslash Code Samples](./docs/Converting Twoslash Code Samples.md)
49+
- [How i8n Works For Site Copy](./docs/How i8n Works For Site Copy.md)
50+
- [Updating the TypeScript Version](./docs/New TypeScript Version.md)
51+
- [Something Went Wrong](./docs/Something Went Wrong.md)
4552

4653
# Website Packages
4754

docs/New TypeScript Version.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,21 @@ Then run `yarn install`.
3737

3838
That will update all of the site to use 3.9.0 for building. Run `yarn build` to see if any of the website's code broke.
3939

40+
##### New Handbook Docs
41+
42+
You might have a new reference doc to add, they live in [`packages/documentation/copy`](https://github.com/microsoft/TypeScript-website/blob/v2/packages/documentation/copy). You can ignore languages other than `en`. The folder structure is only for your reference and has no bearing on the site navigation. Each markdown document needs a header like:
43+
44+
```md
45+
---
46+
title: Basic Types
47+
layout: docs
48+
permalink: /docs/handbook/basic-types.html
49+
oneline: "Step one in learning TypeScript: The basic types."
50+
---
51+
```
52+
53+
Or the site will fail the build. Once that file is ready, add it to the sidebar via the file [`packages/documentation/scripts/generateDocsNavigationPerLanguage.js`](https://github.com/microsoft/TypeScript-website/blob/v2/packages/documentation/scripts/generateDocsNavigationPerLanguage.js).
54+
4055
##### TSConfig Reference
4156

4257
Updating the version of TypeScript will force you to update the TSConfig Reference. It will fail incrementally with each missing compiler flag.

docs/Setup Troubleshooting.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
## Getting this Repo Set Up Troubleshooting
2+
3+
#### Module `x` is not built
4+
5+
Sometimes, and it's not been tracked down exactly, some dependencies of the site aren't built even though it says they are. In those cases, re-run `yarn bootstrap` and `yarn build` to re-build all the internal site deps.
6+
7+
#### No syntax highlighting
8+
9+
By default the website runs without twoslash code samples being evaluated, this affects the syntax highlighting. To turn it on, use `yarn start-twoslash` instead of `yarn start`.
10+
11+
#### Windows + Watchman
12+
13+
The Windows support for watchman is a bit meh. It's not likely to get better, given how well WSL works now. So, you _could_ use WSL to work around that.
14+
15+
Though, for _a lot_ of changes to the site: Watchman is optional. All the watchman script does is run `yarn workspace [xxyy] build` when you save in a package which is not `typescriptlang-org` (the gatsby website).
16+
17+
To run the site without watchman, use `yarn workspace typescriptlang-org start`.

docs/Something Went Wrong.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,13 @@ We're currently running on App Service, the places where you can find info:
1818

1919
### Deployment
2020

21-
The build to deploy train looks like this:
21+
The build to deploy train normally looks like this:
2222

23-
- `v2` branch gets pushed
24-
- pushes trigger a deploy to `SITE-STAGING` via GH Actions
25-
- Azure picks up pushes to SITE-STAGING to deploy to the site
23+
- `v2` branch gets pushed:
24+
- A deploy is made to azure blob storage via [`.github/workflows/v2-merged-staging.yml`](https://github.com/microsoft/TypeScript-website/blob/v2/.github/workflows/v2-merged-staging.yml)
25+
- Every Monday, a deploy is made from v2 to the production app via [`.github/workflows/deploy-prod.yml`](https://github.com/microsoft/TypeScript-website/blob/v2/.github/workflows/deploy-prod.yml)
2626

27-
We deploy by pushing to the branches [`SITE-STAGING`](https://github.com/microsoft/TypeScript-Website/tree/SITE-STAGING/) and [`SITE-PRODUCTION`](https://github.com/microsoft/TypeScript-Website/tree/SITE-PRODUCTION/) - they should show you exactly what files exist in the deploy
28-
29-
You can push directly to those branches from your local computer if you have a very specific fix
27+
You can deploy `v2` to production anytime via the ["Run workflow" button here](https://github.com/microsoft/TypeScript-Website/actions?query=workflow%3A%22Monday+Website+Push+To+Production%22), so if you have an emergency commit - it goes to `v2` then you can run the action.
3028

3129
App Service apps are configured by [`Web.config`](https://github.com/microsoft/TypeScript-website/blob/92a9585d033e7cf802fae14v22baa73250fd610266/packages/typescriptlang-org/static/Web.config). [Here's a reference on the format](https://hangouts.google.com/call/H553wrJ9d97l2LMpNh9hAEEE). I've seen files (`*.json` & `*.manifest`) be 404s on the site because they were not in the config.
3230

0 commit comments

Comments
 (0)