Skip to content

Commit 8516e86

Browse files
feat: Build the resource and service tables based on frontmatter data (#136)
* feat: Build the resource and service tables based on frontmatter data * add: update phrasing of some sections in the community page * fix: missing newlines at end of files
1 parent 431ab5d commit 8516e86

File tree

16 files changed

+200
-34
lines changed

16 files changed

+200
-34
lines changed

docs/assets/stylesheet/theme.css

+26
Original file line numberDiff line numberDiff line change
@@ -837,3 +837,29 @@ body::before {
837837
overflow: auto;
838838
}
839839
}
840+
841+
.esi-community-list td {
842+
line-height: 22px;
843+
font-size: 16px;
844+
}
845+
.esi-community-list td .item-title {
846+
font-size: 18px;
847+
font-weight: 500;
848+
display: inline-block;
849+
padding-bottom: 4px;
850+
}
851+
.esi-community-list .col-30 {
852+
width: 30%;
853+
}
854+
.esi-community-list .col-70 {
855+
max-width: 70%;
856+
}
857+
858+
.esi-community-list svg {
859+
display: inline-block;
860+
width: 18px;
861+
vertical-align: text-bottom;
862+
}
863+
.esi-community-list svg path {
864+
fill: currentColor;
865+
}

docs/community/abyss-tracker/index.md

+5
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ search:
33
exclude: true
44

55
title: Abyss Tracker
6+
type: service
7+
description: A loot tracker specifically for the Abyss Runners in EVE Online. Share your runs and analyze them. Its connected to EVE Workbench for the fits.
8+
maintainer:
9+
name: EVE Workbench Team
10+
github: EVE-Workbench
611
---
712

813
# Abyss Tracker

docs/community/alliance-auth/index.md

+5
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ search:
33
exclude: true
44

55
title: Alliance Auth
6+
type: service
7+
description: An auth system for EVE Online to help in-game organizations manage online service access.
8+
maintainer:
9+
name: Alliance Auth Team
10+
gitlab: allianceauth
611
---
712

813
# Alliance Auth

docs/community/django-esi/index.md

+5
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ search:
33
exclude: true
44

55
title: Django-ESI
6+
type: resource
7+
description: Django app for easy access to the EVE Swagger Interface (ESI)
8+
maintainer:
9+
name: Alliance Auth Team
10+
gitlab: allianceauth
611
---
712

813
# Django-ESI

docs/community/eve-workbench/index.md

+5
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ search:
33
exclude: true
44

55
title: EVE Workbench
6+
type: service
7+
description: A web based tool for the EVE community, allowing players to browse the market, create haul routes and browse & share fittings.
8+
maintainer:
9+
name: EVE Workbench Team
10+
github: EVE-Workbench
611
---
712

813
# EVE Workbench

docs/community/index.md

+19-34
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,50 @@
11
---
22
collapse: nav
33
---
4-
# Community tools and services
4+
# Community tools and Services
55

66
!!! info "Obligatory disclaimer"
77

8-
Please note that the table below contains a list of community projects and services that are not officially supported by CCP Games. We acknowledge the hard work and dedication of the developers who have created these services and give them a soapbox to promote their services. However, we do not endorse or guarantee the services listed below. If you have any questions or concerns about a service listed below, please contact the service creator directly.
8+
Please note that the tables below contains a list of projects that are not officially supported by CCP Games. We acknowledge the hard work and dedication of the developers who have created these projects and give them a soapbox to promote them. However, we do not endorse or guarantee the items listed below. If you have any questions or concerns about a service listed below, please contact the service creator directly.
99

