Website content for definitelytyped.org.
The master branch holds live github.io content generated from the source branch.
The site build with Grunt and generated using docpad, a static site generator complete with watch tasks, development server with LiveReload and many plugins.
-
Use the github web interface to quickly make text edits like updating the guides and the directory. Github will create a fork and you can modify content without leaving your browser.
-
The content is saved as markdown and located in
./src/documents
.
If you like to use your own tools you can follow these steps:
-
Fork the repository.
-
Checkout the
source
branch. -
If you already have a checkout make sure you pull the latest revision.
-
Locate the content your want to change in
./src/documents
. Most of the editable content is in markdown format (some with a.eco
template filter). -
Make your edits and commit your changes. A flat commit with sensible commit-note is appreciated.
-
Push to your changes to your fork.
-
Send a pull request to the
source
branch. -
After review a committer will merge and GitHub Actions will republish the site.
-
See below for the steps to get a local preview (this is not essential for simple markdown edits).
To do structural authoring with a build-preview you can follow the development flow.
Working with the site is done using your commandline terminal and should work on any platform. So it can be bash, shell, cmd.exe or anything else (like WebStorm embedded terminal).
-
Get node.js (
> 0.10.0
) for your local platform, it comes with thenpm
package manager. -
Have the global grunt cli command: run
npm install grunt-cli -g
in your command line. -
You dont need a global docpad install; it comes as local dependency.
-
Fork the repository (or just clone if you got commit access).
-
Checkout the
source
branch. -
Run
npm install
to pull all local dependencies. (this can take a minute)
Use grunt to run various commands.
-
The main tasks are:
-
Run
grunt clean
- remove all generated content. -
Run
grunt watch
- regenerate and start a watch with LiveReload server at http://localhost:9778/ -
Run
grunt build
- regenerate the site for production environment (best to stop the watch if you have it active). -
Run
grunt publish
- build and push to githubmaster
(live at definitelytyped.org). This will ask for your github credentials so you need commit access to the repository (otherwise send a PR with the your source). Make sure you also push the changes tosource
. -
See
grunt -h
or theGruntfile.js
for additional commands.
-
-
Push your changes to the
source
branch (or send a pull request). -
If you like some feedback first then use a fork (or branch).
-
The every commit that lands on
source
will automatically be rebuild and deployed via GitHub Actions. -
Give GitHub Actions a minute or two to deploy the site, then verify your changes.
-
Optional: Fix some typos.
Notes:
-
If you build or watch the content then you might get some yellow
warning
's in the console. These can usually be ignored when docpad telling us that some transforms didn't have any effect: this is correct if you use a template transform (.eco
) but have no template fields in the file (yet). -
⚠️ Direct changes tomaster
branch will be overwritten or discarded so always edit throughsource
!
Contributions are welcome! Check the website for more info, then return here and follow the instructions above.
Copyright (c) 2014 DefinitelyTyped
Licensed under the MIT license.