moved the blog to its own directory
All checks were successful
Web/pipeline/head This commit looks good
2
.gitignore
vendored
|
@ -3,4 +3,4 @@ sitemap.xml
|
|||
feed.json
|
||||
rss.xml
|
||||
atom.xml
|
||||
blog-*.html
|
||||
/blog
|
|
@ -14,6 +14,7 @@ RewriteRule ^actadd/?$ "https://minecraft.curseforge.com/projects/actually-addit
|
|||
RewriteRule ^projects/?$ "https://ellpeck.de/#projects" [NE,R=301,L]
|
||||
RewriteRule ^impressum/?$ "https://ellpeck.de/#impressum" [NE,R=301,L]
|
||||
RewriteRule ^privacy/?$ "https://ellpeck.de/#privacy" [NE,R=301,L]
|
||||
RewriteRule ^blog/?$ "https://ellpeck.de/#blog" [NE,R=301,L]
|
||||
RewriteRule ^mc/?$ "https://ellpeck.de/minecraft-stuff" [R=301,L]
|
||||
RewriteRule ^minecraft-stuff/?$ "https://ellpeck.de/projects" [R=301,L]
|
||||
RewriteRule ^yt/?$ "https://www.youtube.com/c/ellpeck" [R=301,L]
|
||||
|
|
Before Width: | Height: | Size: 632 KiB After Width: | Height: | Size: 632 KiB |
Before Width: | Height: | Size: 380 KiB After Width: | Height: | Size: 380 KiB |
Before Width: | Height: | Size: 630 KiB After Width: | Height: | Size: 630 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 118 KiB After Width: | Height: | Size: 118 KiB |
Before Width: | Height: | Size: 5 KiB After Width: | Height: | Size: 5 KiB |
Before Width: | Height: | Size: 145 KiB After Width: | Height: | Size: 145 KiB |
Before Width: | Height: | Size: 133 KiB After Width: | Height: | Size: 133 KiB |
Before Width: | Height: | Size: 156 KiB After Width: | Height: | Size: 156 KiB |
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 9.1 KiB |
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.1 MiB |
Before Width: | Height: | Size: 112 KiB After Width: | Height: | Size: 112 KiB |
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 7.3 KiB |
Before Width: | Height: | Size: 158 KiB After Width: | Height: | Size: 158 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 126 KiB After Width: | Height: | Size: 126 KiB |
Before Width: | Height: | Size: 81 KiB After Width: | Height: | Size: 81 KiB |
Before Width: | Height: | Size: 121 KiB After Width: | Height: | Size: 121 KiB |
Before Width: | Height: | Size: 4.3 MiB After Width: | Height: | Size: 4.3 MiB |
Before Width: | Height: | Size: 96 KiB After Width: | Height: | Size: 96 KiB |
|
@ -133,7 +133,7 @@
|
|||
Foe Frenzy is a game created by <a href="https://ellpeck.de">Ellpeck</a>, a student and indie game developer from Germany. It started as a small project inspired by Mario Kart and similar games, because the short-lasting battle items you can use in those games allow for fast and fun gameplay.
|
||||
</p>
|
||||
<p>
|
||||
Development on the project started early in 2019, back when Foe Frenzy was still considered a small side project. Ellpeck made <a href="https://ellpeck.de/blog-small_projects">a blog post</a> about the process of Foe Frenzy's early creation in which he described how creating small projects is easier. After a while of developing the game, Ellpeck took a break from it due to lack of motivation. When he came back to it about two months later, he decided to turn Foe Frenzy into a bigger project, which included redesigning the art for the game, as well as the plan to turn it into a commercial project. Shortly after the rework, he made <a href="https://ellpeck.de/blog-big_projects">a second blog post</a> about this decision.
|
||||
Development on the project started early in 2019, back when Foe Frenzy was still considered a small side project. Ellpeck made <a href="https://ellpeck.de/blog/small_projects">a blog post</a> about the process of Foe Frenzy's early creation in which he described how creating small projects is easier. After a while of developing the game, Ellpeck took a break from it due to lack of motivation. When he came back to it about two months later, he decided to turn Foe Frenzy into a bigger project, which included redesigning the art for the game, as well as the plan to turn it into a commercial project. Shortly after the rework, he made <a href="https://ellpeck.de/blog/big_projects">a second blog post</a> about this decision.
|
||||
</p>
|
||||
<p>With Foe Frenzy, Ellpeck hopes to have created a game that brings fun and banter to many friend groups' gaming meetups.</p>
|
||||
|
||||
|
|
30
index.html
|
@ -12,8 +12,8 @@
|
|||
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto">
|
||||
<link rel="stylesheet" href="style/prettify.css">
|
||||
<link rel="stylesheet" href="style/style.css">
|
||||
<link rel="stylesheet" href="./style/prettify.css">
|
||||
<link rel="stylesheet" href="./style/style.css">
|
||||
<link rel="icon" href="favicon.ico">
|
||||
|
||||
<meta property="og:title" content="Ellpeck.de">
|
||||
|
@ -28,8 +28,8 @@
|
|||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"></script>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/gh/google/code-prettify@master/loader/prettify.js"></script>
|
||||
<script src="scripts/util.js"></script>
|
||||
<script src="scripts/main.js"></script>
|
||||
<script src="./scripts/util.js"></script>
|
||||
<script src="./scripts/main.js"></script>
|
||||
|
||||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XC0W9LJMCJ"></script>
|
||||
|
@ -48,11 +48,11 @@
|
|||
<body data-spy="scroll" data-target="#navbar">
|
||||
<!-- Navbar -->
|
||||
<nav class="navbar fixed-top navbar-expand-lg navbar-light bg-light rounded-bottom" id="navbar">
|
||||
<script src="scripts/navbar.js"></script>
|
||||
<script src="./scripts/navbar.js"></script>
|
||||
|
||||
<!-- Navbar brand and logo -->
|
||||
<a class="navbar-brand mb-0 h1" href="#">
|
||||
<img src="res/logo.png" width="40" height="40" alt=""> Ellpeck.de
|
||||
<img src="./res/logo.png" width="40" height="40" alt=""> Ellpeck.de
|
||||
</a>
|
||||
|
||||
<!-- Responsive navbar menu opener -->
|
||||
|
@ -80,7 +80,7 @@
|
|||
<!-- Content -->
|
||||
<div class="container main">
|
||||
<!-- Cookie notification -->
|
||||
<script src="scripts/cookieinfo.js"></script>
|
||||
<script src="./scripts/cookieinfo.js"></script>
|
||||
|
||||
<div id="main">
|
||||
<div class="no-blog">
|
||||
|
@ -89,11 +89,11 @@
|
|||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-auto">
|
||||
<img src="res/me.png" class="rounded-circle" width="200" height="200" id="navbar-image">
|
||||
<img src="./res/me.png" class="rounded-circle" width="200" height="200" id="navbar-image">
|
||||
</div>
|
||||
<div class="col">
|
||||
<h1 class="display-4" id="intro-text"></h1>
|
||||
<script src="scripts/greet.js"></script>
|
||||
<script src="./scripts/greet.js"></script>
|
||||
<p class="lead">Welcome to my little website! I'm Ellpeck, a student and programmer from Germany. I do a lot of stuff, actually. My life is pretty busy.</p>
|
||||
|
||||
<!-- Sponsor buttons -->
|
||||
|
@ -117,7 +117,7 @@
|
|||
<div id="project-list">
|
||||
<em>The content that should be here is dynamically generated. Please enable JavaScript if you see this.</em>
|
||||
</div>
|
||||
<script src="scripts/projects.js"></script>
|
||||
<script src="./scripts/projects.js"></script>
|
||||
</div>
|
||||
|
||||
<!-- Social -->
|
||||
|
@ -145,7 +145,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<script src="scripts/social.js"></script>
|
||||
<script src="./scripts/social.js"></script>
|
||||
</div>
|
||||
|
||||
<!-- About -->
|
||||
|
@ -158,7 +158,7 @@
|
|||
<div id="about-list">
|
||||
<em>The content that should be here is dynamically generated. Please enable JavaScript if you see this.</em>
|
||||
</div>
|
||||
<script src="scripts/about.js"></script>
|
||||
<script src="./scripts/about.js"></script>
|
||||
</div>
|
||||
|
||||
<!-- Blog -->
|
||||
|
@ -176,7 +176,7 @@
|
|||
<div id="blog-archive">
|
||||
<em>The content that should be here is dynamically generated. Please enable JavaScript if you see this.</em>
|
||||
</div>
|
||||
<script src="scripts/blog.js"></script>
|
||||
<script src="./scripts/blog.js"></script>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -187,8 +187,8 @@
|
|||
<span class="text-muted"><a href="https://git.ellpeck.de/Ellpeck/Web">© 2018-2021 Ellpeck</a> – <a href="#impressum">Impressum</a> – <a href="#privacy">Privacy</a></span>
|
||||
<div class="quote">
|
||||
<span id="quote-text"></span>
|
||||
<script src="scripts/quote.js"></script>
|
||||
<img src="res/blobheart.png" id="blobheart">
|
||||
<script src="./scripts/quote.js"></script>
|
||||
<img src="./res/blobheart.png" id="blobheart">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
22
node/blog.js
|
@ -9,16 +9,26 @@ console.log("Refreshing blog sub-sites...");
|
|||
|
||||
fs.readFile(folder + "index.html", function (_, html) {
|
||||
let templateDom = new JSDOM(html);
|
||||
// remove all non-blog stuff from the template (which is just our index.html)
|
||||
let noBlog = templateDom.window.document.getElementsByClassName("no-blog");
|
||||
while (noBlog.length > 0)
|
||||
noBlog[0].parentNode.removeChild(noBlog[0]);
|
||||
// change all relative links to move to the parent directory (since we're in blog/)
|
||||
let elements = templateDom.window.document.getElementsByTagName("*");
|
||||
for (let i = 0; i < elements.length; i++) {
|
||||
let element = elements[i];
|
||||
if (element.src && element.src.startsWith("./"))
|
||||
element.src = "../" + element.src.substring(2);
|
||||
if (element.href && element.href.startsWith("./"))
|
||||
element.href = "../" + element.href.substring(2);
|
||||
}
|
||||
let template = templateDom.serialize();
|
||||
|
||||
fs.readFile(folder + "blog/posts.json", function (_, data) {
|
||||
fs.readFile(folder + "blogsrc/posts.json", function (_, data) {
|
||||
let json = JSON.parse(data);
|
||||
for (let i = 0; i < json.length; i++) {
|
||||
let post = json[i];
|
||||
fs.readFile(folder + "blog/" + post.id + ".md", function (_, content) {
|
||||
fs.readFile(folder + "blogsrc/" + post.id + ".md", function (_, content) {
|
||||
let dom = new JSDOM(template);
|
||||
let document = dom.window.document;
|
||||
|
||||
|
@ -31,10 +41,10 @@ fs.readFile(folder + "index.html", function (_, html) {
|
|||
nav += '<a class="nav-item nav-link" href="/#blog">Back to Main Page</a>';
|
||||
let last = getAdjacentPost(json, i, -1);
|
||||
if (last)
|
||||
nav += '<a class="nav-item nav-link" href="/blog-' + last.id + '">Previous Post</a>';
|
||||
nav += '<a class="nav-item nav-link" href="/blog/' + last.id + '">Previous Post</a>';
|
||||
let next = getAdjacentPost(json, i, 1);
|
||||
if (next)
|
||||
nav += '<a class="nav-item nav-link" href="/blog-' + next.id + '">Next Post</a>';
|
||||
nav += '<a class="nav-item nav-link" href="/blog/' + next.id + '">Next Post</a>';
|
||||
document.getElementById("nav-items").innerHTML = nav;
|
||||
|
||||
let c = "";
|
||||
|
@ -53,7 +63,9 @@ fs.readFile(folder + "index.html", function (_, html) {
|
|||
document.getElementById("main").innerHTML = c;
|
||||
|
||||
let ret = dom.serialize();
|
||||
fs.writeFile(folder + "blog-" + post.id + ".html", ret, function (_, _) {});
|
||||
fs.mkdir(folder + "blog", function () {
|
||||
fs.writeFile(folder + "blog/" + post.id + ".html", ret, function (_, _) {});
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
|
@ -31,17 +31,17 @@ function createFeed(callback) {
|
|||
}
|
||||
});
|
||||
|
||||
fs.readFile(__dirname + "/../blog/posts.json", function (_, data) {
|
||||
fs.readFile(__dirname + "/../blogsrc/posts.json", function (_, data) {
|
||||
let json = JSON.parse(data);
|
||||
for (let i = json.length - 1; i >= 0; i--) {
|
||||
let post = json[i];
|
||||
let date = new Date(post.date);
|
||||
|
||||
fs.readFile(__dirname + "/../blog/" + post.id + ".md", function (_, content) {
|
||||
fs.readFile(__dirname + "/../blogsrc/" + post.id + ".md", function (_, content) {
|
||||
let html = converter.makeHtml(content.toString());
|
||||
feed.addItem({
|
||||
title: post.name + (post.archived ? " (Archived)" : ""),
|
||||
link: "https://ellpeck.de/blog-" + post.id,
|
||||
link: "https://ellpeck.de/blog/" + post.id,
|
||||
description: post.summary,
|
||||
content: html,
|
||||
date: date,
|
||||
|
|
|
@ -6,7 +6,7 @@ $("#blog-archive-button").on("click", function () {
|
|||
|
||||
$.ajax({
|
||||
dataType: "json",
|
||||
url: "blog/posts.json",
|
||||
url: "blogsrc/posts.json",
|
||||
cache: false,
|
||||
success: function (json) {
|
||||
let list = $('#blog-list');
|
||||
|
@ -18,7 +18,7 @@ $.ajax({
|
|||
let p = "";
|
||||
p += '<div class="card bg-light blog-entry rounded-0">';
|
||||
p += '<div class="card-body">';
|
||||
p += '<h4 class="card-title"><a class="blog-button" href="/blog-' + obj.id + '">' + obj.name + '</a></h4>';
|
||||
p += '<h4 class="card-title"><a class="blog-button" href="/blog/' + obj.id + '">' + obj.name + '</a></h4>';
|
||||
p += '<div class="card-text text-muted blog-summary">' + obj.summary + '</div>';
|
||||
p += '<span class="text-muted project-status">' + obj.date + "</span>";
|
||||
p += '</div></div>';
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
let dark = getCookie("dark") === "true";
|
||||
let pride = new Date().getMonth() == 5;
|
||||
const dark = getCookie("dark") === "true";
|
||||
const pride = new Date().getMonth() == 5;
|
||||
const loc = $("script").last().attr("src").split("/")[0];
|
||||
|
||||
if (dark) {
|
||||
document.write('<link rel="stylesheet" href="style/dark.css">')
|
||||
document.write('<link rel="stylesheet" href="style/prettify-dark.css">')
|
||||
document.write(`<link rel="stylesheet" href="${loc}/style/dark.css">`)
|
||||
document.write(`<link rel="stylesheet" href="${loc}/style/prettify-dark.css">`)
|
||||
}
|
||||
if (pride)
|
||||
document.write('<link rel="stylesheet" href="style/pride.css">')
|
||||
document.write(`<link rel="stylesheet" href="${loc}/style/pride.css">`)
|
||||
|
||||
$(function () {
|
||||
let openModals = function (hash) {
|
||||
|
|