Closed AdarshRawat1 closed 11 months ago
Isn't there a better way to get the github url that that does not involve the array of page names? Because the risk is that when someone adds a new page, they forget to update this file...
In each page the page name is set in $currentpage so we can also do something like:
$url = 'https://github.com/FreeCAD/FreeCAD-Homepage/blob/master/$currentpage';
Isn't there a better way to get the github url that that does not involve the array of page names? Because the risk is that when someone adds a new page, they forget to update this file...
In each page the page name is set in $currentpage so we can also do something like:
$url = 'https://github.com/FreeCAD/FreeCAD-Homepage/blob/master/$currentpage';
Thank you @yorikvanhavre, opting for the variable $currentpage
would be a better approach.
$githubEditUrl = 'https://github.com/FreeCAD/FreeCAD-Homepage/blob/master/' . $currentpage;
That seems perfect now. Thanks!!!
closes - #34
What this PR does -
Implemented a "Improve this page on github" link in the footer section of every webpage, directing users to their respective source files in GitHub
https://github.com/FreeCAD/FreeCAD-Homepage
.This feature enables users to easily fork and edit the content of webpages on GitHub.
Screenshot -![image](https://github.com/FreeCAD/FreeCAD-Homepage/assets/100958893/2f2620bc-ca09-48a7-930c-d1c7b522f976)