Skip to content

Commit

Permalink
Merge pull request #60 from DSACMS/natalia/production_fixes
Browse files Browse the repository at this point in the history
Re-added Vite & Changed /metrics config
  • Loading branch information
natalialuzuriaga authored Nov 27, 2023
2 parents c50e122 + 858ed44 commit 56747a7
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 33 deletions.
5 changes: 2 additions & 3 deletions app/.eleventy.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const fs = require("fs")
const path = require("path")
const Image = require("@11ty/eleventy-img")
const EleventyVitePlugin = require("@11ty/eleventy-plugin-vite");
const lucideIcons = require("@grimlink/eleventy-plugin-lucide-icons");
const { baseurl } = require("./site/_data/site");
require("dotenv").config()
Expand Down Expand Up @@ -78,6 +79,7 @@ module.exports = function (eleventyConfig) {
});

eleventyConfig.setLiquidOptions({ outputEscape: "escape" })
eleventyConfig.addPlugin(EleventyVitePlugin)
eleventyConfig.addPlugin(lucideIcons, {
"class": "custom-class",
"width": 17,
Expand All @@ -86,8 +88,6 @@ module.exports = function (eleventyConfig) {
"stroke-width": 2
});

const pathPrefix = process.env.NODE_ENV == "production" ? "/metrics" : "/"

return {
dir: {
input: "site/",
Expand All @@ -97,6 +97,5 @@ module.exports = function (eleventyConfig) {
},
templateFormats: ["html", "md", "liquid", "11ty.js"],
passthroughFileCopy: true,
pathPrefix
}
}
28 changes: 0 additions & 28 deletions app/postcss.config.js

This file was deleted.

2 changes: 1 addition & 1 deletion app/site/_data/site.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const production = process.env.NODE_ENV === "production"
const host = production ? process.env.SITE_HOST : "http://0.0.0.0:8080"

// For modifying the <base> tag
const baseurl = production ? "" : ""
const baseurl = production ? "/metrics" : ""

module.exports = {
name: "Open Source at CMS",
Expand Down
2 changes: 1 addition & 1 deletion app/site/_includes/assets.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@
window.addEventListener('load', verifyLoaded, true)
})()
</script>
<link rel="stylesheet" href="{{ site.url }}/css/style.css"/>
<link rel="stylesheet" href="/css/style.css"/>
<script type="module" src="/assets/js/index.js"></script>

0 comments on commit 56747a7

Please sign in to comment.