Merge pull request #1 from adrianvic/project-releases

Added built-in support for project releases with GitHub integration for fetching repo releases.
This commit is contained in:
Tenkuma 2025-10-29 20:49:39 -03:00 committed by GitHub
commit c925ef5304
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 422 additions and 34 deletions

2
.gitignore vendored
View file

@ -16,3 +16,5 @@
# Visual Studio Code # Visual Studio Code
/.vscode /.vscode
.history .history
.env

View file

@ -1,12 +1,38 @@
import elasticlunr from 'elasticlunr'; import elasticlunr from 'elasticlunr';
import fs from 'fs'; import fs from 'fs';
import path from 'path'; import path from 'path';
import fetch from "node-fetch";
import 'dotenv/config';
let allPlugins = []; let allPlugins = [];
const isProd = process.env.ELEVENTY_ENV === "production"; const isProd = process.env.ELEVENTY_ENV === "production";
const pathPrefix = isProd ? "/neoBeta/" : "/"; const pathPrefix = isProd ? "/neoBeta/" : "/";
const buildTime = new Date(Date.now()).toISOString();
export default function (eleventyConfig) { export default function (eleventyConfig) {
eleventyConfig.addNunjucksAsyncFilter("githubReleases", async function(owner, repo, callback) {
const token = process.env.GITHUB_ACCESS_TOKEN;
if (!owner || !repo) return callback(null, []);
const url = `https://api.github.com/repos/${owner}/${repo}/releases`;
try {
const res = await fetch(url, {
headers: {
Authorization: `Bearer ${token}`,
Accept: "application/vnd.github+json",
"User-Agent": "eleventy-build"
}
});
if (!res.ok) return callback(null, [ name = "Error fetching releases for GitHub project." ]);
const data = await res.json();
callback(null, data);
} catch (err) {
console.error(err);
callback(null, []);
}
});
eleventyConfig.setInputDirectory("src"); eleventyConfig.setInputDirectory("src");
eleventyConfig.setOutputDirectory("public"); eleventyConfig.setOutputDirectory("public");
eleventyConfig.addPassthroughCopy("src/projects/**/*.png"); eleventyConfig.addPassthroughCopy("src/projects/**/*.png");
@ -17,13 +43,14 @@ export default function (eleventyConfig) {
eleventyConfig.addPassthroughCopy("src/authors/**/*.jpeg"); eleventyConfig.addPassthroughCopy("src/authors/**/*.jpeg");
eleventyConfig.addPassthroughCopy("src/assets"); eleventyConfig.addPassthroughCopy("src/assets");
eleventyConfig.addPassthroughCopy({ "src/favicon/*" : "/" }); eleventyConfig.addPassthroughCopy({ "src/favicon/*" : "/" });
eleventyConfig.addGlobalData("pathPrefix", pathPrefix);
eleventyConfig.addGlobalData("buildTime", buildTime);
eleventyConfig.addCollection("projects", function(collection) { eleventyConfig.addCollection("projects", function(collection) {
return collection.getFilteredByGlob("src/projects/*/*.md"); const col = collection.getFilteredByGlob("src/projects/*/*.md");
return col;
}); });
eleventyConfig.addGlobalData("pathPrefix", pathPrefix)
eleventyConfig.addGlobalData("eleventyComputed", { eleventyConfig.addGlobalData("eleventyComputed", {
projectData: (data) => { projectData: (data) => {
const inputPath = data.page.inputPath; const inputPath = data.page.inputPath;

89
gen-github-token.cjs Normal file
View file

@ -0,0 +1,89 @@
require('dotenv').config();
const http = require('http');
const { URL } = require('url');
const fetch = require('node-fetch');
const open = (...args) => import('open').then(m => m.default(...args));
const fs = require('fs');
const path = require('path');
const {
GITHUB_CLIENT_ID,
GITHUB_CLIENT_SECRET,
GITHUB_OAUTH_SCOPES = 'repo,user',
} = process.env;
if (!GITHUB_CLIENT_ID || !GITHUB_CLIENT_SECRET) {
console.error('Set GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET in .env');
process.exit(1);
}
const PORT = 9876;
const REDIRECT_URI = `http://localhost:${PORT}/`;
const STATE = String(Math.random()).slice(2);
function appendEnv(key, value) {
const envPath = path.resolve(process.cwd(), '.env');
const line = `\n${key}=${value}\n`;
fs.appendFileSync(envPath, line, { encoding: 'utf8' });
console.log(`${key} appended to .env`);
}
async function exchangeCodeForToken(code) {
const tokenUrl = 'https://github.com/login/oauth/access_token';
const res = await fetch(tokenUrl, {
method: 'POST',
headers: { Accept: 'application/json', 'Content-Type': 'application/json' },
body: JSON.stringify({
client_id: GITHUB_CLIENT_ID,
client_secret: GITHUB_CLIENT_SECRET,
code,
redirect_uri: REDIRECT_URI,
state: STATE,
}),
});
if (!res.ok) throw new Error(`Token exchange failed: ${res.status}`);
const data = await res.json();
if (data.error) throw new Error(`Token error: ${data.error_description || data.error}`);
return data.access_token;
}
const server = http.createServer(async (req, res) => {
try {
const reqUrl = new URL(req.url, `http://localhost:${PORT}`);
const code = reqUrl.searchParams.get('code');
const state = reqUrl.searchParams.get('state');
if (!code || state !== STATE) {
res.writeHead(400, { 'Content-Type': 'text/plain' });
res.end('Invalid request');
return;
}
res.writeHead(200, { 'Content-Type': 'text/plain' });
res.end('Authorization received. You can close this window.');
console.log('Received code, exchanging for token...');
const token = await exchangeCodeForToken(code);
console.log('Access token received:', token);
// Append token to .env (BE CAREFUL)
appendEnv('GITHUB_ACCESS_TOKEN', token);
} catch (err) {
console.error('Error handling OAuth callback:', err);
} finally {
server.close();
}
});
server.listen(PORT, async () => {
const authUrl =
`https://github.com/login/oauth/authorize` +
`?client_id=${encodeURIComponent(GITHUB_CLIENT_ID)}` +
`&redirect_uri=${encodeURIComponent(REDIRECT_URI)}` +
`&scope=${encodeURIComponent(GITHUB_OAUTH_SCOPES)}` +
`&state=${encodeURIComponent(STATE)}`;
console.log('Opening browser for GitHub authorization...');
await open(authUrl);
console.log(`Listening for OAuth callback at ${REDIRECT_URI}`);
});

205
package-lock.json generated
View file

@ -10,7 +10,10 @@
"license": "Unlicense", "license": "Unlicense",
"dependencies": { "dependencies": {
"@11ty/eleventy": "^3.1.2", "@11ty/eleventy": "^3.1.2",
"dotenv": "^17.2.3",
"elasticlunr": "^0.9.5", "elasticlunr": "^0.9.5",
"node-fetch": "^2.7.0",
"open": "^10.2.0",
"sass": "1.93.2" "sass": "1.93.2"
} }
}, },
@ -702,6 +705,21 @@
"node": ">=8" "node": ">=8"
} }
}, },
"node_modules/bundle-name": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-4.1.0.tgz",
"integrity": "sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q==",
"license": "MIT",
"dependencies": {
"run-applescript": "^7.0.0"
},
"engines": {
"node": ">=18"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/chokidar": { "node_modules/chokidar": {
"version": "3.6.0", "version": "3.6.0",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz",
@ -758,6 +776,46 @@
} }
} }
}, },
"node_modules/default-browser": {
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/default-browser/-/default-browser-5.2.1.tgz",
"integrity": "sha512-WY/3TUME0x3KPYdRRxEJJvXRHV4PyPoUsxtZa78lwItwRQRHhd2U9xOscaT/YTf8uCXIAjeJOFBVEh/7FtD8Xg==",
"license": "MIT",
"dependencies": {
"bundle-name": "^4.1.0",
"default-browser-id": "^5.0.0"
},
"engines": {
"node": ">=18"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/default-browser-id": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-5.0.0.tgz",
"integrity": "sha512-A6p/pu/6fyBcA1TRz/GqWYPViplrftcW2gZC9q79ngNCKAeR/X3gcEdXQHl4KNXV+3wgIJ1CPkJQ3IHM6lcsyA==",
"license": "MIT",
"engines": {
"node": ">=18"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/define-lazy-prop": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz",
"integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==",
"license": "MIT",
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/depd": { "node_modules/depd": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
@ -853,6 +911,18 @@
"url": "https://github.com/fb55/domutils?sponsor=1" "url": "https://github.com/fb55/domutils?sponsor=1"
} }
}, },
"node_modules/dotenv": {
"version": "17.2.3",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.2.3.tgz",
"integrity": "sha512-JVUnt+DUIzu87TABbhPmNfVdBDt18BLOWjMUFJMSi/Qqg7NTYtabbvSNJGOJ7afbRuv9D/lngizHtP7QyLQ+9w==",
"license": "BSD-2-Clause",
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://dotenvx.com"
}
},
"node_modules/ee-first": { "node_modules/ee-first": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
@ -1225,6 +1295,21 @@
"url": "https://github.com/sponsors/wooorm" "url": "https://github.com/sponsors/wooorm"
} }
}, },
"node_modules/is-docker": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz",
"integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==",
"license": "MIT",
"bin": {
"is-docker": "cli.js"
},
"engines": {
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/is-extendable": { "node_modules/is-extendable": {
"version": "0.1.1", "version": "0.1.1",
"resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz",
@ -1255,6 +1340,24 @@
"node": ">=0.10.0" "node": ">=0.10.0"
} }
}, },
"node_modules/is-inside-container": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz",
"integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==",
"license": "MIT",
"dependencies": {
"is-docker": "^3.0.0"
},
"bin": {
"is-inside-container": "cli.js"
},
"engines": {
"node": ">=14.16"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/is-json": { "node_modules/is-json": {
"version": "2.0.1", "version": "2.0.1",
"resolved": "https://registry.npmjs.org/is-json/-/is-json-2.0.1.tgz", "resolved": "https://registry.npmjs.org/is-json/-/is-json-2.0.1.tgz",
@ -1270,6 +1373,21 @@
"node": ">=0.12.0" "node": ">=0.12.0"
} }
}, },
"node_modules/is-wsl": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-3.1.0.tgz",
"integrity": "sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw==",
"license": "MIT",
"dependencies": {
"is-inside-container": "^1.0.0"
},
"engines": {
"node": ">=16"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/iso-639-1": { "node_modules/iso-639-1": {
"version": "3.1.5", "version": "3.1.5",
"resolved": "https://registry.npmjs.org/iso-639-1/-/iso-639-1-3.1.5.tgz", "resolved": "https://registry.npmjs.org/iso-639-1/-/iso-639-1-3.1.5.tgz",
@ -1527,6 +1645,26 @@
"license": "MIT", "license": "MIT",
"optional": true "optional": true
}, },
"node_modules/node-fetch": {
"version": "2.7.0",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz",
"integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==",
"license": "MIT",
"dependencies": {
"whatwg-url": "^5.0.0"
},
"engines": {
"node": "4.x || >=6.0.0"
},
"peerDependencies": {
"encoding": "^0.1.0"
},
"peerDependenciesMeta": {
"encoding": {
"optional": true
}
}
},
"node_modules/node-retrieve-globals": { "node_modules/node-retrieve-globals": {
"version": "6.0.1", "version": "6.0.1",
"resolved": "https://registry.npmjs.org/node-retrieve-globals/-/node-retrieve-globals-6.0.1.tgz", "resolved": "https://registry.npmjs.org/node-retrieve-globals/-/node-retrieve-globals-6.0.1.tgz",
@ -1593,6 +1731,24 @@
"node": ">= 0.8" "node": ">= 0.8"
} }
}, },
"node_modules/open": {
"version": "10.2.0",
"resolved": "https://registry.npmjs.org/open/-/open-10.2.0.tgz",
"integrity": "sha512-YgBpdJHPyQ2UE5x+hlSXcnejzAvD0b22U2OuAP+8OnlJT+PjWPxtgmGqKKc+RgTM63U9gN0YzrYc71R2WT/hTA==",
"license": "MIT",
"dependencies": {
"default-browser": "^5.2.1",
"define-lazy-prop": "^3.0.0",
"is-inside-container": "^1.0.0",
"wsl-utils": "^0.1.0"
},
"engines": {
"node": ">=18"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/parse-srcset": { "node_modules/parse-srcset": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/parse-srcset/-/parse-srcset-1.0.2.tgz", "resolved": "https://registry.npmjs.org/parse-srcset/-/parse-srcset-1.0.2.tgz",
@ -1728,6 +1884,18 @@
"url": "https://github.com/sponsors/jonschlinkert" "url": "https://github.com/sponsors/jonschlinkert"
} }
}, },
"node_modules/run-applescript": {
"version": "7.1.0",
"resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-7.1.0.tgz",
"integrity": "sha512-DPe5pVFaAsinSaV6QjQ6gdiedWDcRCbUuiQfQa2wmWV7+xC9bGulGI8+TdRmoFkAPaBXk8CrAbnlY2ISniJ47Q==",
"license": "MIT",
"engines": {
"node": ">=18"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/sass": { "node_modules/sass": {
"version": "1.93.2", "version": "1.93.2",
"resolved": "https://registry.npmjs.org/sass/-/sass-1.93.2.tgz", "resolved": "https://registry.npmjs.org/sass/-/sass-1.93.2.tgz",
@ -1935,6 +2103,12 @@
"node": ">=0.6" "node": ">=0.6"
} }
}, },
"node_modules/tr46": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==",
"license": "MIT"
},
"node_modules/uc.micro": { "node_modules/uc.micro": {
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-2.1.0.tgz", "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-2.1.0.tgz",
@ -1956,6 +2130,22 @@
"integrity": "sha512-IGjKp/o0NL3Bso1PymYURCJxMPNAf/ILOpendP9f5B6e1rTJgdgiOvgfoT8VxCAdY+Wisb9uhGaJJf3yZ2V9nw==", "integrity": "sha512-IGjKp/o0NL3Bso1PymYURCJxMPNAf/ILOpendP9f5B6e1rTJgdgiOvgfoT8VxCAdY+Wisb9uhGaJJf3yZ2V9nw==",
"license": "MIT" "license": "MIT"
}, },
"node_modules/webidl-conversions": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==",
"license": "BSD-2-Clause"
},
"node_modules/whatwg-url": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
"integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
"license": "MIT",
"dependencies": {
"tr46": "~0.0.3",
"webidl-conversions": "^3.0.0"
}
},
"node_modules/ws": { "node_modules/ws": {
"version": "8.18.3", "version": "8.18.3",
"resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz", "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz",
@ -1976,6 +2166,21 @@
"optional": true "optional": true
} }
} }
},
"node_modules/wsl-utils": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/wsl-utils/-/wsl-utils-0.1.0.tgz",
"integrity": "sha512-h3Fbisa2nKGPxCpm89Hk33lBLsnaGBvctQopaBSOW/uIs6FTe1ATyAnKFJrzVs9vpGdsTe73WF3V4lIsk4Gacw==",
"license": "MIT",
"dependencies": {
"is-wsl": "^3.1.0"
},
"engines": {
"node": ">=18"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
} }
} }
} }

