You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Explained the process for editing reference pages that are not part of the Processing API. Also cleaned up old instructions related to the migration from the old reference.
Copy file name to clipboardExpand all lines: docs/reference.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,9 +25,11 @@ Libraries DFX Export, PDF Export and SVG Export don't have individual references
25
25
26
26
## Adding content to the english reference
27
27
28
-
You should never edit the `/content/references/translations/en` folder, since it is generated directly from JavaDoc comments in the `processing`, `sound` and `video` repo. Instead, make the changes in those repos as explained below.
28
+
The `content/references/translations/en` folder contains two kinds of json files:
29
+
* Processing API documentation: these files are generated from the processing4 repo using the [Doclet script](https://github.com/processing/processing-doclet/blob/main/README.md) as explained below.
30
+
* Java documentation: This includes keywords that are NOT part of the Processing API but good to include as a reference for learners. The `+=` or `/=` operators and some Java keywords like `void` or `static` fall into that category for example. The corresponding json files must be edited manually within the `processing-website` repo.
29
31
30
-
In each source file, look for the `@webref` tag in the block comments. If the tag is there it means that the reference below the comment needs to be on the website so the block comment should be changed to fit the new structure.
32
+
In each source file, look for the `@webref` tag in the block comments. This tag means that the block will be picked up by the Doclet script and converted into a json file to be included on the website.
31
33
32
34
```
33
35
/*
@@ -41,25 +43,23 @@ In each source file, look for the `@webref` tag in the block comments. If the ta
41
43
*/
42
44
```
43
45
44
-
**Description:** this should be the main description of the reference. The description might already be there however it might not be correct (the newest version) so you need to copy it from the XML files located [here](https://github.com/processing/processing-docs/tree/master/content/api_en) under the `<description>` tag.
46
+
**Description:** this should be the main description of the reference. Note: if necessary you can look up the previous reference in the archived XML files located [here](https://github.com/processing/processing-docs/tree/master/content/api_en) under the `<description>` tag.
45
47
46
-
**Advanced description:** this is the advanced description that doesn't go on the webpage but in the in the expanded Java documentation. The advance description starts with an html heading (e.g. `<h3>Advanced:</h3>`). Not every reference contains this part, it case it is there you do not need to change it in any way, just leave it as it is. Advanced description always goes below the Description.
48
+
**Advanced description:** this is the advanced description that doesn't go on the webpage but in the in the expanded Java documentation. The advanced description starts with an html heading (e.g. `<h3>Advanced:</h3>`). Advanced description always goes below the Description, though not every reference has an advanced description.
47
49
48
-
**@webref:** tag that implies the reference goes on the website. It is followed by category and subcategory, if they exist, in the format category:subcategory. The category and subcategory are also in the XML files [here](https://github.com/processing/processing-docs/tree/master/content/api_en) under the <category> and <subcategory> tag. If they don't exist you do not have to add anything.
50
+
**@webref:** tag that implies the reference goes on the website. It is followed by category and subcategory, if they exist, in the format category:subcategory. The category and subcategory are also in the XML files [here](https://github.com/processing/processing-docs/tree/master/content/api_en) under the <category> and <subcategory> tag.
49
51
50
52
**@webBrief:** this is the short version of description, just one sentence which is usually the first sentence of the Description. If the first sentence is too long or doesn't explain the reference, you can change it for a summary of the whole description.
51
53
52
54
**...:** everything else that was already in the comment should stay there below the @webBrief tag
53
55
54
-
When you finish adding all the information, run the following steps:
56
+
When you are done with your edits to the JavaDoc, commit your changes and follow these steps:
55
57
56
-
1. Set up the environment and run the content script following [this instruction](https://github.com/processing/processing-doclet/blob/main/README.md).
58
+
1. Set up the environment and run the content script following [these instructions](https://github.com/processing/processing-doclet/blob/main/README.md).
57
59
58
60
2.[Publish the website](/docs/publish.md)
59
61
60
-
If you are adding content to the reference that does not live in the `processing` source code (such as some Java functions and `=;<>` symbols), do the following steps.
61
-
62
-
_TODO_
62
+
Reminder: If you are adding content to the reference that does not live in the `processing` source code (such as Java keywords and operators), you must manually edit the corresponding json files in `content/references/translations/en`.
63
63
64
64
## Adding examples and examples images for references
0 commit comments