FreeCAD / FreeCAD-Homepage

The homepage at http://www.freecad.org
GNU Lesser General Public License v2.1
23 stars 37 forks source link

Documentation for web devs interested working on FreeCAD webpage #135

Closed luzpaz closed 6 months ago

luzpaz commented 9 months ago

Originally posted by @marcuspollio in https://github.com/FreeCAD/FreeCAD-Homepage/issues/134#issuecomment-1738336010

As I struggled a bit to find a way to open the php file locally, here is a small hint for anyone looking to open a website folder (FreeCAD Homepage for example) on his web browser without using Apache, XAMPP or others :

1) download the repository (< > Code green button on Github) and unzip 2) make sure php is installed (for me on GNU/Linux, I had to install "php8.1-cli" as of September 2023) 3) go to my local copy of the website folder ("FreeCAD-Homepage-master" in this case) 4) open the terminal at working-directory location and paste php -S 127.0.0.1:8000 5) as there is an "index.php" file in the FreeCAD case, opening a new tab in your web browser with localhost:8000/ displays the web page correctly. If you want to reach a particular file, use localhost:8000/MyFile.php

Hope it helps other folks... And sorry for the off-topic XD

chennes commented 9 months ago

Let's get it into the Handbook someplace.

AdarshRawat1 commented 9 months ago

How about Adding screenshots for easier understanding.

marcuspollio commented 9 months ago

Hi !

Please find below an update with some screenshots for this:

  1. Fork the original repository to your personal GitHub account:

01

1a. 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 :

02

  1. From GitHub Desktop app, clone the fork you just created (skip this step if you downloaded the zip in step 1a) :

03

  1. Make sure php is installed (for me on GNU/Linux, I had to install "php8.1-cli" as of September 2023)

  2. 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 :

05

  1. Paste php -S 127.0.0.1:8000

06

  1. As there is an "index.php" file in the FreeCAD case, open a new tab in your web browser with localhost:8000 to display the web page correctly. If you want to reach a particular file, use localhost:8000/MyFile.php

07

Note that the translated pages do not work.

marcuspollio commented 7 months ago

@chennes Hi Chris !

Do you have any comment on my post above ? If not, I can make a PR for the Handbook so we can close this issue. Thanks !

chennes commented 7 months ago

Go for it!

marcuspollio commented 6 months ago

Hi @luzpaz ! Could you please close this issue now ? I added the Fix # thingy in my PR above but it looks like this does not work across different repos (or I did write it wrong) ... sorry =D Thanks !