View file

@ -29,7 +29,10 @@
"homepage": "https://github.com/adrianvic/neoBeta#readme", "homepage": "https://github.com/adrianvic/neoBeta#readme",
"dependencies": { "dependencies": {
"@11ty/eleventy": "^3.1.2", "@11ty/eleventy": "^3.1.2",
"dotenv": "^17.2.3",
"elasticlunr": "^0.9.5", "elasticlunr": "^0.9.5",
"node-fetch": "^2.7.0",
"open": "^10.2.0",
"sass": "1.93.2" "sass": "1.93.2"
} }
} }

View file

@ -15,7 +15,7 @@
</a> </a>
<div> <div>
<p class="featuredProjectName">{{ projectData.data.name }}</p> <p class="featuredProjectName">{{ projectData.data.name }}</p>
<p class="featuredProjectSubtitle">by <a href="{{ '/authors/' + projectData.data.author + '/' | url}}">{{ projectData.data.author }}</a></p> <p class="featuredProjectSubtitle">by <a href="{{ ('/authors/' + projectData.data.author + '/') | url}}">{{ projectData.data.author }}</a></p>
<div class="featuredProjectSubtitle dimText">{{ projectData.data.subtitle }}</div> <div class="featuredProjectSubtitle dimText">{{ projectData.data.subtitle }}</div>
</div> </div>
</div> </div>

