Skip to content

Commit 70ce605

Browse files
authored
New documentation for websites contributions (#82)
* New documentation for websites contributions Fix #67 and #FreeCAD/FreeCAD-Homepage/issues/135 Adds a new section under Technical for documentation about FreeCAD websites ecosystem for interested contributors. First commit with base structure only. Expect following commits with more content and screenshots. * Add more content and update images * Add more content, fix typo and hide TODO in comments * Fix commands
1 parent 7755534 commit 70ce605

15 files changed

+198
-2
lines changed

technical/DevBook.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
layout: default
3+
---
4+
5+
# Contributing to the Developer Handbook
6+
7+
Technical information for contributors interested to work on Developer Handbook.
8+
9+
<!-- ## Structure TODO: add more content later -->
10+
11+
## Running locally
12+
13+
To run the Developer Handbook locally, Jekyll, the Ruby static site generator, must be executed on the corresponding folder.\
14+
On a Debian or Ubuntu GNU/Linux system, Bundler is used :
15+
16+
```
17+
$ sudo apt install ruby-bundler ruby-dev build-essential
18+
$ bundle install
19+
$ cd path/to/your/local/fork/of/the/devhandbook
20+
$ bundle exec jekyll serve
21+
```
22+
23+
Open then the link to `127.0.0.1:4000` (or `localhost:4000`) in you web browser.
24+
25+
<!-- ## Design guidelines TODO: add more content later -->
26+
27+
<!-- ## Ressources TODO: add more content later -->

technical/FPAweb.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
layout: default
3+
---
4+
5+
# Contributing to the FreeCAD Project Association website
6+
7+
Technical information for contributors interested to work on FreeCAD Project Association website.
8+
9+
<!-- ## Structure TODO: add more content later -->
10+
11+
## Running locally
12+
13+
To run the FPA website locally, Jekyll, the Ruby static site generator, must be executed on the corresponding folder.\
14+
On a Debian or Ubuntu GNU/Linux system, Bundler is used :
15+
16+
```
17+
$ sudo apt install ruby-bundler ruby-dev build-essential
18+
$ bundle install
19+
$ cd path/to/your/local/fork/of/the/FPA/website
20+
$ bundle exec jekyll serve
21+
```
22+
23+
Open then the link to `127.0.0.1:4000` (or `localhost:4000`) in you web browser.
24+
25+
<!-- ## Design guidelines TODO: add more content later -->
26+
27+
<!-- ## Ressources TODO: add more content later -->

technical/FreeCADweb.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
layout: default
3+
---
4+
5+
# Contributing to the FreeCAD main website
6+
7+
Technical information for contributors interested to work on FreeCAD main website.
8+
9+
<!-- ## Structure TODO: add more content later -->
10+
11+
## Running locally
12+
13+
During development and before committing your changes, you may want to display the website in your web browser locally, without installing a full web server solution stack like XAMPP.\
14+
You can instead just transcribe the PHP files into HTML that your web broswer can read.
15+
16+
1) To do so, fork the original FreeCAD-Homepage repository to your personal GitHub account :
17+
18+
![Fork the repository](./resources/FreeCADweb_01.jpg)
19+
20+
2) If you don't have an account or prefer to inspect and modify files locally without relying on GitHub's features, download the compressed folder and unzipp it :
21+
22+
![Download the repository](./resources/FreeCADweb_02.jpg)
23+
24+
3) From GitHub Desktop app, clone the fork you just created (skip this step if you downloaded the zip in step 2) :
25+
26+
![Clone the fork](./resources/FreeCADweb_03.jpg)
27+
28+
4) Make sure PHP is installed on your system (on GNU/Linux in 2023, install the PHP8 CLI package).
29+
30+
5) Go to your local cloned copy of the repository, in the folder you specified previously ("FreeCAD-Homepage" in this case), and open the terminal at working-directory location :
31+
32+
![Open Terminal in cloned local repo](./resources/FreeCADweb_05.jpg)
33+
34+
6) Paste `php -S 127.0.0.1:8000` (or `php -S localhost:8000`) to start the PHP server locally:
35+
36+
![Start PHP server](./resources/FreeCADweb_06.jpg)
37+
38+
7) Open a new tab in your web browser with `127.0.0.1:8000` (or `localhost:8000`) to display the "index.php" file of the web page correctly.\
39+
If you want to reach a particular file, use `localhost:8000/MyFile.php`.
40+
41+
![Start PHP server](./resources/FreeCADweb_07.jpg)
42+
43+
N.B: the translation of the web pages does not work.
44+
45+
<!-- ## Design guidelines TODO: add more content later -->
46+
47+
## Managing translations
48+
49+
In order for the language and translation management system to work, each text that potentially needs to be translated must be encapsulated as follows:
50+
51+
`<?php echo _('Text_to_be_translated'); ?>`
52+
53+
The site administrators regularly run a script that updates the translatable strings on the Crowdin platform. The added texts can then be translated by contributors. The newly translated content is then forwarded back to the website.
54+
55+
<!-- ## Ressources TODO: add more content later -->