10-
| Service Name | Creator |
11-
|-------------------------------------------------------------|----------------------------------------------------------------------------------------------|
12-
| [Abyss Tracker](./abyss-tracker/index.md) | [:octicons-mark-github-16: EVE Workbench Team](https://github.com/EVE-Workbench) |
13-
| [Alliance Auth](./alliance-auth/index.md) | [:simple-gitlab: Alliance Auth Team](https://gitlab.com/allianceauth/) |
14-
| [EVE Workbench](./eve-workbench/index.md) | [:octicons-mark-github-16: EVE Workbench Team](https://github.com/EVE-Workbench) |
15-
| [Innominate Appraisal](./innominate-appraisal/index.md) | [:octicons-mark-github-16: Mezoology](https://github.com/mezoology) |
16-
| [JitaSpace](./jitaspace/index.md) | [:octicons-mark-github-16: joaomlneto](https://github.com/joaomlneto) |
17-
| [RIFT Intel Fusion Tool](./rift-intel-fusion-tool/index.md) | [:octicons-mark-github-16: Nohus](https://github.com/nohus) |
18-
<!-- | [Sample Service](./sample-service/index.md) | [:octicons-mark-github-16: Developer McDeveloperface](https://github.com/@your-username-here) | -->
10+
{{ community_pages("service") }}
1911

20-
# Libraries and resources
12+
# Libraries and Resources
2113

2214
These projects are intended for use as building blocks by other developers
2315

24-
| Name | Description | Creator |
25-
|------------------------------------------------|---------------------------------------------------------------|-----------------------------------------------------------------------------------------------|
26-
| [Django-ESI](./django-esi/index.md) | Django app for easy access to the EVE Swagger Interface (ESI) | [:simple-gitlab: Alliance Auth Team](https://gitlab.com/allianceauth/) |
27-
| [SDE REST API](./sde-rest-api/index.md) | REST API for the EVE Static Data Export (SDE) | [:octicons-mark-github-16: joaomlneto](https://github.com/joaomlneto) |
28-
<!-- | [Sample Tool](https://github.com/esi/esi-docs) | Crowd-sourced documentation | [:octicons-mark-github-16: Developer McDeveloperface](https://github.com/@your-username-here) | -->
16+
{{ community_pages("resource") }}
2917

30-
# Submitting a Service
18+
# Submitting a Service or Resource
3119

32-
If you would like to list your service here, please submit a pull request to this repository, adding your service to the table above, and creating a sub-page in this directory with more information about your service. Use the file in `src/docs/community/sample-service/` as a template.
20+
If you would like to list your service here, please submit a pull request to this repository, creating a sub-page in this directory with more information about your service. Use the file in `src/docs/community/sample-service/` as a template. The tables above will automatically update with the information you provide, assuming you follow the template.
21+
22+
## Resources vs. Services
23+
24+
The general rule of thumb is that if your project is something that a developer would use to build something else, it's a library or resource. If it's something that an end user would use directly, i.e. by installing it themselves, or through something already hosted, it's a tool or service.
3325

3426
## Requirements
3527

36-
1. Your service must be directly related to EVE Online.
37-
2. Your service adheres to the [EVE Online Developer License Agreement](/license-agreement).
38-
3. Your service must be publicly accessible. :material-information-outline:{ title="No private services, please." }
39-
4. The creator of the service has an account in good standing. :material-information-outline:{ title="Yes, being banned counts as 'not in good standing'." }
40-
5. (Bonus) Your service is open source. :material-information-outline:{ title="This is not a requirement, but a nice-to-have." }
28+
1. Your service/resource must be directly related to EVE Online.
29+
2. Your service/resource adheres to the [EVE Online Developer License Agreement](/license-agreement).
30+
3. Your service/resource must be publicly accessible. :material-information-outline:{ title="No private services, please." }
31+
4. The creator of the service/resource has an account in good standing. :material-information-outline:{ title="Yes, being banned counts as 'not in good standing'." }
32+
5. Your service/resource is 'released', and not in an early alpha or beta state. :material-information-outline:{ title="We want to make sure that the service is stable and usable for the general EVE public. If you are working on a new project, drop by in discord, as there's bound to be other developers there that might be interested in what you're tinkering with." }
33+
6. (Bonus) Your service/resource is open source. :material-information-outline:{ title="This is not a requirement, but a nice-to-have." }
4134

4235
As always, we reserve the right to remove any service from this list at any time for any reason, or decline to add a service to this list.
4336

4437
!!! note "A note about search"
4538

4639
You might have noticed the search exclusion marker in the template file.
47-
40+
4841
This part is required.
4942

5043
While we want to keep a list of community services, the primary function of this documentation site is to provide access to information about the EVE Online third-party development ecosystem.
5144
Adding community services to the search index would dilute the search results and make it harder for developers to find the information they need.
5245

5346
If a service is deemed to be of particular interest to the community, one of the documentation maintainers may choose to remove this exclusion.
5447

55-
## Adding images to your service page
48+
## Adding images to your page
5649

5750
If you want to add images to your service page, be sure to add them to the same directory as your service page. Please keep the images small and optimized for the web, no larger than 250KB or 1024x768 pixels. Also try to limit the amount of images you use on a single page, preferably no more than 10 unless necessary.
58-
59-
# Submitting a tool or resource
60-
61-
If you would like to list your tool or resource here, please submit a pull request to this repository, adding your tool or resource to the table above. Please keep the description of your tool or resource brief and to the point. If your tool or resource is big enough that you feel it needs its own page, this can be arranged, but please have a discussion about this on [discord](../support.md).
62-
63-
## Tools vs. Services
64-
65-
The general rule of thumb is that if your project is something that a developer would use to build something else, it's a tool or a resource. If it's something that an end user would use directly, i.e. by installing it themselves, or through something already hosted, it's a service.

docs/community/innominate-appraisal/index.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
---
22
search:
33
exclude: true
4+
5+
title: Innominate Appraisal
6+
type: service
7+
description: Web App for everyday Market PvP, Works on any devise with a browser. contains several features and appraisal methods for multiple market hubs.
8+
maintainer:
9+
name: Mezoology
10+
github: mezoology
411
---
512

613
# Innominate Appraisal

docs/community/jitaspace/index.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
---
22
search:
33
exclude: true
4+
5+
title: JitaSpace
6+
type: service
7+
description: All-in-one web application with an ever-expanding feature set of tools for EVE Online, from reading all your characters' EveMail in one place, to browsing the LP store offers.
8+
maintainer:
9+
name: joaomlneto
10+
github: joaomlneto
411
---
512

613
# JitaSpace

docs/community/rift-intel-fusion-tool/index.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
---
22
search:
33
exclude: true
4+
5+
title: RIFT Intel Fusion Tool
6+
type: service
7+
description: Desktop app for Windows, Linux and macOS. Intel channels monitoring, flexible alerts, advanced map, PI, assets and more.
8+
maintainer:
9+
name: Nohus
10+
github: nohus
411
---
512

613
# RIFT Intel Fusion Tool

docs/community/sample-service/index.md

+6
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ search:
33
exclude: true
44

55
title: Sample Service
6+
type: sample # Should be either 'service' or 'resource'
7+
description: A short one-line description that will appear in the table on the community page.
8+
maintainer: # `name` is required, and at least one of `github` or `gitlab` is required
9+
name: Your name
10+
github: github_username
11+
gitlab: gitlab_username
612
---
713

814
# EVE Online Sample Service

docs/community/sde-rest-api/index.md

+5
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ search:
33
exclude: true
44

55
title: SDE REST API
6+
type: resource
7+
description: REST API for the EVE Static Data Export (SDE)
8+
maintainer:
9+
name: joaomlneto
10+
github: joaomlneto
611
---
712

813
# JitaSpace SDE REST API

mkdocs.yml

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ edit_uri: edit/main/docs/
77

88
hooks:
99
- scripts/generate-snippets.py
10+
- scripts/community-tools.py
1011

1112
not_in_nav: |
1213
community/sample-service/index.md
@@ -38,6 +39,7 @@ theme:
3839
watch:
3940
- overrides
4041
- snippets
42+
- scripts
4143
- main.py
4244

4345
extra_css:

overrides/community/resource.html

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{% extends 'community/simple.html' %}

overrides/community/service.html

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{% extends 'community/simple.html' %}

overrides/community/simple.html

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<table>
2+
<thead class="esi-community-list esi-community-{{ filter }}-list">
3+
<tr>
4+
{% block table_header -%}
5+
<th class="col-30">Service</th>
6+
<th class="col-70">Description</th>
7+
{% endblock -%}
8+
</tr>
9+
</thead>
10+
<tbody class="esi-community-list esi-community-{{ filter }}-list">
11+
{% for title, file, data in items -%}
12+
<tr>
13+
<td>
14+
<a href="{{file.url | url}}" class="item-title">{{title}}</a>
15+
{% if data.maintainer and data.maintainer.github %}
16+
<br />
17+
<a href="https://github.com/{{ data.maintainer.github }}" target="_blank" >
18+
{% include ".icons/fontawesome/brands/github.svg" %} {{ data.maintainer.name | default(data.maintainer.github) }}
19+
</a>
20+
{% elif data.maintainer and data.maintainer.gitlab %}
21+
<br />
22+
<a href="https://gitlab.com/{{ data.maintainer.gitlab }}" target="_blank" >
23+
{% include ".icons/fontawesome/brands/gitlab.svg" %} {{ data.maintainer.name | default(data.maintainer.gitlab) }}
24+
</a>
25+
{% endif %}
26+
</td>
27+
<td>{{ data.description }}</td>
28+
</tr>
29+
{% endfor -%}
30+
</tbody>
31+
</table>

scripts/community-tools.py

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
import os
2+
import posixpath
3+
from mkdocs.exceptions import PluginError
4+
from mkdocs.utils import get_relative_url
5+
from mkdocs.utils.meta import get_data
6+
7+
meta = {}
8+
env = None
9+
macros = None
10+
11+
12+
def on_files(files, *, config):
13+
global meta
14+
global env
15+
16+
meta = {}
17+
env = config.theme.get_env()
18+
19+
for file in files:
20+
name = posixpath.basename(file.src_uri)
21+
if name != "index.md":
22+
continue
23+
with open(file.abs_src_path, encoding="utf-8-sig") as fh:
24+
try:
25+
[_, data] = get_data(fh.read())
26+
meta[file] = data
27+
except Exception as e:
28+
raise PluginError(f"Error parsing {file.src_path}: {e}") from e
29+
30+
31+
def community_pages(filter="service"):
32+
tpl = env.select_template(
33+
[
34+
f"community/{filter}.html",
35+
f"community/{filter}.md",
36+
]
37+
)
38+
39+
file = macros.page.file
40+
dname = os.path.dirname(file.src_path)
41+
files = [f for f in meta if f.src_path.startswith(f"{dname}/") and f != file]
42+
items = sorted(
43+
[
44+
(
45+
meta[f].get("title", os.path.basename(os.path.dirname(f.src_path))),
46+
f,
47+
meta[f],
48+
)
49+
for f in files
50+
if meta[f].get("type") == filter
51+
]
52+
)
53+
return tpl.render(
54+
items=items,
55+
filter=filter,
56+
config=macros.config,
57+
page=macros.page,
58+
base_url=get_relative_url(".", macros.page.url),
59+
)
60+
61+
62+
FUNCTIONS = {"community_pages": community_pages}
63+
64+
65+
def on_config(config, **kwargs):
66+
global macros
67+
macros = config.plugins.get("macros")
68+
macros.register_macros(FUNCTIONS)

0 commit comments

Comments
 (0)