View file

@ -14,13 +14,13 @@ styles: ["project"]
</div> </div>
<p id="projectSubtitle">{{ subtitle }}</p> <p id="projectSubtitle">{{ subtitle }}</p>
</div> </div>
<a id="downloadLink" href="{{ downloadLink | url}}"><button id="downloadButton">{% if downloadLink %}Download{% else %}Unavailable{% endif %}</button></a> <a id="downloadLink" href="releases"><button id="downloadButton">{% if downloadLink %}Download{% else %}Unavailable{% endif %}</button></a>
</div> </div>
{% if links or docs or images or releases %} {% if links or docs or images or releaseType %}
<div id="projectImagesAndInfo"> <div id="projectImagesAndInfo">
{% include "project_image.njk" %} {% include "project_image.njk" %}
<div id="projectInfo"> <div id="projectInfo">
<h2>Here's what we found:</h2> <p>Here's what we found about this project:</p>
{% if links %} {% if links %}
<p>{{ links | length }} links.</p> <p>{{ links | length }} links.</p>
<ul> <ul>

29
src/_virtual/releases.njk Normal file
View file

@ -0,0 +1,29 @@
---
pagination:
data: collections.projects
size: 1
alias: project
permalink: "{{ project.url }}releases.html"
layout: base.njk
---
<h1>Releases for {{ project.data.name }}</h1>
{% if project.data.releaseType %}
<p id="projectInfoReleases">
{% if project.data.releaseType == "github" %}
{% set releases = project.data.githubRepoOwner | githubReleases(project.data.githubRepoName) %}
Releases fetched from GitHub at {{ buildTime }}:<br>
{% for release in releases %}
<p><a href="{{ release.html_url }}">{{ release.name }}</a></p>
{% endfor %}
{% endif %}
{% if project.data.releaseType == "local" %}
<p class="rainbowText">{{ project.data.releases | length }} releases.</p>
{% for label, addr in project.data.releases %}
<p><a href="{{ addr | url }}">{{ label }}</a></p>
{% endfor %}
{% endif %}
</p>
{% else %}
<p>Could not find any release for this project...</p>
{% endif %}

