Browse Source

update 11ty version, add nvmrc

main
James Fenn 3 months ago
parent
commit
17e3452ea8
12 changed files with 4957 additions and 19 deletions
  1. +7
    -0
      .eleventy.js
  2. +1
    -0
      .nvmrc
  3. +5
    -3
      Makefile
  4. +5
    -5
      _data/git.js
  5. +2
    -2
      _includes/layouts/base.liquid
  6. +1
    -1
      _includes/layouts/default.liquid
  7. +3
    -3
      _includes/layouts/project.liquid
  8. +4922
    -0
      package-lock.json
  9. +7
    -1
      package.json
  10. +1
    -1
      pages/blog/index.html
  11. +2
    -2
      pages/index.html
  12. +1
    -1
      pages/projects/index.html

+ 7
- 0
.eleventy.js View File

@@ -4,6 +4,7 @@ const _yaml = require("js-yaml");
const _moment = require("moment");

const _pluginRss = require("@11ty/eleventy-plugin-rss");
const _upgradeHelp = require("@11ty/eleventy-upgrade-help");

module.exports = function(eleventyConfig) {
eleventyConfig.setDataDeepMerge(true);
@@ -44,6 +45,12 @@ module.exports = function(eleventyConfig) {
eleventyConfig.addDataExtension("yaml", contents => _yaml.safeLoad(contents));

eleventyConfig.addPlugin(_pluginRss);
eleventyConfig.addPlugin(_upgradeHelp);

eleventyConfig.setLiquidOptions({
dynamicPartials: true,
strictFilters: false,
});

return {
templateFormats: [


+ 1
- 0
.nvmrc View File

@@ -0,0 +1 @@
v14.18.3

+ 5
- 3
Makefile View File

@@ -37,8 +37,10 @@ deploy: prune install assets/css/styles.css
git reset HEAD~

prune:
rm -r _site/
rm -rf _site/
rm -rf .node-persist/

clean: prune
rm package-install.lock
rm -rf node_modules/
rm -f package-install.lock
rm -f pnpm-lock.yaml
rm -rf node_modules/

+ 5
- 5
_data/git.js View File

@@ -41,9 +41,9 @@ async function getRepoProject(repo) {
}

// clone repo into temp dir
await _fs.promises.rmdir("/tmp/" + id, { recursive: true });
await _fs.promises.rmdir(`/tmp/mdjavadoc-${id}`, { recursive: true });
_fs.mkdirSync("/tmp/" + id);
await _fs.promises.rmdir("/tmp/" + id, { recursive: true }).catch(() => null);
await _fs.promises.rmdir(`/tmp/mdjavadoc-${id}`, { recursive: true }).catch(() => null);
await _fs.promises.mkdir("/tmp/" + id);

await _git.Clone(repo.gitUrlHttp, "/tmp/" + id);

@@ -112,8 +112,8 @@ async function getRepoWiki(repo, project) {
let wikiDir = "/tmp/" + id + ".wiki";

// clone repo into temp dir
await _fs.promises.rmdir(wikiDir, { recursive: true });
_fs.mkdirSync(wikiDir);
await _fs.promises.rmdir(wikiDir, { recursive: true }).catch(() => null);
await _fs.promises.mkdir(wikiDir);

try {
await _git.Clone(repo.gitUrlHttp.replace(".git", ".wiki.git"), wikiDir);


+ 2
- 2
_includes/layouts/base.liquid View File

@@ -2,8 +2,8 @@
layout: default
---

{% include nav.liquid %}
{% include "nav.liquid" %}

{{ content | safe }}

{% include footer.liquid %}
{% include "footer.liquid" %}

+ 1
- 1
_includes/layouts/default.liquid View File

@@ -2,7 +2,7 @@

<html lang="en">
<head>
{% include head.liquid %}
{% include "head.liquid" %}
</head>
<body class="{% if nav %}nav-container {% endif %}footer-container">
{{ content | safe }}


+ 3
- 3
_includes/layouts/project.liquid View File

@@ -5,10 +5,10 @@
<html lang="en">
<head>
{% assign project = git.projects | where: 'id', page.fileSlug | first %}
{% include head, title: project.title, description: project.repo.description, icon: project.icon %}
{% include "head", title: project.title, description: project.repo.description, icon: project.icon %}
</head>
<body class="nav-container footer-container">
{% include nav %}
{% include "nav" %}

<div class="bg-secondary py-5">
<div class="container text-center">
@@ -141,7 +141,7 @@
</div>
{% endfor %}

{% include footer %}
{% include "footer" %}

</body>
</html>

+ 4922
- 0
package-lock.json
File diff suppressed because it is too large
View File


+ 7
- 1
package.json View File

@@ -18,7 +18,7 @@
},
"homepage": "https://code.horrific.dev/james/jfenn.me",
"devDependencies": {
"@11ty/eleventy": "0.11.0",
"@11ty/eleventy": "^1.0.0",
"@11ty/eleventy-plugin-rss": "^1.0.9",
"@11ty/eleventy-plugin-syntaxhighlight": "^2.0.3",
"@doubledotlabs/dot.css": "0.1.5",
@@ -26,6 +26,8 @@
"fs": "0.0.1-security",
"git-clone": "^0.1.0",
"git-rest-wrapper": "0.0.8",
"isomorphic-git": "^1.10.3",
"jquery": "^3.6.0",
"js-yaml": "^3.14.0",
"markdown-it": "^10.0.0",
"markdown-it-anchor": "^5.2.5",
@@ -34,6 +36,10 @@
"moment": "^2.27.0",
"node-fetch": "^2.6.0",
"nodegit": "^0.27.0",
"popper.js": "^1.16.1",
"sass": "^1.23.2"
},
"dependencies": {
"@11ty/eleventy-upgrade-help": "^1.0.1"
}
}

+ 1
- 1
pages/blog/index.html View File

@@ -30,5 +30,5 @@ permalink: /blog/
{% assign year = year2 %}
<h3>{{ year }}</h3>
{% endif %}
{% include item/blog-compact, blog: blog %}
{% include "item/blog-compact", blog: blog %}
{% endfor %}

+ 2
- 2
pages/index.html View File

@@ -40,7 +40,7 @@ permalink: /
{% for projectId in featured %}
<div class="col col-12 col-md-6 pb-3">
{% assign project = git.projects | where: 'id', projectId | first %}
{% include item/project.liquid, project: project %}
{% include "item/project.liquid", project: project %}
</div>
{% endfor %}
</div>
@@ -48,7 +48,7 @@ permalink: /
<h2 class="mt-5">Latest blog posts</h2>
{% assign blogs = collections.blog | reverse %}
{% for blog in blogs limit:3 %}
{% include item/blog.liquid, blog: blog %}
{% include "item/blog.liquid", blog: blog %}
{% endfor %}

<h2 class="mt-5">Other cool people</h2>


+ 1
- 1
pages/projects/index.html View File

@@ -26,7 +26,7 @@ permalink: /projects/
{% for pg in collections[category.id] %}
<div class="col col-12 col-md-6 pb-3">
{% assign project = git.projects | where: 'id', pg.fileSlug | first %}
{% include item/project.liquid, project: project %}
{% include "item/project.liquid", project: project %}
</div>
{% endfor %}
</div>


Loading…
Cancel
Save