Skip to content

Commit d6b69df

Browse files
florantaradkundel
authored andcommitted
documentation updates
1 parent 3b319b8 commit d6b69df

File tree

4 files changed

+23
-7
lines changed

4 files changed

+23
-7
lines changed

README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ Each Function lives in its own directory within this repo. The easiest way to us
1616

1717
[Complete list of available functions](docs/templates.md)
1818

19-
## Github Pages
20-
21-
The Quick Deploy Functions in this repo contain an `index.html` asset that is displayed after a deployment succeeds. That `index.html` file is served by the Function itself, but several static assets shared by every `index.html` are served by Github Pages from the `/docs/static` directory of this repo. These files all follow [semver](https://semver.org/) versioning, and are located in a subdirectory of `/docs/static` named after their semver major version number. For example, a file of version `1.2.3` should have a comment header containing `Version: 1.2.3` (if possible), and be located in the `v1` subdirectory of `/docs/static`.
22-
2319
### Todo
2420

2521
- [ ] Forward message to email with other API providers

docs/CONTRIBUTING.md

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,31 @@ If you _do not_ want an environment variable to appear on the CodeExchange page,
9090

9191
**Note**: All function templates are checked for the presence of a `.env.example` or a `.env` file by `npm test`. If a test named `should have a .env.example (or .env) file` fails, ensure that your function template's `.env` file exists and `git add` has been used to add it to your commit. If your function template lacks environment variables, commit an empty `.env` file. If the test is failing due to a directory that is not a function template, add that directory to the `excludedPaths` variable in `test/all-templates.test.js`.
9292

93-
### Updating the `index.html`
93+
## The `index.html` file
9494

95-
If your app has a front-end component to it, you can override the existing `index.html` file in your project.
95+
The Quick Deploy Functions in this repo contain an `index.html` asset that is displayed after a deployment succeeds. That `index.html` file is served by the Function itself.
9696

97-
In case your app does not contain a front-end component you should update the `index.html` file to reflect what steps a customer should perform to make the app work, once your template has been deployed.
97+
If your app has a front-end component to it, you can override the existing `index.html` file in your project, and if it doesn't you should update the `index.html` file to reflect what steps a customer should perform to make the app work once your template has been deployed.
98+
99+
### Github Pages
100+
Several static assets shared by every `index.html` are served by Github Pages from the `/docs/static` directory of this repo. These files all follow [semver](https://semver.org/) versioning, and are located in a subdirectory of `/docs/static` named after their semver major version number. For example, a file of version `1.2.3` should have a comment header containing `Version: 1.2.3` (if possible), and be located in the `v1` subdirectory of `/docs/static`.
101+
102+
### Helpers
103+
In the shared `/docs/static` folder there's JavaScript and CSS helpers to achieve things like:
104+
- Style buttons, inputs and general elements on the page based on the [Paste design system](https://paste.twilio.design/).
105+
- Prepend the Base URL of functions to inputs
106+
- Handle Copy to Clipboard on inputs
107+
108+
### Server-rendered elements
109+
These comments will be replaced at build time and will result in the following:
110+
111+
`<!-- APP_INFO_V2 -->`:
112+
113+
![APP_INFO_V2](../docs/images/APP_INFO_V2_comment.png)
114+
115+
`<!-- EDIT_CODE -->`:
116+
117+
![EDIT_CODE](../docs/images/EDIT_CODE_comment.png)
98118

99119
### Adding yourself to `.owners`
100120

docs/images/APP_INFO_V2_comment.png

20.8 KB
Loading

docs/images/EDIT_CODE_comment.png

15.9 KB
Loading

0 commit comments

Comments
 (0)