Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
aea95ce
added gitattributes to disable autocrlf, addressing issue #1234
aceslowman Jul 19, 2022
a25a5d6
made .gitattributes more specific, turning off line ending conversion…
aceslowman Jul 19, 2022
f38305d
specifying binary files whose line endings should go unchanged
aceslowman Jul 20, 2022
22160e0
added full list of binary files that occur in repo
aceslowman Jul 21, 2022
f80be05
Add p5 access day page
Qianqianye Jul 25, 2022
e9f15a6
Automatic update of translation files (f80be05ad708a014f479aeabbed2ef…
Qianqianye Jul 25, 2022
668f3be
Add some p5 access day Chinese translation
Qianqianye Jul 25, 2022
8fbb791
Add transformation matrix 4x4 image
Qianqianye Jul 26, 2022
c8eefd4
Add p5.js x W3C TPAC event on community page
Qianqianye Jul 26, 2022
a8afef6
Translated some libraries in hindi
SarveshLimaye Jul 30, 2022
55d9ca2
Merge pull request #1251 from SarveshLimaye/library-hindi
Qianqianye Jul 31, 2022
218507c
Automatic update of translation files (55d9ca20a3050c81e6b13a64852e66…
Qianqianye Jul 31, 2022
d44b9b2
Added some chinese translation of get started page
liminalpurr Jul 31, 2022
ad59d54
Merge pull request #1252 from unicar9/zh-translation
Qianqianye Aug 1, 2022
2cd9125
Automatic update of translation files (ad59d54e4f08f177a35515b0e28548…
Qianqianye Aug 1, 2022
d20dc51
Add contributed library p5.utils
Qianqianye Aug 1, 2022
5fb9804
Automatic update of translation files (d20dc515fbfa9f7e3c24e800fdf722…
Qianqianye Aug 1, 2022
0c4cd3e
Merge pull request #1238 from aceslowman/gitattributesFix
kjhollen Aug 1, 2022
fa5d50d
Fix a small typoo in the documentation
chrleon Aug 2, 2022
742957d
Merge pull request #1254 from chrleon/patch-1
Qianqianye Aug 2, 2022
41a46ec
Update contributed library instruction
Qianqianye Aug 5, 2022
9f00bf8
Add showcase open call to header
Qianqianye Aug 8, 2022
47dc6a5
Remove p5.accessibility from core libraries
Qianqianye Aug 9, 2022
bc14f44
Automatic update of translation files (47dc6a5afde110679f19f9f206c88c…
Qianqianye Aug 9, 2022
cfcbe97
move social media from sidebar to footer
Qianqianye Aug 13, 2022
931f611
Restore incorrect p5.sound.min.js file
limzykenneth Aug 14, 2022
75a7905
Temporary fix for incorrectly updated files on version update
limzykenneth Aug 14, 2022
19fb9cb
Merge pull request #1258 from limzykenneth/fix-files-update
Qianqianye Aug 16, 2022
ca2372e
Bump moment from 2.29.2 to 2.29.4
dependabot[bot] Aug 16, 2022
b73b18b
Merge pull request #1259 from processing/dependabot/npm_and_yarn/mome…
Qianqianye Aug 16, 2022
3677af8
remove showcase submission link from header
Qianqianye Aug 17, 2022
c0f0dc3
Add more translation steward
Qianqianye Aug 19, 2022
2e463b4
removed showcase submission from home
Divyansh013 Aug 20, 2022
0ea25d7
Merge pull request #1263 from Divyansh013/main
Qianqianye Aug 20, 2022
d973b07
Remove broken links
Qianqianye Sep 3, 2022
1b9c76e
Replace grunt-html with htmlhint
limzykenneth Sep 5, 2022
44b8de7
Merge pull request #1274 from limzykenneth/replace-grunt-html
Qianqianye Sep 7, 2022
5c5cbfe
upcomingWorshops
Gracia-zhang Sep 9, 2022
8803144
Merge branch 'main' of https://github.com/processing/p5.js-website in…
Gracia-zhang Sep 9, 2022
dd48482
Merge branch 'teach' into teach
Gracia-zhang Sep 10, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Set default behaviour to automatically normalize line endings.
* text=auto

# prevents git from converting LF to CRLF, which causes issues
# when assembling example pages on Windows
data/examples/**/*.js eol=lf

# Denote all files that are truly binary and should not be modified.
*.ai binary
*.gif binary
*.ico binary
*.jpg binary
*.mov binary
*.mp3 binary
*.mp4 binary
*.ogg binary
*.ogv binary
*.otf binary
*.pdf binary
*.png binary
*.ttf binary
*.wav binary
*.webm binary
*.zip binary
18 changes: 4 additions & 14 deletions .github/workflows/update-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:

jobs:
build:
name: Update p5.js documentation
name: Update p5.js documentation and library files
runs-on: ubuntu-latest

steps:
Expand All @@ -20,28 +20,18 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Extract documentation from the p5.js repo
- name: Extract documentation and library files from the p5.js repo
run: |
npm install
npm run grunt update-enJSON
npm run grunt update-enJSON --target="${{ steps.p5js.outputs.VERSION }}"
- name: Get p5.js release info
id: p5js
run: |
echo ::set-output name=VERSION::${P5JS_REF/refs\/tags\//}
echo ::set-output name=SHA::${P5JS_SHA}
- name: Get latest p5.min.js build
uses: suisei-cn/actions-download-file@v1
with:
url: https://github.com/processing/p5.js/releases/download/${{github.event.client_payload.ref}}/p5.min.js
target: src/assets/js/
- name: Get latest p5.sound.min.js build
uses: suisei-cn/actions-download-file@v1
with:
url: https://github.com/processing/p5.js/releases/download/${{github.event.client_payload.ref}}/p5.sound.min.js
target: src/assets/js/
- name: Commit changes
uses: EndBug/add-and-commit@v4
with:
message: 'Update Reference files for p5.js ${{ steps.p5js.outputs.VERSION }} release (${{ steps.p5js.outputs.SHA }})'
message: 'Update files for p5.js ${{ steps.p5js.outputs.VERSION }} release (${{ steps.p5js.outputs.SHA }})'
env:
GITHUB_TOKEN: ${{ secrets.DOCS_COMMIT_TOKEN }}
52 changes: 33 additions & 19 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,22 @@ module.exports = function(grunt) {
dest: 'p5-reference/'
}
},
htmllint: {
all: {

htmlhint: {
html1: {
options: {
'attr-value-double-quotes': false,
'alt-require': true,
'doctype-first': true,
'title-require': true,
'attr-no-duplication': true,
'input-requires-label': true,
'tags-check': true,
'tagname-lowercase': true,
'tagname-specialchars': true,
'empty-tag-not-self-closed': true,
'id-unique': true
},
src: [
'<%= config.dist %>/**/*.html',
'!<%= config.dist %>/**/CHANGES.html',
Expand All @@ -352,20 +366,13 @@ module.exports = function(grunt) {
'!<%= config.dist %>/**/learn/*.html',
'!<%= config.dist %>/**/examples/*.html',
'!<%= config.dist %>/**/reference/assets/index.html'
],
options: {
ignore: [
/^This document appears to be written in English/,
/^Bad value “https:/,
/^Consider adding a “lang” attribute to the “html”/,
/^Attribute “paypalexpress” not allowed on element “script” at this point./
]
}
]
}
},

shell: {
generate_dataJSON: {
command: 'npm ci && npm run grunt yui',
command: `git checkout ${grunt.option('target')} && npm ci && npm run grunt yui build`,
options: {
execOptions: {
cwd: 'tmp/p5.js'
Expand All @@ -378,7 +385,7 @@ module.exports = function(grunt) {
grunt.registerTask('update-version', function() {
const done = this.async();

const version = require('./src/templates/pages/reference/data.json').project.version;
const version = grunt.option('target').substring(1);

fs.readFile('./src/data/data.yml')
.then(str => {
Expand All @@ -402,7 +409,7 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-file-append');
grunt.loadNpmTasks('grunt-contrib-compress');
grunt.loadNpmTasks('grunt-contrib-requirejs');
grunt.loadNpmTasks('grunt-html');
grunt.loadNpmTasks('grunt-htmlhint');

// i18n tracking task
grunt.registerTask('i18n', function() {
Expand Down Expand Up @@ -436,6 +443,14 @@ module.exports = function(grunt) {
// move the data.json files from the cloned p5.js repository to the p5.js-website repository
fse.moveSync(dataJSON_p5js, dataJSON_p5jswebsite, { overwrite: true });
fse.moveSync(dataJSONmin_p5js, dataJSONmin_p5jswebsite, { overwrite: true });

const p5min_src = 'tmp/p5.js/lib/p5.min.js';
const p5min_dest = 'src/assets/js/p5.min.js';
const p5Soundmin_src = 'tmp/p5.js/lib/addons/p5.sound.min.js';
const p5Soundmin_dest = 'src/assets/js/p5.sound.min.js';
fse.moveSync(p5min_src, p5min_dest, { overwrite: true });
fse.moveSync(p5Soundmin_src, p5Soundmin_dest, { overwrite: true });

// delete the tmp folder that contained the p5.js repository
fse.removeSync('tmp/');
});
Expand All @@ -451,8 +466,8 @@ module.exports = function(grunt) {
'clone_p5js_repo',
'generate_dataJSON',
'move_dataJSON',
'generate_enJSON',
// 'json-to-fluent'
'update-version',
'generate_enJSON'
]);

// multi-tasks: collections of other tasks
Expand All @@ -476,19 +491,18 @@ module.exports = function(grunt) {

// runs tasks in order
grunt.registerTask('build', [
'update-version',
// 'update-version',
'exec',
'clean',
'requirejs:yuidoc_theme',
'requirejs',
// 'fluent-to-json',
'copy',
'optimize',
'assemble',
'file_append',
'compress',
'i18n',
'htmllint'
'htmlhint'
]);

// runs with just grunt command
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Once added, a steward's username will remain in the [stewards section of the rea
| Language | Steward(s) |
| -------- | ------------------------- |
| Overall |[@Qianqianye](https://github.com/Qianqianye), [@limzykenneth](https://github.com/limzykenneth) |
| Spanish |[@Guirdo](https://github.com/Guirdo), [@Andreu-G](https://github.com/Andreu-G) |
| Spanish |[@Guirdo](https://github.com/Guirdo), [@Andreu-G](https://github.com/Andreu-G), [@dnd-alv](https://github.com/dnd-alv) |
| Chinese | [@unicar9](https://github.com/unicar9), [@Gracia-zhang](https://github.com/Gracia-zhang), [@pentalei](https://github.com/pentalei) |
| Korean | [@yinhwa](https://github.com/yinhwa), [@almchung](https://github.com/almchung), [@jhongover9000](https://github.com/jhongover9000), [@sssueing](https://github.com/sssueing), [@GeryGeryGery](https://github.com/GeryGeryGery), [@sosunnyproject](https://github.com/sosunnyproject) |
| Hindi | [@adarrssh](https://github.com/adarrssh), [@Divyansh013](https://github.com/Divyansh013), [@deepchauhan](https://github.com/deepchauhan), [@SarveshLimaye](https://github.com/SarveshLimaye)|
Expand All @@ -46,7 +46,6 @@ Other Language Steward(s):

## Setup

0. Ensure Java is installed. Not installed? Head over to [Java](https://www.oracle.com/java/technologies/downloads/) for installation.
1. Install [node.js](https://nodejs.org/en/download/).
2. Clone this repo by typing ```git clone https://github.com/processing/p5.js-website/``` in terminal.
3. Navigate to the `p5.js-website` directory in the terminal and type `npm install`.
Expand Down
2 changes: 1 addition & 1 deletion contributor_docs/i18n_contribution.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ The en.json is made up of three sections:
- p5.js documentation, also extracted from the data.json file. This section contains a key for each p5.js Class (i.e., "p5.Color"), which holds information about the Class itself and its Methods and Fields.
In this section, you might find HTML Anchor elements. You only need to translate the text between the two tags. For example, in `<a href=\"#/p5.Color\">p5.Color</a>`, you need to translate the second 'p5.Color' and leave the rest as is.

All the translation swaps of the Reference pages happen is [this function](https://github.com/processing/p5.js-website/blob/main/src/templates/pages/reference/index.hbs#L61).
All the translation swaps of the Reference pages happen in [this function](https://github.com/processing/p5.js-website/blob/main/src/templates/pages/reference/index.hbs#L61).
Any entries in the JSON object which are not filled in will be left in English when the page is loaded.

The translated versions of the JSON file need to be manually created and updated.
Expand Down
22 changes: 12 additions & 10 deletions i18n-tracking.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
es:
src/data/en.yml:
line 883: ' p5.utils'
line 884: ' A set of utilities and additional features for my creative coding class aiming '
line 885: ' to help students.'
line 1153: ' 2022-p5js-access-day-date'
line 1174: ' 2022-p5js-access-day-advisor'
line 1150: ' p5js-community-event-title'
Expand Down Expand Up @@ -30,7 +33,6 @@ es:
line 1177: ' 2022-p5js-access-day-tech-support'
line 1178: ' 2022-p5js-access-day-transcriber'
line 1179: ' 2022-p5js-access-day-asl-support'
line 883: ' p5.fab'
line 875: ' no setup required.'
line 871: ' p5.input'
line 872: ' ui'
Expand Down Expand Up @@ -650,8 +652,6 @@ es:
line 868: ' Put your p5 sketches in the /src/assets/learn folder of the site, in a'
line 869: ' folder labelled with the name of your sketch as shown in the screenshot.'
line 870: ' This is where all the images and p5 sketches linked by iframe should be'
line 884: ' Styling for the iframe (this could directly into the post or in a'
line 885: ' stylesheet)'
line 886: ' writing-a-tutorial-iframe-7'
line 887: ' writing-a-tutorial-iframe-8'
line 888: ' writing-a-tutorial-iframe-9'
Expand Down Expand Up @@ -1839,8 +1839,8 @@ es:
line 84: ' copyright1'
hi:
src/data/en.yml:
line 883: ' p5.utils'
line 1153: ' 2022-p5js-access-day-date'
line 883: ' p5.fab'
line 26: footer6
line 25: footer2
line 27: footer4
Expand Down Expand Up @@ -1892,8 +1892,13 @@ hi:
line 1177: ' 2022-p5js-access-day-tech-support'
line 1178: ' 2022-p5js-access-day-transcriber'
line 1179: ' 2022-p5js-access-day-asl-support'
line 884: ' A set of utilities and additional features for my creative coding class aiming '
line 885: ' to help students.'
ko:
src/data/en.yml:
line 883: ' p5.utils'
line 884: ' A set of utilities and additional features for my creative coding class aiming '
line 885: ' to help students.'
line 1153: ' 2022-p5js-access-day-date'
line 1174: ' 2022-p5js-access-day-advisor'
line 1150: ' p5js-community-event-title'
Expand Down Expand Up @@ -1924,7 +1929,6 @@ ko:
line 1177: ' 2022-p5js-access-day-tech-support'
line 1178: ' 2022-p5js-access-day-transcriber'
line 1179: ' 2022-p5js-access-day-asl-support'
line 883: ' p5.fab'
line 875: ' no setup required.'
line 871: ' p5.input'
line 872: ' ui'
Expand Down Expand Up @@ -2544,8 +2548,6 @@ ko:
line 868: ' Put your p5 sketches in the /src/assets/learn folder of the site, in a'
line 869: ' folder labelled with the name of your sketch as shown in the screenshot.'
line 870: ' This is where all the images and p5 sketches linked by iframe should be'
line 884: ' Styling for the iframe (this could directly into the post or in a'
line 885: ' stylesheet)'
line 886: ' writing-a-tutorial-iframe-7'
line 887: ' writing-a-tutorial-iframe-8'
line 888: ' writing-a-tutorial-iframe-9'
Expand Down Expand Up @@ -3733,6 +3735,9 @@ ko:
line 84: ' copyright1'
zh-Hans:
src/data/en.yml:
line 883: ' p5.utils'
line 884: ' A set of utilities and additional features for my creative coding class aiming '
line 885: ' to help students.'
line 1153: ' 2022-p5js-access-day-date'
line 1174: ' 2022-p5js-access-day-advisor'
line 1150: ' p5js-community-event-title'
Expand Down Expand Up @@ -3763,7 +3768,6 @@ zh-Hans:
line 1177: ' 2022-p5js-access-day-tech-support'
line 1178: ' 2022-p5js-access-day-transcriber'
line 1179: ' 2022-p5js-access-day-asl-support'
line 883: ' p5.fab'
line 875: ' no setup required.'
line 871: ' p5.input'
line 872: ' ui'
Expand Down Expand Up @@ -4383,8 +4387,6 @@ zh-Hans:
line 868: ' Put your p5 sketches in the /src/assets/learn folder of the site, in a'
line 869: ' folder labelled with the name of your sketch as shown in the screenshot.'
line 870: ' This is where all the images and p5 sketches linked by iframe should be'
line 884: ' Styling for the iframe (this could directly into the post or in a'
line 885: ' stylesheet)'
line 886: ' writing-a-tutorial-iframe-7'
line 887: ' writing-a-tutorial-iframe-8'
line 888: ' writing-a-tutorial-iframe-9'
Expand Down
Loading