technical/SourceTreeBasics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ A picture of the most commonly encountered branches of the tree.
1010
The full FreeCAD source tree has many other branches, but most Contributors will
1111
only need to deal with these:
1212

13-
![The FreeCAD Source Tree](./SourceTreeBasics.svg)
13+
![The FreeCAD Source Tree](./resources/SourceTreeBasics.svg)
1414

1515
```mermaid
1616
graph LR

technical/TheApplicationModule.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ Application Modules provide specialized functions and may store specialized data
1212

1313
Application Modules are almost always divided into two parts: App which manages the relevant document objects and operations on them, and Gui which handles the display.
1414

15-
![Overview of an Application Module](./TheApplicationModule.svg)
15+
![Overview of an Application Module](./resources/TheApplicationModule.svg)

technical/Websites.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
layout: default
3+
---
4+
5+
# Contributing to FreeCAD websites
6+
7+
Technical information for contributors interested to work on FreeCAD websites.
8+
9+
## The Ecosystem
10+
11+
Currently, the websites infrastructure of FreeCAD consists of the following :
12+
13+
- [The FreeCAD website](https://www.freecad.org) acts as the main entry point into FreeCAD's universe for all users, contributors and interested parties.
14+
15+
- [The News Blog](https://blog.freecad.org/) brings together development news, tutorials and use cases from the community.
16+
17+
- [The Wiki](https://wiki.freecad.org/) gathers all the documentation about FreeCAD, from usage to installation, development, release notes and much more. Historically, this has been the all-purpose place for all FreeCAD-related matters. A more development-oriented portion of it has been migrated to this Developer Handbook.
18+
19+
- [The Developer Handbook](https://freecad.github.io/DevelopersHandbook/) is the very site you are currently in.
20+
21+
- [The Forum](https://forum.freecad.org/) is one of the many places where the community meets and exchanges.
22+
23+
- [The FreeCAD Project Association website](https://fpa.freecad.org/) groups everything that relates to the association overseeing the FreeCAD project.
24+
25+
In addition to the implemented websites listed above, several external platforms are used :
26+
27+
- [The Repositories](https://github.com/FreeCAD) of FreeCAD main codebase, building and packaging, continuous integration, addons, macros, library, websites and more are on GitHub.
28+
29+
- [The Translations](https://crowdin.com/project/freecad) of the software interface and the main website are on Crowdin.
30+
31+
Moreover, here are the current implementation initiatives not yet used :
32+
33+
- [The FreeCAD Documentation](https://freecad-documentation.netlify.app/) overhaul as part of the GSOC 2023
34+
35+
## Technical details
36+
37+
### FreeCAD website
38+
39+
The website mainly uses HTML/PHP, CSS, the Bootstrap and jQuery JavaScript libraries, the Font Awesome toolkit.\
40+
To contribute to the main website, find [here a few advices and ressources](./FreeCADweb.md).
41+
42+
### News Blog
43+
44+
The News Blog is based on WordPress.\
45+
<!-- To contribute to the blog, find here a few advices and ressources. TODO: contact Chennes, ConcreteDog and Alex -->
46+
47+
### Wiki
48+
49+
The News Blog is based on MediaWiki.\
50+
<!-- To contribute to the wiki, find here a few advices and ressources. TODO: contact wiki team -->
51+
52+
### Developer Handbook
53+
54+
The Developer Handbook uses Jekyll, a Ruby static site generator, and Markdown.\
55+
To contribute to the Developer Handbook, find [here a few advices and ressources](./DevBook.md).
56+
57+
### Forum
58+
59+
The News Blog is based on phpBB.\
60+
<!-- To contribute to the Forum, find here a few advices and ressources. TODO: contact forum team -->
61+
62+
### FreeCAD Project Association website
63+
64+
The FreeCAD Project Association website also uses Jekyll, a Ruby static site generator, and Markdown.\
65+
To contribute to the FreeCAD Project Association website, find [here a few advices and ressources](./FPAweb.md).

technical/index.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,42 +9,64 @@ Technical information of interest to Contributors.
99
## The Basics
1010

1111
- [Developer's Glossary](./developerglossary.md)
12+
1213
- [Source Tree Basics](./SourceTreeBasics.md)
14+
1315
- [The Application Module](./TheApplicationModule.md)
16+
1417
- [The Source Code in More Depth](https://wiki.freecad.org/The_FreeCAD_source_code)
18+
1519
- [Writing Code for Translation](./translation.md)
20+
1621
- [Automated Testing](./automated_testing.md)
22+
1723
- [Dealing with Property Changes](./PropertyChanges.md)
24+
1825
- The FreeCAD developer's tool set:
26+
1927
- C++ and Python
2028
- [Qt](https://www.qt.io/): a cross platform development framework
2129
- [OpenCascade](https://www.opencascade.com/open-cascade-technology/): a geometry library
2230
- [Coin3d](https://www.coin3d.org/): a [scenegraph](https://wiki.freecad.org/Scenegraph) manager based on OpenInventor that handles drawing in the 3d window.
2331
- [Pivy](https://wiki.freecad.org/Pivy): a Python binding for Coin3d
2432

33+
- [Contributing to FreeCAD websites](./Websites.md)
34+
2535
## Modifying FreeCAD
2636

2737
- Contributing to FreeCAD
38+
2839
- The process for submitting changes to FreeCAD is described in the [CONTRIBUTING.md](https://github.com/FreeCAD/FreeCAD/blob/master/CONTRIBUTING.md)
2940
file in the root of the source tree.
41+
3042
- [Creating a WorkBench](https://wiki.freecad.org/Workbench_creation)
43+
3144
- The [PowerUser's hub](https://wiki.freecad.org/Power_users_hub) in the FreeCAD wiki contains good information about Python scripting and workbench creation
45+
3246
- [Accessing User Preferences](./preferences.md)
47+
3348
- [Controlling Object Deletion](./ObjectDeletion.md)
49+
3450
- [Create a Python Binding for C++ Class](./CreatePythonBindingForCpp.md)
51+
3552
- [Checklist for Adding a Feature to a Workbench in C++](./ChecklistForNewFeatureC++.md)
3653

3754
## Release Management
3855

3956
- [Overview](./ReleaseProcess.md)
57+
4058
- [Major Releases](./MajorRelease.md)
4159
- [Minor Releases](./MinorRelease.md)
4260
- [Building Release Packages](./ReleasePackages.md)
4361

4462
## See Also
4563

4664
- [Wiki Developer Hub](https://wiki.freecad.org/Developer_hub)
65+
4766
- [Compiling](https://wiki.freecad.org/Developer_hub#Compiling_FreeCAD)
67+
4868
- [Useful Python Modules](https://wiki.freecad.org/Extra_python_modules)
69+
4970
- [OpenCascade Tutorials](http://opencascade.wikidot.com/romansarticles)
71+
5072
- [Scripted Objects](https://wiki.freecad.org/Scripted_objects)

technical/resources/FreeCADweb_01.jpg

49.4 KB
Loading

technical/resources/FreeCADweb_02.jpg

67.1 KB
Loading

technical/resources/FreeCADweb_03.jpg

39.9 KB
Loading

0 commit comments

Comments
 (0)