Fixed compatibility issues with GitHub Pages.
This commit is contained in:
parent
738eea756d
commit
5bceb5af72
14 changed files with 58 additions and 101 deletions
|
|
@ -2,7 +2,7 @@
|
|||
layout: skeleton.njk
|
||||
---
|
||||
<main>
|
||||
<p>You are seeing the documentation for: <a href="{{ projectData.url }}">{{ projectData.fileSlug }}</a></p>
|
||||
<p>You are seeing the documentation for: <span class="rainbowText">{{ projectData.fileSlug }}</span></p>
|
||||
<hr>
|
||||
<div>
|
||||
{{ content | safe }}
|
||||
|
|
|
|||
|
|
@ -6,12 +6,16 @@
|
|||
{% if item.fileSlug == project %}
|
||||
{% set projectData = item %}
|
||||
<div class="featuredProject">
|
||||
<a href="/projects/{{ project }}">
|
||||
<img src="{% if projectData.data.logo %}/projects/{{project}}/{{ projectData.data.logo }}{% else %}/assets/mod-placeholder.png{% endif %}">
|
||||
<a href="{{ ('/projects/' + project) | url }}">
|
||||
{% if projectData.data.logo %}
|
||||
<img src="{{ ('/projects/' ~ project ~ '/' ~ projectData.data.logo) | url }}">
|
||||
{% else %}
|
||||
<img src="{{ '/assets/mod-placeholder.png' | url }}">
|
||||
{% endif %}
|
||||
</a>
|
||||
<div>
|
||||
<p class="featuredProjectName">{{ projectData.data.name }}</p>
|
||||
<p class="featuredProjectSubtitle">by <a href="/authors/{{ projectData.data.author }}/">{{ 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>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -2,14 +2,14 @@
|
|||
<div id="linksBox">
|
||||
<div id="headerLinksAndTitle">
|
||||
<div id="logoTitle">
|
||||
<img src="/assets/logo.png" id="logo">
|
||||
<img src="{{ '/assets/logo.png' | url }}" id="logo">
|
||||
<h1 id="title" class="rainbowText">neoBeta</h1>
|
||||
</div>
|
||||
<ul id="headerLinks">
|
||||
<li><a href="/">home</a></li>
|
||||
<li><a href="/search">search</a></li>
|
||||
<li><a href="/allprojects">index</a></li>
|
||||
<li><a href="/contribute">contribute</a></li>
|
||||
<li><a href="{{ '/' | url }}">home</a></li>
|
||||
<li><a href="{{ '/search' | url }}">search</a></li>
|
||||
<li><a href="{{ '/allprojects' | url}}">index</a></li>
|
||||
<li><a href="{{ '/contribute' | url}}">contribute</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<p id="credits">Adrian Victor, 2025 (<a href="https://git.disroot.org/adrianvictor/neoBeta">Unlicense</a>)</p>
|
||||
|
|
|
|||
|
|
@ -5,16 +5,16 @@ styles: ["project"]
|
|||
<div id="project">
|
||||
<div id="projectHeader">
|
||||
{% if logo %}
|
||||
<img src="{{ page.dir }}{{ logo }}">
|
||||
<img src="{{ ('/projects/' + projectSlug + '/' + logo) | url }}">
|
||||
{% endif %}
|
||||
<div id="projectTitleSubtitle">
|
||||
<div id="projectTitleAuthor">
|
||||
<h1 id="projectTitle">{{ name }}</h1>
|
||||
<p id="projectAuthor">by <a href="/authors/{{ author }}">{{ author }}</a></p>
|
||||
<p id="projectAuthor">by <a href="{{ ('/authors/' + author) | url }}">{{ author }}</a></p>
|
||||
</div>
|
||||
<p id="projectSubtitle">{{ subtitle }}</p>
|
||||
</div>
|
||||
<a id="downloadLink" href="{{ downloadLink }}"><button id="downloadButton">{% if downloadLink %}Download{% else %}Unavailable{% endif %}</button></a>
|
||||
<a id="downloadLink" href="{{ downloadLink | url}}"><button id="downloadButton">{% if downloadLink %}Download{% else %}Unavailable{% endif %}</button></a>
|
||||
</div>
|
||||
{% if links or docs or images or releases %}
|
||||
<div id="projectImagesAndInfo">
|
||||
|
|
@ -25,7 +25,7 @@ styles: ["project"]
|
|||
<p>{{ links | length }} links.</p>
|
||||
<ul>
|
||||
{% for label, addr in links %}
|
||||
<li><a href="{{ addr }}">{{ label }}</a></li>
|
||||
<li><a href="{{ addr | url}}">{{ label }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
|
@ -33,7 +33,7 @@ styles: ["project"]
|
|||
<p>{{ docs | length }} documentaion files.</p>
|
||||
<ul>
|
||||
{% for label, addr in docs %}
|
||||
<li><a href="{{ addr }}">{{ label }}</a></li>
|
||||
<li><a href="{{ addr | url }}">{{ label }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,10 @@
|
|||
<p>Images</p>
|
||||
<div id="projectCarrouselImageHolder">
|
||||
{% for image in images %}
|
||||
<a href="{{ page.dir }}{{ image }}"><img class="projectImage" src="{{ page.dir }}{{ image }}" alt=""></a>
|
||||
{% set dir = (page.filePathStem | default(page.url) ) | replace('/index','') %}
|
||||
<a href="{{ (dir ~ '/' ~ image) | url }}">
|
||||
<img class="projectImage" src="{{ (dir ~ '/' ~ image) | url }}">
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -2,14 +2,17 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<link rel="stylesheet" href="/assets/stylesheets/styles.css" media="screen">
|
||||
<link rel="stylesheet" href="{{ '/assets/stylesheets/styles.css' | url }}" media="screen">
|
||||
{% for stylesheet in styles %}
|
||||
<link rel="stylesheet" href="/assets/stylesheets/{{ stylesheet }}.css">
|
||||
<link rel="stylesheet" href="{{ ('/assets/stylesheets/' + stylesheet + '.css') | url }}">
|
||||
{% endfor %}
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{% if name %}{{ name }} - {% endif %}neoBeta</title>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
window.ELEVENTY_PATH_PREFIX = "{{ pathPrefix | safe }}";
|
||||
</script>
|
||||
<div id="everythingHelper">
|
||||
<aside>
|
||||
{% include "header.njk" %}
|
||||
|
|
|
|||
|
|
@ -6,16 +6,18 @@ pagination:
|
|||
alias: paginatedProjects
|
||||
styles: ["search"]
|
||||
---
|
||||
<h1>Projects Index - page {{ pagination.pageNumber + 1 }}</h1>
|
||||
|
||||
<ul style="display: flex; flex-direction: column; gap: 1em;">
|
||||
{% for project in paginatedProjects %}
|
||||
<div class="searchItem">
|
||||
<p>
|
||||
{% if project.data.logo %}
|
||||
<img float="left" class="searchItemImage" src="{{ project.url }}{{ project.data.logo }}">
|
||||
<img float="left" class="searchItemImage" src="{{ (project.url + project.data.logo) | url }}">
|
||||
{% endif %}
|
||||
<a class="searchItemTitle" href="{{ project.url }}">{{ project.data.name }}</a>
|
||||
<a class="searchItemTitle" href="{{ project.url | url }}">{{ project.data.name }}</a>
|
||||
{% if project.data.author %}
|
||||
by <a href="/authors/{{ project.data.author }}">{{ project.data.author }}</a>
|
||||
by <a href="{{ ('/authors/' + project.data.author) | url }}">{{ project.data.author }}</a>
|
||||
{% endif %}
|
||||
</p>
|
||||
<p class="searchItemDescription">{{ project.data.subtitle }}</p>
|
||||
|
|
@ -30,9 +32,9 @@ styles: ["search"]
|
|||
|
||||
<nav>
|
||||
{% if pagination.href.previous %}
|
||||
<a href="{{ pagination.href.previous }}">Prev</a>
|
||||
<a href="{{ pagination.href.previous | url }}">Prev</a>
|
||||
{% endif %}
|
||||
{% if pagination.href.next %}
|
||||
<a href="{{ pagination.href.next }}">Next</a>
|
||||
<a href="{{ pagination.href.next | url }}">Next</a>
|
||||
{% endif %}
|
||||
</nav>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
fetch('/search_index.json')
|
||||
function url(path) {
|
||||
const prefix = (window.ELEVENTY_PATH_PREFIX || '').replace(/\/$/,'');
|
||||
return (prefix ? prefix + '/' : '/') + path.replace(/^\/+/,'');
|
||||
}
|
||||
|
||||
fetch(url("search_index.json"))
|
||||
.then(r => r.json())
|
||||
.then(data => {
|
||||
const idx = elasticlunr.Index.load(data);
|
||||
|
|
@ -28,7 +33,7 @@ fetch('/search_index.json')
|
|||
});
|
||||
|
||||
return `<div class="searchItem">
|
||||
<p>${doc.image ? `<img float=left class="searchItemImage" src="${doc.image}">` : ''} <a class="searchItemTitle" href="${doc.url}">${doc.title}</a>${doc.author ? ` by <a href="/authors/${doc.author}">${doc.author}</a>` : ''}</p>
|
||||
<p>${doc.image ? `<img float=left class="searchItemImage" src="${url(doc.image)}">` : ''} <a class="searchItemTitle" href="${url(doc.url)}">${doc.title}</a>${doc.author ? ` by <a href="${ url('/authors/' + doc.author) }">${doc.author}</a>` : ''}</p>
|
||||
<p class="searchItemDescription">${doc.subtitle}</p>
|
||||
<div class="searchItemTagHolder">
|
||||
${tagsHTML}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
@font-face {
|
||||
font-family: Minecraft;
|
||||
src: url("/assets/MinecraftRegular-Bmg3.otf") format("opentype");
|
||||
src: url("../MinecraftRegular-Bmg3.otf") format("opentype");
|
||||
}
|
||||
|
||||
body {
|
||||
|
|
|
|||
34
src/contribute.md
Normal file
34
src/contribute.md
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
---
|
||||
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.
|
||||
- *downloadLink* - link for when you click the download link.
|
||||
- *images* - lists of image files names or URLs that will appear in the project page.
|
||||
- *logo* - your logo file name or URL.
|
||||
|
||||
### Config file example
|
||||
```
|
||||
{
|
||||
"name": "Ghosts 'n Stuff",
|
||||
"subtitle": "Miscellaneous additions to your server.",
|
||||
"author": "tenkuma",
|
||||
"downloadLink": "https://example.com",
|
||||
"images": "["image1.png", "image2.png", "image3.png"]",
|
||||
"logo": "logo.png",
|
||||
"tags": ["plugin", "mod"]
|
||||
}
|
||||
```
|
||||
|
|
@ -3,7 +3,7 @@ styles: ["search"]
|
|||
layout: "base.njk"
|
||||
---
|
||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/elasticlunr/0.9.6/elasticlunr.min.js"></script>
|
||||
<script src="/assets/search.js" defer></script>
|
||||
<script src="{{ '/assets/search.js' | url }}" defer></script>
|
||||
|
||||
<style>
|
||||
main {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue