Using Gitlab's public API, you have to build a file explorer for public repositories (similar to what they already have)
You will need to get the project id, and then you can access these API URLs to build the explorer:
https://gitlab.com/api/v4/projects/27081175/repository/treeand then append
?path=path/inside/the/treeto list the contents of a subtree. You can also pass the
refquery parameter to reference a certain branch.
:idis the id of the blob you want to display. Alternatively, you can also use the endpoint
https://gitlab.com/api/v4/projects/27081175/repository/files/:path?ref=mainto fetch more information about a certain file (
:pathis the full path to the file, url encoded). you can also pass the
refparameter to select a certain branch.