Skip to content

Button to download an example #141

Closed
@aglitchman

Description

@aglitchman

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

Activity

aglitchman

aglitchman commented on May 10, 2025

@aglitchman
ContributorAuthor

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

aglitchman commented on May 12, 2025

@aglitchman
ContributorAuthor

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

britzl commented on May 12, 2025

@britzl
Collaborator

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.

britzl

britzl commented on May 31, 2025

@britzl
Collaborator

Examples now have a download button.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @aglitchman@britzl

        Issue actions

          Button to download an example · Issue #141 · defold/defold.github.io