-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from freedomofpress/11ty
Make an initial attempt at an 11ty powered dangerzone.rocks
- Loading branch information
Showing
27 changed files
with
2,767 additions
and
295 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/node_modules/ | ||
/dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,18 @@ | ||
# sha256 as of 2024-03-15 | ||
FROM node:21.7.1-alpine3.19@sha256:4999fa1391e09259e71845d3d0e9ddfe5f51ab30253c8b490c633f710c7446a0 AS eleventy-build | ||
|
||
WORKDIR /usr/src/page | ||
COPY package.json package-lock.json eleventy.config.js ./ | ||
COPY src ./src | ||
RUN npm ci | ||
RUN npm run build | ||
|
||
# sha256 as of 2023-07-05 | ||
FROM nginx:mainline-alpine@sha256:2d4efe74ef541248b0a70838c557de04509d1115dec6bfc21ad0d66e41574a8a | ||
|
||
COPY deploy/nginx.conf /etc/nginx | ||
RUN mkdir -p /opt/nginx/run /opt/nginx/webroot/assets && chown -R nginx:nginx /opt/nginx | ||
|
||
USER nginx | ||
COPY --chown=nginx:nginx index.html about.html favicon.ico /opt/nginx/webroot/ | ||
COPY --chown=nginx:nginx assets/ /opt/nginx/webroot/assets/ | ||
COPY --from=eleventy-build --chown=nginx:nginx /usr/src/page/dist /opt/nginx/webroot/ | ||
EXPOSE 5080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
module.exports = function(eleventyConfig) { | ||
eleventyConfig.addPassthroughCopy("src/assets") | ||
eleventyConfig.addPassthroughCopy("src/favicon.ico") | ||
|
||
eleventyConfig.addCollection("posts", function(collection) { | ||
return collection.getFilteredByGlob("src/posts/*.md"); | ||
}) | ||
|
||
return { | ||
dir: { | ||
input: "src", | ||
output: "dist", | ||
includes: '_layouts', | ||
} | ||
} | ||
} |
Oops, something went wrong.