Merge pull request #3 from adrianvic/project-releases
Proper message for when GitHub integration is disabled. Contribute now links to README.md. Fixed minor bug in authors page preventing the correct logo URL to be injected.
This commit is contained in:
commit
0e133f814d
5 changed files with 51 additions and 116 deletions
|
|
@ -55,6 +55,7 @@ export default function (eleventyConfig) {
|
||||||
eleventyConfig.addPassthroughCopy({ "src/favicon/*" : "/" });
|
eleventyConfig.addPassthroughCopy({ "src/favicon/*" : "/" });
|
||||||
eleventyConfig.addGlobalData("pathPrefix", pathPrefix);
|
eleventyConfig.addGlobalData("pathPrefix", pathPrefix);
|
||||||
eleventyConfig.addGlobalData("buildTime", buildTime);
|
eleventyConfig.addGlobalData("buildTime", buildTime);
|
||||||
|
eleventyConfig.addGlobalData("isProduction", isProd);
|
||||||
|
|
||||||
eleventyConfig.addCollection("projects", function(collection) {
|
eleventyConfig.addCollection("projects", function(collection) {
|
||||||
const col = collection.getFilteredByGlob("src/projects/*/*.md");
|
const col = collection.getFilteredByGlob("src/projects/*/*.md");
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,9 @@ styles: ["project"]
|
||||||
---
|
---
|
||||||
<div id="project">
|
<div id="project">
|
||||||
<div id="projectHeader">
|
<div id="projectHeader">
|
||||||
<img src="{{ page.dir }}{{ logoName }}.{{ logoExtension }}">
|
{% if logo %}
|
||||||
|
<img src="{{ logo | url }}">
|
||||||
|
{% endif %}
|
||||||
<div id="projectTitleSubtitle">
|
<div id="projectTitleSubtitle">
|
||||||
<div id="projectTitleAuthor">
|
<div id="projectTitleAuthor">
|
||||||
<h1 id="projectTitle">{{ name }}</h1>
|
<h1 id="projectTitle">{{ name }}</h1>
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
<li><a href="{{ '/' | url }}">home</a></li>
|
<li><a href="{{ '/' | url }}">home</a></li>
|
||||||
<li><a href="{{ '/search' | url }}">search</a></li>
|
<li><a href="{{ '/search' | url }}">search</a></li>
|
||||||
<li><a href="{{ '/allprojects' | url}}">index</a></li>
|
<li><a href="{{ '/allprojects' | url}}">index</a></li>
|
||||||
<li><a href="{{ '/contribute' | url}}">contribute</a></li>
|
<li><a href="https://github.com/adrianvic/neoBeta?tab=readme-ov-file#contributing">contribute</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<p id="credits">Adrian Victor, 2025 (<a href="https://git.disroot.org/adrianvictor/neoBeta">Unlicense</a>)</p>
|
<p id="credits">Adrian Victor, 2025 (<a href="https://git.disroot.org/adrianvictor/neoBeta">Unlicense</a>)</p>
|
||||||
|
|
|
||||||
|
|
@ -19,15 +19,28 @@ layout: base.njk
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if project.data.releaseType %}
|
{% if project.data.releaseType %}
|
||||||
|
{% if project.data.releaseType == "github" and not isProduction %}
|
||||||
|
<p>Sorry, but this instance of neoBeta cannot fetch GitHub releases, please follow <a href="https://github.com/{{ project.data.githubRepoOwner }}/{{ project.data.githubRepoName }}/">this link</a> to see them.</p>
|
||||||
|
<p class="errorQuote"><i>"Take us down, and we keep trying<br>Forty thousand feet, keep flying"</i></p>
|
||||||
|
{% else %}
|
||||||
{% if project.data.releaseType == "github" %}
|
{% if project.data.releaseType == "github" %}
|
||||||
{% set releases = project.data.githubRepoOwner | githubReleases(project.data.githubRepoName) %}
|
{% set releases = project.data.githubRepoOwner | githubReleases(project.data.githubRepoName) %}
|
||||||
<p class="rainbowText">{{ releases | length }} releases fetched from GitHub at {{ buildTime }}.</p>
|
<p>Fetched from GitHub at {{ buildTime }}.</p>
|
||||||
|
{% else %}
|
||||||
|
{% set releases = project.data.releases %}
|
||||||
|
{% endif %}
|
||||||
|
<p class="rainbowText">{{ releases | length }} releases.</p>
|
||||||
<div style="display: flex; flex-direction: column; gap: 1em;">
|
<div style="display: flex; flex-direction: column; gap: 1em;">
|
||||||
{% for release in releases %}
|
{% for release in releases %}
|
||||||
<div>
|
<div>
|
||||||
<h2>{{ release.name }}</h2>
|
<h2>{{ release.name }}</h2>
|
||||||
|
{% if project.data.releaseType == "github" %}
|
||||||
<p>{{ release.tag_name }} for {{ project.data.gameLoaders or "unknown loader" }} {{ project.data.gameVersions or "unknow version" }}</p>
|
<p>{{ release.tag_name }} for {{ project.data.gameLoaders or "unknown loader" }} {{ project.data.gameVersions or "unknow version" }}</p>
|
||||||
|
{% else %}
|
||||||
|
<p>Version {{ release.version }} for {{ project.data.gameLoaders or "unknown loader" }} {{ project.data.gameVersions or "unknow version" }}</p>
|
||||||
|
{% endif %}
|
||||||
<div style="padding: .6em; background-color: var(--accent-background); border-radius: 4px;">
|
<div style="padding: .6em; background-color: var(--accent-background); border-radius: 4px;">
|
||||||
|
{% if project.data.releaseType == "github" %}
|
||||||
<div class="oneLineClamp">
|
<div class="oneLineClamp">
|
||||||
<p><a href="{{release.html_url}}">Download on GitHub.</a><p>
|
<p><a href="{{release.html_url}}">Download on GitHub.</a><p>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -37,18 +50,7 @@ layout: base.njk
|
||||||
<div class="oneLineClamp">
|
<div class="oneLineClamp">
|
||||||
<p><a href="{{ release.zipball_url }}">Source code zipball <span class="dimText">{{ release.zipball_url }}</span></a></p>
|
<p><a href="{{ release.zipball_url }}">Source code zipball <span class="dimText">{{ release.zipball_url }}</span></a></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{% else %}
|
||||||
</div>
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
{% if project.data.releaseType == "local" %}
|
|
||||||
<p class="rainbowText">{{ project.data.releases | length }} releases.</p>
|
|
||||||
<div style="display: flex; flex-direction: column; gap: 1em;">
|
|
||||||
{% for release in project.data.releases %}
|
|
||||||
<div>
|
|
||||||
<h2>{{ release.name }}</h2>
|
|
||||||
<p>Version {{ release.version }} for {{ release.gameLoaders or project.data.gameLoaders }} {{ release.gameVersions or project.data.gameVersions }}</p>
|
|
||||||
{% if release.downloads %}
|
{% if release.downloads %}
|
||||||
<div style="padding: .6em; background-color: var(--accent-background); border-radius: 4px;">
|
<div style="padding: .6em; background-color: var(--accent-background); border-radius: 4px;">
|
||||||
{% for label, addr in release.downloads %}
|
{% for label, addr in release.downloads %}
|
||||||
|
|
@ -58,6 +60,8 @@ layout: base.njk
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,72 +0,0 @@
|
||||||
---
|
|
||||||
layout: "base.njk"
|
|
||||||
---
|
|
||||||
## How can I get my project here?
|
|
||||||
|
|
||||||
neoBeta is an open-source content management system. There are various ways you can put your plugin/mod on our catalog:
|
|
||||||
- Clone [neoBeta's repository](https://github.com/adrianvic/neoBeta), create your project folder inside the /projects directory with the necessary metadata (index.md for project description, index.json for metadata and any other file your project may depend on) and make a pull request. Less manual work on our side, so review should be quickier.
|
|
||||||
- Open an issue on our GitHub repository with the project information. This may take longer as a contributor will have to spend time creating the project files, but is useful if you're not confortable using Git.
|
|
||||||
- Host your own instance of neoBeta.
|
|
||||||
|
|
||||||
### Required metadata fields
|
|
||||||
- *name* - project name.
|
|
||||||
- *subtitle* - project's brief description.
|
|
||||||
- *author* - your author name, must be consistent across all your submissions.
|
|
||||||
- *tags* - whether your project is a plugin or mod.
|
|
||||||
|
|
||||||
### Optional metadata fields
|
|
||||||
Please fill as many fields as possible.
|
|
||||||
- *images* - lists of image files names or URLs that will appear in the project page.
|
|
||||||
- *logo* - your logo file name or URL.
|
|
||||||
- *gameVersions* - taget Minecraft versions.
|
|
||||||
- *gameLoaders* - supported modloaders.
|
|
||||||
|
|
||||||
### Releases metadata
|
|
||||||
- *releasesType* - wheter your project uses `local` releases or `github`.
|
|
||||||
|
|
||||||
For local releases:
|
|
||||||
- *releases* - a list of relases labels and links.
|
|
||||||
- *name* - name of the release.
|
|
||||||
- *version* - version of the release.
|
|
||||||
- *gameVersions* - taget Minecraft versions (overrides default value).
|
|
||||||
- *gameLoaders* - supported modloaders (overrides default value).
|
|
||||||
- *downloads* - list of download links for this release.
|
|
||||||
|
|
||||||
For GitHub releases:
|
|
||||||
- *githubRepoOwner* - username of the repo owner.
|
|
||||||
- *githubReponame* - name of the repository.
|
|
||||||
|
|
||||||
### Config file example
|
|
||||||
```
|
|
||||||
{
|
|
||||||
"name": "Ghosts 'n Stuff",
|
|
||||||
"subtitle": "Miscellaneous additions to your Minecraft server.",
|
|
||||||
"author": "tenkuma",
|
|
||||||
"downloadLink": "https://modrinth.com/plugin/ghosts/versions",
|
|
||||||
"images": ["anti-spam.png", "rainbow-chat.png", "skibidi-blocker.png"],
|
|
||||||
"logo": "logo.png",
|
|
||||||
"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",
|
|
||||||
"gameLoaders": ["Craftbukkit"]
|
|
||||||
"releases": [
|
|
||||||
{
|
|
||||||
"name": "The first release.",
|
|
||||||
"version": "1.0.0",
|
|
||||||
"gameVersions": ["b1.7.3"],
|
|
||||||
"downloads": {
|
|
||||||
"GitHub": "https://example.com",
|
|
||||||
"Modrinth": "https://modrinth.com"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
```
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue