Skip to content

Button to download an example #141

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
aglitchman opened this issue Nov 6, 2024 · 3 comments
Open

Button to download an example #141

aglitchman opened this issue Nov 6, 2024 · 3 comments

Comments

@aglitchman
Copy link
Contributor

It would be great to example a direct link to download a specific example as it is, without downloading the whole examples project.

The download button can be placed under the "github" button:
image

Related issue - defold/examples#53

@aglitchman
Copy link
Contributor Author

It turns out that GitHub doesn't provide an option to download individual folders as a zip.

To implement such a button, it seems to be easiest to zip all example folders in advance (automatically) and put them next to the example.

@aglitchman
Copy link
Contributor Author

Also, we can zip all example folders and upload them to the Release page! I think it's the best option.
Then update the website and add links to the zip files.

@britzl
Copy link
Collaborator

britzl commented May 12, 2025

Zipping the examples one by one is easy to do as a step in update.py when we process the examples. The zip archives can be put on the website.

The other solution would perhaps be to have a GitHub action in defold/examples which zips the examples, commits them to a release and then triggers a site rebuild.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants