Repository for the new processing.org website.
npm i- Installs the dependenciesnpm run devorgatsby develop- Run the app for local development
This folder contains all the content on the website and it is divided into:
-
/examplesExamples are divided into category folders and each example has its own folder named like the example with files for every language. The english file is named
index.mdxand the other languages have their language code before the.mdxfile type (e.g.index.de.mdx). Each example has to have a cover image for the index named liked the example file with a16:9ratio (minimum width 288px) and a cover image namedCover.png\.jpgfor the homepage with 1:1 ratio (minimum width 600px) placed in the same folder. -
/referencesThis folder contains all the files necessary for creating the reference pages and it is divided into two folders:
- The
/translationsfolder contains a separate folder for every language withenbeing the base one. Theenfolder should never be edited manually since it is auto-generated from the Processing source code. The language folder is divided into folders that correspond to each of the processing libraries and a processing folder that contains all the core processing references. - The
/examplesfolder contains all the examples used inside the references. They are organized in the same folder structure as translations and contain folders named after the references. These folders contain all the.pdeand.pngfiles necessary for the examples. Each example image should have a size of400x400pxand should be named after the corresponding example, e.g. thebezier_0.pdeexample has an image namedbezier_0.pnginside thebezier_folder.
By combining files from the translations and examples we create the pages for the references.
If you want to add a translation just copy the
enfolder, rename it to the language code1 and translate away. - The
-
/tutorialsEvery text tutorial has its own folder named after the tutorial with files for every language. The english file is index.mdx and the other languages have their language code1 before
.mdx(e.g. index.de.mdx). All.mdxfiles can use custom MDX Components that are globally available with the following tags:<FixedImage>{image in MDX}</FixedImage>wraps an image in a container to give it a fixed size. The style can be overriden through the style attribute.<HighlightBlock>{content}</HighlightBlock>wraps content in a gray block to highlight a block of content.<Intro>{content}</Intro>changes text styling for the introduction of pages.<Note>{content}</Note>a small note with smaller font-size for disclaimer of a certain content.
The current tutorials need to be translated from their current format (
.html) to MDX, see Table of Components for further details.Each tutorial has a cover image for the index pages that needs to be declared in the header of its .mdx file as a
coverImagekey with the filename of the cover that must be placed in the same folder. This image should have a3:1ratio with a minimum width of600px. -
/booksEvery book has its own folder with an
.mdxfile that includes the data of the book and a body text description. The cover of the book should be named after the folder. -
/toolsThe tools are
.jsonfiles that include the name and the description of the tool. -
/pagesThis folder contains all the singular pages that don't belong to any template. Every page has its own folder and inside that folder, files for every language. The english file is named
index.mdxand the other languages have their code before.mdx(e.g.index.de.mdx)If you want to add a translation, copy the english folder, rename it so that it contains the language code1 and then translate the document.
This folder contains files necessary for localization (language control).
-
The
config.jsonfile contains a list of the languages used throughout the website. If a language is not in this file, it is not available in the language selector. When adding a language, first copy one of the existing languages and then change all the fields to correspond to the language you are adding. -
The
/react-intlfolder contains separate.jsonfiles for every language and these files are responsible for the localization of the UI elements in the website. When adding a language, first copy theen.jsonfile, rename it into the language code1and translate all the JSON values (not the keys).
The src folder contains all the logic of the website in several folders:
-
/templates: contains template files for references (separate for classes and functions), index page for all the libraries and the main processing references, tutorials, and examples. -
/pages: all the individual pages -
/images: all the images for the website that are not for references, examples, or tutorials