View file

@ -100,6 +100,14 @@
overflow-y: auto; overflow-y: auto;
} }
.projectInfoGitHubReleases.less {
overflow: hidden;
display: -webkit-box;
line-clamp: 2;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical
}
@media only screen and (max-width: 1280px) { @media only screen and (max-width: 1280px) {
#projectImagesAndInfo { #projectImagesAndInfo {
flex-direction: column; flex-direction: column;

View file

@ -50,8 +50,8 @@ main {
} }
/* main:last-child { /* main:last-child {
margin-bottom: 0px; margin-bottom: 0px;
padding-bottom: 0px; padding-bottom: 0px;
} */ } */
button { button {
@ -70,6 +70,8 @@ code {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
border-radius: 2px; border-radius: 2px;
display: inline-block; display: inline-block;
max-width: 100%;
overflow-x: auto;
} }
input, select { input, select {
@ -174,9 +176,10 @@ hr {
} }
.featuredProjectSubtitle { .featuredProjectSubtitle {
overflow: hidden; overflow: hidden;
width: 100%; width: 100%;
display: -webkit-box; display: -webkit-box;
line-clamp: 2;
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
-webkit-box-orient: vertical -webkit-box-orient: vertical
} }

View file

@ -16,19 +16,38 @@ neoBeta is an open-source content management system. There are various ways you
### Optional metadata fields ### Optional metadata fields
Please fill as many fields as possible. Please fill as many fields as possible.
- *downloadLink* - link for when you click the download link.
- *images* - lists of image files names or URLs that will appear in the project page. - *images* - lists of image files names or URLs that will appear in the project page.
- *logo* - your logo file name or URL. - *logo* - your logo file name or URL.
### Releases metadata
- *releasesType* - wheter your project uses `local` releases or `github`.
For local releases:
- *releases* - a list of relases labels and links.
For GitHub releases:
- *githubRepoOwner* - username of the repo owner.
- *githubReponame* - name of the repository.
### Config file example ### Config file example
``` ```
{ {
"name": "Ghosts 'n Stuff", "name": "Ghosts 'n Stuff",
"subtitle": "Miscellaneous additions to your server.", "subtitle": "Miscellaneous additions to your Minecraft server.",
"author": "tenkuma", "author": "tenkuma",
"downloadLink": "https://example.com", "downloadLink": "https://modrinth.com/plugin/ghosts/versions",
"images": "["image1.png", "image2.png", "image3.png"]", "images": ["anti-spam.png", "rainbow-chat.png", "skibidi-blocker.png"],
"logo": "logo.png", "logo": "logo.png",
"tags": ["plugin", "mod"] "tags": ["plugin"],
} "links": {
``` "GitHub": "https://github.com/adrianvic/ghostsandstuff",
"Disroot Git": "https://git.disroot.org/adrianvictor/ghostsandstuff"
},
"docs": {
"Installation" : "docs/installation"
},
"releaseType": "github or local",
"githubRepoOwner": "adrianvic",
"githubRepoName": "ghostsandstuff",
"releases": {
"test release": "https://example.com/"
}
}```

View file

@ -11,6 +11,9 @@
"Disroot Git": "https://git.disroot.org/adrianvictor/ghostsandstuff" "Disroot Git": "https://git.disroot.org/adrianvictor/ghostsandstuff"
}, },
"docs": { "docs": {
"Installation" : "docs/example_documentation" "Installation" : "docs/installation"
} },
"releaseType": "github",
"githubRepoOwner": "adrianvic",
"githubRepoName": "ghostsandstuff"
} }