yewstack / yew-wasm-pack-template

A template for starting a Yew project to be used with wasm-pack
https://todomvc.yew.rs/
Apache License 2.0
118 stars 41 forks source link

Move netlify information to deploy branch #22

Closed jstarry closed 3 years ago

jstarry commented 4 years ago

Problem

The netlify directory is not useful for devs that clone the template project. It shouldn't be in the master branch.

Proposed Changes

shinglyu commented 3 years ago

When I tried to create the project, I got the following error:

% cargo generate --git https://github.com/yewstack/yew-wasm-pack-template
 Project Name: Test
 Renaming project called `Test` to `test`...
 Creating project called `test`...
Error:  Error replacing placeholders `/tmp/test/.github/workflows/deploy.yml`
Info: caused by liquid: Unknown variable
  with:
    requested variable=secrets
    available variables=authors, crate_name, project-name

Maybe it's related to netlify?

ankhers commented 3 years ago

@shinglyu It is only indirectly related to netlify. It is because cargo-generate errors out when seeing variables it does not expect. And GitHub uses the ${{ foo }} syntax for contexts and expressions. This conflicts with cargo-generate using the liquid template engine to replace variables using the {{ foo }} syntax.

You can follow a discussion at ashleygwilliams/cargo-generate#204. There are a couple linked PRs suggesting fixes.