Skip to content
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

How do I include a .well-known directory in the dist directory (e.g. Let's Encrypt)? #1049

Closed
plainspace opened this issue Mar 26, 2020 · 4 comments

Comments

@plainspace
Copy link

No description provided.

@Ryuno-Ki
Copy link
Contributor

Mind sharing your solution, @plainspace? :-)

@pdehaan
Copy link
Contributor

pdehaan commented Mar 26, 2020

@plainspace You might need to manually copy the folder: https://www.11ty.dev/docs/copy/

@plainspace
Copy link
Author

So... I had to do the following to make this work:

  1. I created a directory in /src/site/.well-known/ with 2 relevant filename.njk files. Each had the following frontmatter:
---
permalink: /.well-known/filename
eleventyExcludeFromCollections: true
---
{
 json stuff
}

When the site builds, the files get created in /dist/.well-known/filename

  1. Because I'm deploying on Netlify I had to add the following to my netlify.toml
[[headers]]
  for = "/.well-known/*"
  [headers.values]
    content-type = "application/json"

I'm going to have to file a bug because this isn't working as expected.

@Ryuno-Ki
Copy link
Contributor

Thanks for sharing :-)

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

No branches or pull requests

3 participants