From 3f6c0af1f2e92900f74a61826e1e671150b9c1e2 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Fri, 20 Jan 2023 02:07:09 +0100 Subject: [PATCH 01/57] fix author --- _layouts/plugin.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_layouts/plugin.html b/_layouts/plugin.html index 87d99a35..42ad88ca 100644 --- a/_layouts/plugin.html +++ b/_layouts/plugin.html @@ -4,7 +4,7 @@ notitle: true fullwith: true ---

{{ page.name }} -{% include partial/publisher_ref.html pub=page.publisher %} +{% include partial/publisher_ref.html pub=page.author %}

From 1f2f5122075a5a44fd643447959cf9a9791ed01d Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Fri, 20 Jan 2023 02:07:29 +0100 Subject: [PATCH 02/57] fix link block --- _layouts/plugin.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/_layouts/plugin.html b/_layouts/plugin.html index 42ad88ca..1000c92d 100644 --- a/_layouts/plugin.html +++ b/_layouts/plugin.html @@ -16,11 +16,12 @@ fullwith: true

Link section

+

Github

{{ page.github | remove: "https://github.com/" }}

-
+

Categories

@@ -40,11 +41,12 @@ fullwith: true
+

Website

{{ page.website }}

-
+
From 254c3b69981501d0082bbf23fa0a4aee3c100583 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Fri, 20 Jan 2023 02:08:08 +0100 Subject: [PATCH 03/57] fix list style --- _layouts/plugin.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/_layouts/plugin.html b/_layouts/plugin.html index 1000c92d..bb62c0dc 100644 --- a/_layouts/plugin.html +++ b/_layouts/plugin.html @@ -25,20 +25,20 @@ fullwith: true

Categories

-
    +
+

Tags

-
    +
      {% for tag in page.tags %}
    • {{ tag }}
    • {% endfor %} -
+
From 5e75773b9bfa2087597995ac94e2b01b4f2a2a1f Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Fri, 20 Jan 2023 02:08:51 +0100 Subject: [PATCH 04/57] fix name --- _repo/shopify.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_repo/shopify.md b/_repo/shopify.md index 6bb88767..2dff49c1 100644 --- a/_repo/shopify.md +++ b/_repo/shopify.md @@ -1,5 +1,5 @@ --- -name: ShopifyIntegrationPlugin org +name: ShopifyIntegrationPlugin author: matmair website: https://mjmair.com github: https://github.com/matmair/ShopifyIntegrationPlugin From e3cc5d2bcd6266d83e9ee40e0798a6d2dd0fb7c8 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Fri, 20 Jan 2023 02:20:28 +0100 Subject: [PATCH 05/57] add margin --- _layouts/plugin.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_layouts/plugin.html b/_layouts/plugin.html index bb62c0dc..45578422 100644 --- a/_layouts/plugin.html +++ b/_layouts/plugin.html @@ -7,8 +7,8 @@ fullwith: true {% include partial/publisher_ref.html pub=page.author %} -
-
+
+
{{ content }}
From 45e0aaa7adfc9acb8830c02c80df741b8310fc30 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Sat, 21 Jan 2023 03:10:40 +0100 Subject: [PATCH 06/57] Add in tags / categories again --- categories.html | 42 ++++++++++++++++++++++++++++++++++++++++++ tags.html | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+) create mode 100644 categories.html create mode 100644 tags.html diff --git a/categories.html b/categories.html new file mode 100644 index 00000000..c8cd1a77 --- /dev/null +++ b/categories.html @@ -0,0 +1,42 @@ +--- +title: Plugins by Category +--- + +{% assign all_cats = "" | split: "/" %} +{% for plugin in site.repo %} + {% for cat in plugin.categories %} + {% assign preprocessed = cat | strip | downcase %} + {% unless preprocessed == "" %} + {% assign all_cats = all_cats | push: preprocessed %} + {% endunless %} + {% endfor %} +{% endfor %} +{% assign all_cats = all_cats | uniq | sort %} + + +{% for cat in all_cats %} + {% unless tag == "" %} +
+ {{ cat }} + + {% endunless %} +{% endfor %} + +{% for cat in all_cats %} +{% unless cat == "" %} +

{{ cat }}

+ +
+ {% for plugin in site.repo %} + {% assign plugin_cats = "" | split: "/" %} + {% for cat in plugin.categories %} + {% assign lower_cat = cat | downcase %} + {% assign plugin_cats = plugin_cats | push: lower_cat %} + {% endfor %} + {% if plugin_cats contains cat %} + {% include plugin_card.html plugin=plugin %} + {% endif %} + {% endfor %} +
+{% endunless %} +{% endfor %} \ No newline at end of file diff --git a/tags.html b/tags.html new file mode 100644 index 00000000..842eff38 --- /dev/null +++ b/tags.html @@ -0,0 +1,42 @@ +--- +title: Plugins by Tags +--- + +{% assign all_tags = "" | split: "/" %} +{% for plugin in site.repo %} + {% for tag in plugin.tags %} + {% assign preprocessed = tag | strip | downcase %} + {% unless preprocessed == "" %} + {% assign all_tags = all_tags | push: preprocessed %} + {% endunless %} + {% endfor %} +{% endfor %} +{% assign all_tags = all_tags | uniq | sort %} + + +{% for tag in all_tags %} + {% unless tag == "" %} + + {{ tag }} + + {% endunless %} +{% endfor %} + +{% for tag in all_tags %} +{% unless tag == "" %} +

{{ tag }}

+ +
+ {% for plugin in site.repo %} + {% assign plugin_tags = "" | split: "/" %} + {% for tag in plugin.tags %} + {% assign lower_tag = tag | downcase %} + {% assign plugin_tags = plugin_tags | push: lower_tag %} + {% endfor %} + {% if plugin_tags contains tag %} + {% include plugin_card.html plugin=plugin %} + {% endif %} + {% endfor %} +
+{% endunless %} +{% endfor %} \ No newline at end of file From 8c73cdcb721639f5accb9e2985c9ce311a258493 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Sat, 21 Jan 2023 03:10:48 +0100 Subject: [PATCH 07/57] fix plugin card --- _includes/plugin_card.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/_includes/plugin_card.html b/_includes/plugin_card.html index 07e72ed1..88b7db4d 100644 --- a/_includes/plugin_card.html +++ b/_includes/plugin_card.html @@ -1,4 +1,5 @@ -
+ + - \ No newline at end of file + \ No newline at end of file From fa64af7f1b66a7b64dda4f74da3c8ab84044f58f Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Mon, 23 Jan 2023 00:51:09 +0100 Subject: [PATCH 08/57] rename plugins to repo --- plugins.html => repo.html | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename plugins.html => repo.html (100%) diff --git a/plugins.html b/repo.html similarity index 100% rename from plugins.html rename to repo.html From c699f2b9546cbff473a8952ebb6b54295d6d7687 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Mon, 23 Jan 2023 00:53:36 +0100 Subject: [PATCH 09/57] fix rename --- _config.yml | 2 +- repo.html | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/_config.yml b/_config.yml index 7031f5d3..deebff75 100644 --- a/_config.yml +++ b/_config.yml @@ -14,7 +14,7 @@ deploy-link: blog-link: internal: blog.html plugin-link: - internal: plugins.html + internal: repo.html contribute-link: internal: contribute.md diff --git a/repo.html b/repo.html index 9a1cfb37..455d8e60 100644 --- a/repo.html +++ b/repo.html @@ -1,11 +1,9 @@ --- layout: default -title: Plugins -permalink: /plugins +title: Plugin Repository +permalink: /repo --- - -

InvenTree Plugin Repository

{% for plugin in site.repo %} From 62e04a4821f7d0a96c76e766095bdd8cfc3b5ddd Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Mon, 23 Jan 2023 00:54:58 +0100 Subject: [PATCH 10/57] reanme fix once more --- use/maker.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/use/maker.md b/use/maker.md index 3b7a4aba..3863db5f 100644 --- a/use/maker.md +++ b/use/maker.md @@ -12,5 +12,5 @@ buttons: link: http://example.com - text: lorem ipsum link: - internal: plugins.html + internal: repo.html --- From 4395908b5fe600b285572583092677da20bbb0b9 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Mon, 23 Jan 2023 01:07:30 +0100 Subject: [PATCH 11/57] add repo link to plugin page --- extend/plugin/index.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/extend/plugin/index.md b/extend/plugin/index.md index 431496c7..e3be85e0 100644 --- a/extend/plugin/index.md +++ b/extend/plugin/index.md @@ -14,8 +14,6 @@ Add *native printing capabilities* for your network connected printers to the we ### Plugin repo -{% include partial/alert.html - style='info' - title='Coming soon' - desc="We are working on a full plugin repo - keep up to date on the blog or directly in your InvenTree dashboard with news." -%} +You can find all tagged plugins on [PyPi](https://pypi.org/search/?q=inventree-plugin) and [GitHub](https://github.com/topics/inventreeplugins). + +We also offer a [plugin repo](../../repo.html) with a community driven list of plugins. We encourage you to add your own plugins. From b01164a44b0f13eac7cee9734572a76febab6000 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Mon, 23 Jan 2023 01:07:43 +0100 Subject: [PATCH 12/57] add link to footer --- _data/general/footer.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/_data/general/footer.yml b/_data/general/footer.yml index 4b8716ce..47aae7a1 100644 --- a/_data/general/footer.yml +++ b/_data/general/footer.yml @@ -8,6 +8,8 @@ site: doc-link - name: News internal: news.html + - name: Plugin Repo + internal: repo.html - title: Ecosystem link: From 8207e01d3809e5d0054c2cfcc5aa2a40e4263556 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Mon, 23 Jan 2023 01:10:23 +0100 Subject: [PATCH 13/57] Add info text --- repo.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/repo.html b/repo.html index 455d8e60..082250ac 100644 --- a/repo.html +++ b/repo.html @@ -6,6 +6,10 @@ permalink: /repo

InvenTree Plugin Repository

+

+ InvenTree is a modular application and can be extended with plugins. This list is a collection of plugins that have been developed by the community. + Beeing on this list does not mean that the plugin is officially supported by the InvenTree core team. We also do not check for security, privacy or performance issues or compatibility with the latest InvenTree version. +

{% for plugin in site.repo %} {% include plugin_card.html plugin=plugin %} {% endfor %} From 0126cf2291f0138c410bfaa60d41b172c65c19c6 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Mon, 23 Jan 2023 07:54:49 +0100 Subject: [PATCH 14/57] add some padding --- repo.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/repo.html b/repo.html index 082250ac..f68f9465 100644 --- a/repo.html +++ b/repo.html @@ -10,7 +10,11 @@ permalink: /repo InvenTree is a modular application and can be extended with plugins. This list is a collection of plugins that have been developed by the community. Beeing on this list does not mean that the plugin is officially supported by the InvenTree core team. We also do not check for security, privacy or performance issues or compatibility with the latest InvenTree version.

+
{% for plugin in site.repo %} +
{% include plugin_card.html plugin=plugin %} +
{% endfor %} +
From f1f2779e57dbdf1d2ed3c396985550abebed350e Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Mon, 23 Jan 2023 08:00:45 +0100 Subject: [PATCH 15/57] add more source options --- _layouts/plugin.html | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/_layouts/plugin.html b/_layouts/plugin.html index 45578422..c1f0a232 100644 --- a/_layouts/plugin.html +++ b/_layouts/plugin.html @@ -16,12 +16,31 @@ fullwith: true

Link section

- + {% if page.github %} +
-

Github

+

Sourcecode on GitHub

{{ page.github | remove: "https://github.com/" }}

+ {% endif %} + {% if page.gitlab %} + +
+

Sourcecode on Gitlab

+

{{ page.gitlab | remove: "https://gitlab.com/" }}

+
+
+ {% endif %} + + {% if page.source %} + +
+

Sourcecode on SCM

+

{{ page.source }}

+
+
+ {% endif %}

Categories

From 37a3e357c08107d382e38d1550273ac557ffca77 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Mon, 23 Jan 2023 13:39:12 +0100 Subject: [PATCH 16/57] Add plugin highlight --- _includes/block/plugins.html | 19 +++++++++++++++++++ index.md | 1 + 2 files changed, 20 insertions(+) create mode 100644 _includes/block/plugins.html diff --git a/_includes/block/plugins.html b/_includes/block/plugins.html new file mode 100644 index 00000000..ecf312b0 --- /dev/null +++ b/_includes/block/plugins.html @@ -0,0 +1,19 @@ +
+
+
+

Plugin Repository

+

+ Explore plugins provided by the community. + Learn More Arrow pointing right +

+
+
+ {% assign filtered_repo = site.repo | sort: 'last-modified-date' | reverse %} + {% for plugin in filtered_repo limit:2 %} +
+ {% include plugin_card.html plugin=plugin %} +
+ {% endfor %} +
+
+
\ No newline at end of file diff --git a/index.md b/index.md index b4d47658..4c11b637 100644 --- a/index.md +++ b/index.md @@ -22,3 +22,4 @@ main_page: True {% include block/cta.html cta=site.data.ctas.end %} +{% include block/plugins.html %} From 2add4aeede67f48e0369dbe490c32236b192d99c Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Mon, 23 Jan 2023 13:41:00 +0100 Subject: [PATCH 17/57] Add last modified to posts and repos --- _plugins/hook-add-last-modified-date.rb | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 _plugins/hook-add-last-modified-date.rb diff --git a/_plugins/hook-add-last-modified-date.rb b/_plugins/hook-add-last-modified-date.rb new file mode 100644 index 00000000..834d39f3 --- /dev/null +++ b/_plugins/hook-add-last-modified-date.rb @@ -0,0 +1,22 @@ +# see https://stackoverflow.com/a/36769049/17860466 + +Jekyll::Hooks.register :posts, :pre_render do |post| + + # get the current post last modified time + modification_time = File.mtime( post.path ) + + # inject modification_time in post's datas. + post.data['last-modified-date'] = modification_time + +end + + +Jekyll::Hooks.register :repo, :pre_render do |repo| + + # get the current post last modified time + modification_time = File.mtime( repo.path ) + + # inject modification_time in post's datas. + repo.data['last-modified-date'] = modification_time + +end \ No newline at end of file From 8417a16897e092d52cee5e1f5e367014c73e949e Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Mon, 23 Jan 2023 13:41:13 +0100 Subject: [PATCH 18/57] add last modified to header --- _layouts/plugin.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/_layouts/plugin.html b/_layouts/plugin.html index c1f0a232..43284c95 100644 --- a/_layouts/plugin.html +++ b/_layouts/plugin.html @@ -4,7 +4,8 @@ notitle: true fullwith: true ---

{{ page.name }} -{% include partial/publisher_ref.html pub=page.author %} +{% include partial/publisher_ref.html pub=page.author %} +last modified: {{ page.last-modified-date | date_to_string }}

From 8295d64115be97eaf3c6a74c4e52c0254d179765 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Tue, 24 Jan 2023 09:08:06 +0100 Subject: [PATCH 19/57] extend template --- _repo/shopify.md | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/_repo/shopify.md b/_repo/shopify.md index 2dff49c1..4d9c2d3e 100644 --- a/_repo/shopify.md +++ b/_repo/shopify.md @@ -1,12 +1,21 @@ --- -name: ShopifyIntegrationPlugin -author: matmair -website: https://mjmair.com -github: https://github.com/matmair/ShopifyIntegrationPlugin -categories: +name: ShopifyIntegrationPlugin # Name of the plugin (should be either NAME, TITLE or SLUG) +author: matmair # Maintainer must be the same as the publisher reference +license: MIT # License, we prefer open source +open_source: true # Is this project licensed with an OSI-approved license - aka 'open source' +stable: true # Is this project stable? Should users deploy this in their instace? +maintained: true # Is this project maintained? +pypi: true # Is availanle via PyPi +package_name: inventree-shopify # Name of the package on the index, required if pypi true +github: https://github.com/matmair/ShopifyIntegrationPlugin # Ĺink to repo in GitHub, one of github, gitlab or source is required +gitlab: https://gitlab.com/matmair/ShopifyIntegrationPlugin # Ĺink to repo in Gitlab, one of github, gitlab or source is required +source: https://git.mjmair.com/matmair/ShopifyIntegrationPlugin # Link to source, one of github, gitlab or source is required +issue_tracker: https://github.com/matmair/ShopifyIntegrationPlugin # Link to Issue tracker, optional +website: https://mjmair.com # Website, full path with protocol, optional +categories: # Mixins/integrations that are used, optional - Integration - Webhook -tags: +tags: # Freetext tags - treat them like kewords, optional - Shopify - Orders --- From 13a60fce7c55af174e91c50e23277b00bef9a9bf Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Tue, 24 Jan 2023 09:31:54 +0100 Subject: [PATCH 20/57] add more attributes to the site --- _layouts/plugin.html | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/_layouts/plugin.html b/_layouts/plugin.html index 43284c95..b26f320a 100644 --- a/_layouts/plugin.html +++ b/_layouts/plugin.html @@ -14,8 +14,23 @@ fullwith: true
-

Link section

+

Detail section

+

License: + {% if page.open_source %}{% else %}{% endif %} + {{ page.license }}
+ Status: + {% if page.stable %} Stable{% else %} Unstable{% endif %} + {% if page.maintained %} Maintained{% else %} Unmaintained{% endif %} +

+ + {% if page.issue_tracker %} + +
+

Issue Tracker

+
+
+ {% endif %} {% if page.github %} @@ -33,7 +48,6 @@ fullwith: true
{% endif %} - {% if page.source %}
From cb37d54623390ec59861ecfe8f7ee94e3a3f593e Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Tue, 24 Jan 2023 22:53:00 +0100 Subject: [PATCH 21/57] add more formatting --- _layouts/plugin.html | 26 +++++++++++++------------- assets/index.css | 4 ++++ 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/_layouts/plugin.html b/_layouts/plugin.html index b26f320a..05044be3 100644 --- a/_layouts/plugin.html +++ b/_layouts/plugin.html @@ -27,7 +27,7 @@ fullwith: true {% if page.issue_tracker %}
-

Issue Tracker

+
{% endif %} @@ -35,31 +35,31 @@ fullwith: true {% if page.github %}
-

Sourcecode on GitHub

-

{{ page.github | remove: "https://github.com/" }}

+ +

{{ page.github | remove: "https://github.com/" }}

{% endif %} {% if page.gitlab %}
-

Sourcecode on Gitlab

-

{{ page.gitlab | remove: "https://gitlab.com/" }}

+ +

{{ page.gitlab | remove: "https://gitlab.com/" }}

{% endif %} {% if page.source %}
-

Sourcecode on SCM

-

{{ page.source }}

+ +

{{ page.source }}

{% endif %}
-

Categories

-
    + +
      {% for categorie in page.categories %}
    • {{ categorie }}
    • {% endfor %} @@ -67,8 +67,8 @@ fullwith: true
-

Tags

-
    + +
      {% for tag in page.tags %}
    • {{ tag }}
    • {% endfor %} @@ -77,8 +77,8 @@ fullwith: true
      -

      Website

      -

      {{ page.website }}

      + +

      {{ page.website }}

      diff --git a/assets/index.css b/assets/index.css index f90ab969..9bffbbab 100644 --- a/assets/index.css +++ b/assets/index.css @@ -87,4 +87,8 @@ layout: empty display: block; text-align: center; } + + .plugin_links { + @apply mb-0 italic + } } From 4de3365509c661374d42e52cbec5a9aa53b89083 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Tue, 24 Jan 2023 22:58:38 +0100 Subject: [PATCH 22/57] Add python field --- _layouts/plugin.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/_layouts/plugin.html b/_layouts/plugin.html index 05044be3..9c52bcdd 100644 --- a/_layouts/plugin.html +++ b/_layouts/plugin.html @@ -16,12 +16,14 @@ fullwith: true

      Detail section

      -

      License: +

      License: {% if page.open_source %}{% else %}{% endif %} {{ page.license }}
      Status: {% if page.stable %} Stable{% else %} Unstable{% endif %} {% if page.maintained %} Maintained{% else %} Unmaintained{% endif %} + + {% if page.pypi and page.package_name %}Package on PyPI:

      {{ page.package_name }}
      {% endif %}

      {% if page.issue_tracker %} From c728db28f65f586319b8ecb711dabe95cecdb6bf Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Tue, 24 Jan 2023 22:59:30 +0100 Subject: [PATCH 23/57] reorder link section --- _layouts/plugin.html | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/_layouts/plugin.html b/_layouts/plugin.html index 9c52bcdd..82c13a42 100644 --- a/_layouts/plugin.html +++ b/_layouts/plugin.html @@ -26,6 +26,13 @@ fullwith: true {% if page.pypi and page.package_name %}Package on PyPI:
      {{ page.package_name }}
      {% endif %}

      + +
      + +

      {{ page.website }}

      +
      +
      + {% if page.issue_tracker %}
      @@ -76,14 +83,6 @@ fullwith: true {% endfor %}
- - -
- -

{{ page.website }}

-
-
-
From 05f1bf908817d81d7cddf99eed8d25c5e0fcfb63 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Tue, 24 Jan 2023 23:54:07 +0100 Subject: [PATCH 24/57] add publisher example --- _publishers/_template.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 _publishers/_template.md diff --git a/_publishers/_template.md b/_publishers/_template.md new file mode 100644 index 00000000..24c3d619 --- /dev/null +++ b/_publishers/_template.md @@ -0,0 +1,7 @@ +--- +short_name: octocat # GitHub username - must be the same as the filename +name: The Octocat # The name/alias/whatever you want to be displayed +github: octocat # Your GitHub username - if you switch to a new account, please update this +website: https://github.blog/ # Your website, twitter, reddit - optional +--- +A cool tagline # A tagline or motivation, optional - please keep it under 200 words \ No newline at end of file From 0322671d0571802c0be7eec1d762db910534be13 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Tue, 24 Jan 2023 23:54:34 +0100 Subject: [PATCH 25/57] rename template file --- _repo/{shopify.md => _template.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename _repo/{shopify.md => _template.md} (100%) diff --git a/_repo/shopify.md b/_repo/_template.md similarity index 100% rename from _repo/shopify.md rename to _repo/_template.md From 64ad6eca4a873957daeebbb60b4fb7c2556ccf88 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Tue, 24 Jan 2023 23:55:19 +0100 Subject: [PATCH 26/57] Add a 'add a plugin' section to the readme --- README.md | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8cc77294..087505b8 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,27 @@ It is built on Jekyll and GitHub pages for backend / hosting, tailtwindcss for d [![Netlify Status](https://api.netlify.com/api/v1/badges/f84340d0-bc2f-4f7f-ad4c-877c50b33a27/deploy-status)](https://app.netlify.com/sites/inventree-org-preview/deploys) +## Adding a plugin to the repository + +Any maintainer of a plugin can add their plugin to the repository. The plugin will be listed on the website, we might provide a mechanism to discover plugins from within InvenTree in the future. + +To add a plugin the following steps are required: +- Fork the repository +- Create a new branch. We recommend `plugin/` as the branch name. +- Create a new file in `_repo`. We recommend using the package name as the file name. +- Copy the content from `_repo/template.md` into the new file. +- Fill out the details. Please make sure to use the correct format for the fields. +- If this is your first contribution to the repository, please add yourself to the `_publishers` folder. + - Use your GitHub username as the file name. + - Copy the content from `_publishers/_template.md` into the new file. + - Fill out the details. Please make sure to use the correct format for the fields. +- Commit your changes and create a pull request. We recommend using the title `[REPO] Add plugin `. + +Please note that the plugin repository is moderated as we see fit and we reserve the right to reject plugins that do not meet basic quality standards. We will try to provide feedback in the pull request if that is the case. + +As a maintainer of a plugin we count on you to keep the information up to date. If you want to update the information, please create a pull request. +The plugin repository is just getting started as a static collection, we might enhance the features in the future. If we need more information or make significant changes to the repository, we will ping the maintainers via their GitHub handle - so please keep your main GitHub handle up to date in your publisher file. + ## Architecture The website consists of content, layouts and assets. Jekyll runs and builds out of these files static html files - that are then hosted on GitHub pages. Folders with an underscore prefixed are internal folders for Jekyll, folders without are rendered as subdirectories in the output. @@ -13,8 +34,8 @@ Content: `_drafts` contains drafts for blog pages and news items `_news` contains news entries `_posts` contains blog entries -`_publishers` contains authors/publishers -`_repo` will contain plugin repo entries +`_publishers` contains authors/publishers of blog entries, news items and plugins +`_repo` contains plugin repo entries Layouts: `_includes` contains partials that can be used in layouts From 97cc381911630f1e64c5bf5d60e651b3fa8415b9 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Wed, 25 Jan 2023 00:00:48 +0100 Subject: [PATCH 27/57] Update readme --- README.md | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 087505b8..eae4d7f0 100644 --- a/README.md +++ b/README.md @@ -25,11 +25,14 @@ Please note that the plugin repository is moderated as we see fit and we reserve As a maintainer of a plugin we count on you to keep the information up to date. If you want to update the information, please create a pull request. The plugin repository is just getting started as a static collection, we might enhance the features in the future. If we need more information or make significant changes to the repository, we will ping the maintainers via their GitHub handle - so please keep your main GitHub handle up to date in your publisher file. -## Architecture +## Architecture and development -The website consists of content, layouts and assets. Jekyll runs and builds out of these files static html files - that are then hosted on GitHub pages. Folders with an underscore prefixed are internal folders for Jekyll, folders without are rendered as subdirectories in the output. +The website consists of content, layouts and assets. Jekyll runs and builds out of these files static html files - that are then hosted on GitHub pages. -Content: +### Folders and files +Folders with an underscore prefixed are internal folders for Jekyll, folders without are rendered as subdirectories in the output. + +Structure: `_data` contains data that is references on pages `_drafts` contains drafts for blog pages and news items `_news` contains news entries @@ -48,9 +51,16 @@ The site configuration is saved in `config.yaml`, required gems in `Gemfile` and The CSS stylesheet uses tailwindcss and is built with postcss on demand. NodeJs is needed for this. The main css file is located in `assets/index.css`. Rebuilds are handled by the workflows automatically. -## Common commands +### Preview builds + +Once a PR is created, a preview build is created on Netlify. The preview build is available at `https://-inventree-org-preview.netlify.app/`. The preview build is automatically updated when the PR is updated. +A bot will comment on the PR with the link to the preview build. + + +### Common commands for local development Install packages for ruby and nodejs. -``` + +```bash sudo apt-get install rubygems ruby-dev nodejs npm npm install sudo gem install bundler @@ -58,16 +68,13 @@ bundle install ``` Build site locally -``` + +```bash bundle exec jekyll build ``` -Run debug server -``` +Run debug server that automatically updates. This does not recompile the tailwindcss stylesheet. If you change something in the css file, you neet to build the site fully with the command above. + +```bash bundle exec jekyll serve --incremental ``` - -Regenerate file structure -``` -tree -I '_site|.git|.jekyll-cache|node_modules' --dirsfirst -``` From b2c4c198466bb2d8e15d9d2fc3123f7d5d1b3b4e Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Wed, 25 Jan 2023 00:15:51 +0100 Subject: [PATCH 28/57] update template with inventree-brother-plugin data --- _repo/_template.md | 67 +++++++++++++--------------------------------- 1 file changed, 19 insertions(+), 48 deletions(-) diff --git a/_repo/_template.md b/_repo/_template.md index 4d9c2d3e..93b566ad 100644 --- a/_repo/_template.md +++ b/_repo/_template.md @@ -1,50 +1,21 @@ --- -name: ShopifyIntegrationPlugin # Name of the plugin (should be either NAME, TITLE or SLUG) -author: matmair # Maintainer must be the same as the publisher reference -license: MIT # License, we prefer open source -open_source: true # Is this project licensed with an OSI-approved license - aka 'open source' -stable: true # Is this project stable? Should users deploy this in their instace? -maintained: true # Is this project maintained? -pypi: true # Is availanle via PyPi -package_name: inventree-shopify # Name of the package on the index, required if pypi true -github: https://github.com/matmair/ShopifyIntegrationPlugin # Ĺink to repo in GitHub, one of github, gitlab or source is required -gitlab: https://gitlab.com/matmair/ShopifyIntegrationPlugin # Ĺink to repo in Gitlab, one of github, gitlab or source is required -source: https://git.mjmair.com/matmair/ShopifyIntegrationPlugin # Link to source, one of github, gitlab or source is required -issue_tracker: https://github.com/matmair/ShopifyIntegrationPlugin # Link to Issue tracker, optional -website: https://mjmair.com # Website, full path with protocol, optional -categories: # Mixins/integrations that are used, optional - - Integration - - Webhook -tags: # Freetext tags - treat them like kewords, optional - - Shopify - - Orders +name: inventree-brother-plugin # Name of the plugin (should be either NAME, TITLE or SLUG) +author: schrodingersgat # Maintainer must be the same as the publisher reference +license: MIT # License, we prefer open source +open_source: true # Is this project licensed with an OSI-approved license - aka 'open source' +stable: true # Is this project stable? Should users deploy this in their instace? +maintained: true # Is this project maintained? +pypi: true # Is availanle via PyPi +package_name: inventree-brother-plugin # Name of the package on the index, required if pypi true +github: https://github.com/inventree/inventree-brother-plugin # Ĺink to repo in GitHub, one of github, gitlab or source is required +gitlab: https://gitlab.com/inventree/inventree-brother-plugin # Ĺink to repo in Gitlab, one of github, gitlab or source is required +source: https://example.com/inventree/inventree-brother-plugin # Link to source, one of github, gitlab or source is required +issue_tracker: https://github.com/inventree/inventree-brother-plugin/issues # Link to Issue tracker, optional +website: https://inventree.org # Website, full path with protocol, optional +categories: # Mixins/integrations that are used, optional + - Label +tags: # Freetext tags - treat them like kewords, optional + - Brother + - Printer --- -A simple Integration into Shopify. - -Let your orders from Shopify be created in autopilot, update your Inventory-Levels from InvenTree and vice-versa. - -## Installation - -1. Navigate to your InvenTree directory and cd into `src/InvenTree/plugins` and execute `git submodule add https://github.com/matmair/ShopifyIntegrationPlugin` there. Enable plugins in the general plugin settings and reload InvenTree. -2. Add a private app to your Shopify store (please register as a dev and use a development store. This is a PoC) -3. Go to the InvenTree settings and fill in the settings for the ShopifyIntegrationPlugin from your new private app. -4. Check out the new navigation tab. - -## Caveat - -Your instance must be reachable for webhooks from Shopify so use ngrok or something like that to expose your instance with HTTPS. - -## State of the code - -This code is bad. It is neither optimized nor is it CI/Cd ready or covered in any way. -I use this Plugin as a PoC to show what will be possible with the new system. - -## Contribute - -The whole plugin system is currently not even in the dev branch. -Feel free to submit issues or just send me a mail to dev AT mjmair.com - - -## No open source? - -Currently I have defined no license so forking is a bad idea copyright-wise. This code should not be used as basis for anything - I will define a license once the plugin system gets released. +Description text for the plugin goes here. Markdown is supported. You could just reuse the README.md file from your repo. \ No newline at end of file From 23f94b1af38d2b577979fee66205977a846e8e42 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Wed, 25 Jan 2023 00:24:42 +0100 Subject: [PATCH 29/57] Add plugin inventree-apprise --- _repo/inventree-apprise.md | 43 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 _repo/inventree-apprise.md diff --git a/_repo/inventree-apprise.md b/_repo/inventree-apprise.md new file mode 100644 index 00000000..10f84d9c --- /dev/null +++ b/_repo/inventree-apprise.md @@ -0,0 +1,43 @@ +--- +name: inventree-apprise +author: matmair +license: MIT +open_source: true +stable: true +maintained: true +pypi: true +package_name: inventree-apprise +github: https://github.com/matmair/inventree-apprise +issue_tracker: https://github.com/matmair/inventree-apprise/issues +website: https://mjmair.com +categories: + - Notifications +tags: + - Apprise + - 3rd party integration + - Discord + - IFTTT + - Matrix + - Microsoft Teams + - Slack + - Twilio + - +--- +# inventree-apprise + +Send notifications from InvenTree via Apprise + +## Setup + +1. Install +Install this plugin in the webinterface with the packagename `inventree-apprise` + +2. Enable +Enable the plugin in the plugin settings. You need to be signed in as a superuser for this. +**The server will restart if you enable the plugin** + +3. Configure +Add all endpoints you want to use in the plugin settings. You can use the [Apprise URL Syntax](https://github.com/caronc/apprise#supported-notifications). + +## License +This project is licensed as MIT. Copy and do what you want - maybe tag your new plugin so others can find it. The more the merrier. From d329870623df840c2cfc4a981084621f87c33072 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Wed, 25 Jan 2023 00:28:36 +0100 Subject: [PATCH 30/57] fix title section --- _repo/inventree-apprise.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/_repo/inventree-apprise.md b/_repo/inventree-apprise.md index 10f84d9c..2c920f75 100644 --- a/_repo/inventree-apprise.md +++ b/_repo/inventree-apprise.md @@ -23,8 +23,6 @@ tags: - Twilio - --- -# inventree-apprise - Send notifications from InvenTree via Apprise ## Setup From 59d480cee9aa7e13446fee402f978f0dd2ab4111 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Wed, 25 Jan 2023 00:33:33 +0100 Subject: [PATCH 31/57] fix readme --- _repo/inventree-apprise.md | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/_repo/inventree-apprise.md b/_repo/inventree-apprise.md index 2c920f75..8c4bd528 100644 --- a/_repo/inventree-apprise.md +++ b/_repo/inventree-apprise.md @@ -27,15 +27,12 @@ Send notifications from InvenTree via Apprise ## Setup -1. Install -Install this plugin in the webinterface with the packagename `inventree-apprise` +1. Install this plugin in the webinterface with the packagename `inventree-apprise` -2. Enable -Enable the plugin in the plugin settings. You need to be signed in as a superuser for this. +1. Enable the plugin in the plugin settings. You need to be signed in as a superuser for this. **The server will restart if you enable the plugin** -3. Configure -Add all endpoints you want to use in the plugin settings. You can use the [Apprise URL Syntax](https://github.com/caronc/apprise#supported-notifications). +1. Add all endpoints you want to use in the plugin settings. You can use the [Apprise URL Syntax](https://github.com/caronc/apprise#supported-notifications). ## License This project is licensed as MIT. Copy and do what you want - maybe tag your new plugin so others can find it. The more the merrier. From 087370400306fd0334b9148e5df98fdd2f9a3574 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Fri, 27 Jan 2023 16:32:21 +0100 Subject: [PATCH 32/57] change permalink to fit githubs model --- _config.yml | 3 +-- _plugins/author_permalink.rb | 9 +++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 _plugins/author_permalink.rb diff --git a/_config.yml b/_config.yml index deebff75..78cee2d6 100644 --- a/_config.yml +++ b/_config.yml @@ -33,8 +33,7 @@ collections: permalink: "/:title" repo: output: true - custom_permalink_placeholders: ["publisher"] - #permalink: "/:publisher/:title" + permalink: ":author/:title" news: output: true permalink: /news/:year/:month/:day/:title diff --git a/_plugins/author_permalink.rb b/_plugins/author_permalink.rb new file mode 100644 index 00000000..50da7af1 --- /dev/null +++ b/_plugins/author_permalink.rb @@ -0,0 +1,9 @@ +module Jekyll + module Drops + class UrlDrop < Drop + def author + @obj.author + end + end + end + end \ No newline at end of file From df9d37ad798743e193ce13273cca2b66e0fbd2ed Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Fri, 27 Jan 2023 16:33:31 +0100 Subject: [PATCH 33/57] merge in repo changes --- _config.yml | 3 +-- _plugins/author_permalink.rb | 9 +++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 _plugins/author_permalink.rb diff --git a/_config.yml b/_config.yml index deebff75..78cee2d6 100644 --- a/_config.yml +++ b/_config.yml @@ -33,8 +33,7 @@ collections: permalink: "/:title" repo: output: true - custom_permalink_placeholders: ["publisher"] - #permalink: "/:publisher/:title" + permalink: ":author/:title" news: output: true permalink: /news/:year/:month/:day/:title diff --git a/_plugins/author_permalink.rb b/_plugins/author_permalink.rb new file mode 100644 index 00000000..50da7af1 --- /dev/null +++ b/_plugins/author_permalink.rb @@ -0,0 +1,9 @@ +module Jekyll + module Drops + class UrlDrop < Drop + def author + @obj.author + end + end + end + end \ No newline at end of file From 841417896b2f8d108197b6bfca6f22abe78a9fec Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Sat, 28 Jan 2023 00:34:54 +0100 Subject: [PATCH 34/57] pack stati together --- _layouts/plugin.html | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/_layouts/plugin.html b/_layouts/plugin.html index 82c13a42..e60804d1 100644 --- a/_layouts/plugin.html +++ b/_layouts/plugin.html @@ -19,10 +19,11 @@ fullwith: true

License: {% if page.open_source %}{% else %}{% endif %} {{ page.license }}
- Status: - {% if page.stable %} Stable{% else %} Unstable{% endif %} - {% if page.maintained %} Maintained{% else %} Unmaintained{% endif %} - +

+ Status: +
{% if page.stable %}Stable{% else %} Unstable{% endif %}
+
{% if page.maintained %}Maintained{% else %} Unmaintained{% endif %}
+
{% if page.pypi and page.package_name %}Package on PyPI:
{{ page.package_name }}
{% endif %}

From 5ab522b92441e2d9f922229448fe50cd7cbf2b4e Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Sat, 28 Jan 2023 00:36:22 +0100 Subject: [PATCH 35/57] pack together tags / categories --- _layouts/plugin.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/_layouts/plugin.html b/_layouts/plugin.html index e60804d1..565f5c3f 100644 --- a/_layouts/plugin.html +++ b/_layouts/plugin.html @@ -69,20 +69,20 @@ fullwith: true
- +
- +
From a502ea722b7fa16ca9697411306f569fa0eaced7 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Sat, 28 Jan 2023 00:36:29 +0100 Subject: [PATCH 36/57] remove unneeded layout --- _layouts/plugin_highlight.html | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 _layouts/plugin_highlight.html diff --git a/_layouts/plugin_highlight.html b/_layouts/plugin_highlight.html deleted file mode 100644 index 224d887e..00000000 --- a/_layouts/plugin_highlight.html +++ /dev/null @@ -1,11 +0,0 @@ ---- -layout: content ---- -
- {{ content }} - {% if page.plugin %} -
-

Find out more about this plugin on the plugin site

- {% include plugin_card.html plugin=page.plugin %} - {% endif %} -
From ddeed15ed5a909bd9e99e62b614389257c7c2ace Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Sat, 28 Jan 2023 00:36:51 +0100 Subject: [PATCH 37/57] fix pattern --- _config.yml | 2 +- _plugins/author_permalink.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/_config.yml b/_config.yml index 78cee2d6..27354bd0 100644 --- a/_config.yml +++ b/_config.yml @@ -33,7 +33,7 @@ collections: permalink: "/:title" repo: output: true - permalink: ":author/:title" + permalink: ":doc_author/:title" news: output: true permalink: /news/:year/:month/:day/:title diff --git a/_plugins/author_permalink.rb b/_plugins/author_permalink.rb index 50da7af1..81febb1b 100644 --- a/_plugins/author_permalink.rb +++ b/_plugins/author_permalink.rb @@ -1,8 +1,8 @@ module Jekyll module Drops class UrlDrop < Drop - def author - @obj.author + def doc_author + @obj.data['author'] end end end From 86a5ea97cb9db0920b5460db3975ec4add8bf260 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Sat, 28 Jan 2023 00:50:57 +0100 Subject: [PATCH 38/57] change reference to plugins --- _config.yml | 2 +- _data/general/footer.yml | 2 +- _includes/block/plugins.html | 2 +- extend/plugin/index.md | 2 +- repo.html => plugins.html | 2 +- use/maker.md | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) rename repo.html => plugins.html (97%) diff --git a/_config.yml b/_config.yml index 27354bd0..6365fc64 100644 --- a/_config.yml +++ b/_config.yml @@ -14,7 +14,7 @@ deploy-link: blog-link: internal: blog.html plugin-link: - internal: repo.html + internal: plugins.html contribute-link: internal: contribute.md diff --git a/_data/general/footer.yml b/_data/general/footer.yml index 47aae7a1..bf29e5bd 100644 --- a/_data/general/footer.yml +++ b/_data/general/footer.yml @@ -9,7 +9,7 @@ - name: News internal: news.html - name: Plugin Repo - internal: repo.html + site: plugin-link - title: Ecosystem link: diff --git a/_includes/block/plugins.html b/_includes/block/plugins.html index ecf312b0..628b1fe1 100644 --- a/_includes/block/plugins.html +++ b/_includes/block/plugins.html @@ -4,7 +4,7 @@

Plugin Repository

Explore plugins provided by the community. - Learn More Arrow pointing right + Learn More Arrow pointing right

diff --git a/extend/plugin/index.md b/extend/plugin/index.md index e3be85e0..e8d5f0b8 100644 --- a/extend/plugin/index.md +++ b/extend/plugin/index.md @@ -16,4 +16,4 @@ Add *native printing capabilities* for your network connected printers to the we You can find all tagged plugins on [PyPi](https://pypi.org/search/?q=inventree-plugin) and [GitHub](https://github.com/topics/inventreeplugins). -We also offer a [plugin repo](../../repo.html) with a community driven list of plugins. We encourage you to add your own plugins. +We also offer a [plugin repo](../../plugins.html) with a community driven list of plugins. We encourage you to add your own plugins. diff --git a/repo.html b/plugins.html similarity index 97% rename from repo.html rename to plugins.html index f68f9465..78a308af 100644 --- a/repo.html +++ b/plugins.html @@ -1,7 +1,7 @@ --- layout: default title: Plugin Repository -permalink: /repo +permalink: /plugins ---
diff --git a/use/maker.md b/use/maker.md index 3863db5f..7f3550c0 100644 --- a/use/maker.md +++ b/use/maker.md @@ -12,5 +12,5 @@ buttons: link: http://example.com - text: lorem ipsum link: - internal: repo.html + site: plugn-link --- From 6f6672898999ad4ffabb5ede71867c949bf79413 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Sat, 28 Jan 2023 01:20:09 +0100 Subject: [PATCH 39/57] simplify cat/tags --- _layouts/collection/collection_refpage.html | 42 ++++++++++++++++++++ categories.html | 43 ++------------------- tags.html | 43 ++------------------- 3 files changed, 50 insertions(+), 78 deletions(-) create mode 100644 _layouts/collection/collection_refpage.html diff --git a/_layouts/collection/collection_refpage.html b/_layouts/collection/collection_refpage.html new file mode 100644 index 00000000..c0ab7fed --- /dev/null +++ b/_layouts/collection/collection_refpage.html @@ -0,0 +1,42 @@ +--- +layout: content +--- + +{% assign all_items = "" | split: "/" %} +{% for col_item in site[page.collection] %} + {% for item in col_item[page.reference] %} + {% assign preprocessed = item | strip %} + {% unless preprocessed == "" %} + {% assign all_items = all_items | push: preprocessed %} + {% endunless %} + {% endfor %} +{% endfor %} +{% assign all_items = all_items | uniq | sort %} + + +{% for item in all_items %} + {% unless tag == "" %} + + {{ item }} + + {% endunless %} +{% endfor %} + +{% for item in all_items %} + {% unless item == "" %} +

{{ item }}

+ +
+ {% for plugin in site[page.collection] %} + {% assign col_items = "" | split: "/" %} + {% for item in plugin[page.reference] %} + {% assign lower_item = item %} + {% assign col_items = col_items | push: lower_item %} + {% endfor %} + {% if col_items contains item %} + {% include plugin_card.html plugin=plugin %} + {% endif %} + {% endfor %} +
+ {% endunless %} +{% endfor %} \ No newline at end of file diff --git a/categories.html b/categories.html index c8cd1a77..342ba09b 100644 --- a/categories.html +++ b/categories.html @@ -1,42 +1,7 @@ --- +layout: collection/collection_refpage title: Plugins by Category +collection: repo +permalink: /categories/ +reference: categories --- - -{% assign all_cats = "" | split: "/" %} -{% for plugin in site.repo %} - {% for cat in plugin.categories %} - {% assign preprocessed = cat | strip | downcase %} - {% unless preprocessed == "" %} - {% assign all_cats = all_cats | push: preprocessed %} - {% endunless %} - {% endfor %} -{% endfor %} -{% assign all_cats = all_cats | uniq | sort %} - - -{% for cat in all_cats %} - {% unless tag == "" %} - - {{ cat }} - - {% endunless %} -{% endfor %} - -{% for cat in all_cats %} -{% unless cat == "" %} -

{{ cat }}

- -
- {% for plugin in site.repo %} - {% assign plugin_cats = "" | split: "/" %} - {% for cat in plugin.categories %} - {% assign lower_cat = cat | downcase %} - {% assign plugin_cats = plugin_cats | push: lower_cat %} - {% endfor %} - {% if plugin_cats contains cat %} - {% include plugin_card.html plugin=plugin %} - {% endif %} - {% endfor %} -
-{% endunless %} -{% endfor %} \ No newline at end of file diff --git a/tags.html b/tags.html index 842eff38..6d4e13a6 100644 --- a/tags.html +++ b/tags.html @@ -1,42 +1,7 @@ --- +layout: collection/collection_refpage title: Plugins by Tags +collection: repo +permalink: /tags/ +reference: tags --- - -{% assign all_tags = "" | split: "/" %} -{% for plugin in site.repo %} - {% for tag in plugin.tags %} - {% assign preprocessed = tag | strip | downcase %} - {% unless preprocessed == "" %} - {% assign all_tags = all_tags | push: preprocessed %} - {% endunless %} - {% endfor %} -{% endfor %} -{% assign all_tags = all_tags | uniq | sort %} - - -{% for tag in all_tags %} - {% unless tag == "" %} - - {{ tag }} - - {% endunless %} -{% endfor %} - -{% for tag in all_tags %} -{% unless tag == "" %} -

{{ tag }}

- -
- {% for plugin in site.repo %} - {% assign plugin_tags = "" | split: "/" %} - {% for tag in plugin.tags %} - {% assign lower_tag = tag | downcase %} - {% assign plugin_tags = plugin_tags | push: lower_tag %} - {% endfor %} - {% if plugin_tags contains tag %} - {% include plugin_card.html plugin=plugin %} - {% endif %} - {% endfor %} -
-{% endunless %} -{% endfor %} \ No newline at end of file From 5a55bae68f9ca795bc1ffa52cca79775fe13754d Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Sat, 28 Jan 2023 14:49:36 +0100 Subject: [PATCH 40/57] Fix plugin links --- _data/general/footer.yml | 2 +- _includes/block/plugins.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/_data/general/footer.yml b/_data/general/footer.yml index bf29e5bd..8de1c40e 100644 --- a/_data/general/footer.yml +++ b/_data/general/footer.yml @@ -9,7 +9,7 @@ - name: News internal: news.html - name: Plugin Repo - site: plugin-link + internal: plugins.html - title: Ecosystem link: diff --git a/_includes/block/plugins.html b/_includes/block/plugins.html index 628b1fe1..16124773 100644 --- a/_includes/block/plugins.html +++ b/_includes/block/plugins.html @@ -4,7 +4,7 @@

Plugin Repository

Explore plugins provided by the community. - Learn More Arrow pointing right + Learn More Arrow pointing right

From 0a8732474b8c58a4a7c360c1c00fc81169324e16 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Sat, 28 Jan 2023 14:52:02 +0100 Subject: [PATCH 41/57] replace repository with list --- README.md | 10 +++++----- _data/general/footer.yml | 2 +- _includes/block/plugins.html | 2 +- plugins.html | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index eae4d7f0..ee5b6740 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,9 @@ It is built on Jekyll and GitHub pages for backend / hosting, tailtwindcss for d [![Netlify Status](https://api.netlify.com/api/v1/badges/f84340d0-bc2f-4f7f-ad4c-877c50b33a27/deploy-status)](https://app.netlify.com/sites/inventree-org-preview/deploys) -## Adding a plugin to the repository +## Adding a plugin to the list -Any maintainer of a plugin can add their plugin to the repository. The plugin will be listed on the website, we might provide a mechanism to discover plugins from within InvenTree in the future. +Any maintainer of a plugin can add their plugin to the list. The plugin will be listed on the website, we might provide a mechanism to discover plugins from within InvenTree in the future. To add a plugin the following steps are required: - Fork the repository @@ -14,16 +14,16 @@ To add a plugin the following steps are required: - Create a new file in `_repo`. We recommend using the package name as the file name. - Copy the content from `_repo/template.md` into the new file. - Fill out the details. Please make sure to use the correct format for the fields. -- If this is your first contribution to the repository, please add yourself to the `_publishers` folder. +- If this is your first contribution to the list, please add yourself to the `_publishers` folder. - Use your GitHub username as the file name. - Copy the content from `_publishers/_template.md` into the new file. - Fill out the details. Please make sure to use the correct format for the fields. - Commit your changes and create a pull request. We recommend using the title `[REPO] Add plugin `. -Please note that the plugin repository is moderated as we see fit and we reserve the right to reject plugins that do not meet basic quality standards. We will try to provide feedback in the pull request if that is the case. +Please note that the plugin list is moderated as we see fit and we reserve the right to reject plugins that do not meet basic quality standards. We will try to provide feedback in the pull request if that is the case. As a maintainer of a plugin we count on you to keep the information up to date. If you want to update the information, please create a pull request. -The plugin repository is just getting started as a static collection, we might enhance the features in the future. If we need more information or make significant changes to the repository, we will ping the maintainers via their GitHub handle - so please keep your main GitHub handle up to date in your publisher file. +The plugin list is just getting started as a static collection, we might enhance the features in the future. If we need more information or make significant changes to the list, we will ping the maintainers via their GitHub handle - so please keep your main GitHub handle up to date in your publisher file. ## Architecture and development diff --git a/_data/general/footer.yml b/_data/general/footer.yml index 8de1c40e..7289b2ad 100644 --- a/_data/general/footer.yml +++ b/_data/general/footer.yml @@ -8,7 +8,7 @@ site: doc-link - name: News internal: news.html - - name: Plugin Repo + - name: Plugin List internal: plugins.html - title: Ecosystem diff --git a/_includes/block/plugins.html b/_includes/block/plugins.html index 16124773..2a7f1099 100644 --- a/_includes/block/plugins.html +++ b/_includes/block/plugins.html @@ -1,7 +1,7 @@
-

Plugin Repository

+

Plugin List

Explore plugins provided by the community. Learn More Arrow pointing right diff --git a/plugins.html b/plugins.html index 78a308af..e3e18923 100644 --- a/plugins.html +++ b/plugins.html @@ -1,11 +1,11 @@ --- layout: default -title: Plugin Repository +title: Plugin List permalink: /plugins ---

-

InvenTree Plugin Repository

+

InvenTree Plugin List

InvenTree is a modular application and can be extended with plugins. This list is a collection of plugins that have been developed by the community. Beeing on this list does not mean that the plugin is officially supported by the InvenTree core team. We also do not check for security, privacy or performance issues or compatibility with the latest InvenTree version. From 6ed904e8f5fce616aa7df8b10ed6ba718341a32c Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Sat, 28 Jan 2023 14:52:14 +0100 Subject: [PATCH 42/57] remove uneeded links in config --- _config.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/_config.yml b/_config.yml index 6365fc64..1fcd718a 100644 --- a/_config.yml +++ b/_config.yml @@ -13,10 +13,6 @@ deploy-link: internal: deploy.md blog-link: internal: blog.html -plugin-link: - internal: plugins.html -contribute-link: - internal: contribute.md # Hosting parameters baseurl: "" From 70819d62ae5e018c706a5861958362add212fbab Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Sat, 28 Jan 2023 14:55:24 +0100 Subject: [PATCH 43/57] fix link to plugin --- _includes/block/plugins.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_includes/block/plugins.html b/_includes/block/plugins.html index 2a7f1099..97cdc027 100644 --- a/_includes/block/plugins.html +++ b/_includes/block/plugins.html @@ -4,7 +4,7 @@

Plugin List

Explore plugins provided by the community. - Learn More Arrow pointing right + Learn More Arrow pointing right

From 68cfaadb5a131274ebca8fc288b9c8439ad602d2 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Sat, 28 Jan 2023 14:58:08 +0100 Subject: [PATCH 44/57] fix whitespace breaking --- _includes/plugin_card.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_includes/plugin_card.html b/_includes/plugin_card.html index 88b7db4d..c45dde3f 100644 --- a/_includes/plugin_card.html +++ b/_includes/plugin_card.html @@ -3,10 +3,10 @@
{% for cat in plugin.categories %} - {{ cat }} + {{ cat }} {% endfor %} {% for tag in plugin.tags %} - {{ tag }} + {{ tag }} {% endfor %}

{{ plugin.name }}

From 543268076d23658d7c2e4da3d49c9f00056b2b7f Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Sat, 28 Jan 2023 15:05:35 +0100 Subject: [PATCH 45/57] move badge styles to css --- _includes/plugin_card.html | 4 ++-- _layouts/plugin.html | 4 ++-- assets/index.css | 8 ++++++++ 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/_includes/plugin_card.html b/_includes/plugin_card.html index c45dde3f..551c95ff 100644 --- a/_includes/plugin_card.html +++ b/_includes/plugin_card.html @@ -3,10 +3,10 @@
{% for cat in plugin.categories %} - {{ cat }} + {{ cat }} {% endfor %} {% for tag in plugin.tags %} - {{ tag }} + {{ tag }} {% endfor %}

{{ plugin.name }}

diff --git a/_layouts/plugin.html b/_layouts/plugin.html index 565f5c3f..f5f51543 100644 --- a/_layouts/plugin.html +++ b/_layouts/plugin.html @@ -71,7 +71,7 @@ fullwith: true
{% for categorie in page.categories %} - {{ categorie }} + {{ categorie }} {% endfor %}
@@ -80,7 +80,7 @@ fullwith: true
{% for tag in page.tags %} - {{ tag }} + {{ tag }} {% endfor %}
diff --git a/assets/index.css b/assets/index.css index 9bffbbab..9918f678 100644 --- a/assets/index.css +++ b/assets/index.css @@ -79,6 +79,14 @@ layout: empty @apply list-none } + .plugin_cat { + @apply badge bg-yellow-500 whitespace-nowrap + } + + .plugin_tag { + @apply badge bg-blue-400 whitespace-nowrap + } + .max-w-p90 { max-width: 90% } From da8d92326cb65dde700014023ee5e92a8187dc03 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Sat, 28 Jan 2023 15:11:14 +0100 Subject: [PATCH 46/57] clean template --- _layouts/plugin.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_layouts/plugin.html b/_layouts/plugin.html index f5f51543..ce0394aa 100644 --- a/_layouts/plugin.html +++ b/_layouts/plugin.html @@ -4,7 +4,7 @@ notitle: true fullwith: true ---

{{ page.name }} -{% include partial/publisher_ref.html pub=page.author %} +{% include partial/publisher_ref.html pub=page.author %} last modified: {{ page.last-modified-date | date_to_string }}

From 1c06b89d9dc96071352298b808cf92f34fbf34d5 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Sat, 28 Jan 2023 15:12:56 +0100 Subject: [PATCH 47/57] change plugin name --- _repo/inventree-apprise.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_repo/inventree-apprise.md b/_repo/inventree-apprise.md index 8c4bd528..43783b68 100644 --- a/_repo/inventree-apprise.md +++ b/_repo/inventree-apprise.md @@ -1,5 +1,5 @@ --- -name: inventree-apprise +name: InvenTree Apprise author: matmair license: MIT open_source: true From 2562ac7797074da7c8d59aeb7d0422a1e1cd5056 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Sat, 28 Jan 2023 15:25:13 +0100 Subject: [PATCH 48/57] change url pattern --- _layouts/plugin.html | 4 ++-- categories.html | 2 +- tags.html | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/_layouts/plugin.html b/_layouts/plugin.html index ce0394aa..3edf81f6 100644 --- a/_layouts/plugin.html +++ b/_layouts/plugin.html @@ -71,7 +71,7 @@ fullwith: true
{% for categorie in page.categories %} - {{ categorie }} + {{ categorie }} {% endfor %}
@@ -80,7 +80,7 @@ fullwith: true
{% for tag in page.tags %} - {{ tag }} + {{ tag }} {% endfor %}
diff --git a/categories.html b/categories.html index 342ba09b..3a250014 100644 --- a/categories.html +++ b/categories.html @@ -2,6 +2,6 @@ layout: collection/collection_refpage title: Plugins by Category collection: repo -permalink: /categories/ +permalink: /plugins/categories/ reference: categories --- diff --git a/tags.html b/tags.html index 6d4e13a6..85273a96 100644 --- a/tags.html +++ b/tags.html @@ -2,6 +2,6 @@ layout: collection/collection_refpage title: Plugins by Tags collection: repo -permalink: /tags/ +permalink: /plugins/tags/ reference: tags --- From 2c3c6037c4eaafb69913d4a1804ea93088d3aa9e Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Sat, 28 Jan 2023 15:42:36 +0100 Subject: [PATCH 49/57] add anchor offset --- _layouts/collection/collection_refpage.html | 3 ++- assets/index.css | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/_layouts/collection/collection_refpage.html b/_layouts/collection/collection_refpage.html index c0ab7fed..eea9707a 100644 --- a/_layouts/collection/collection_refpage.html +++ b/_layouts/collection/collection_refpage.html @@ -24,7 +24,8 @@ layout: content {% for item in all_items %} {% unless item == "" %} -

{{ item }}

+
+

{{ item }}

{% for plugin in site[page.collection] %} diff --git a/assets/index.css b/assets/index.css index 9918f678..855aa779 100644 --- a/assets/index.css +++ b/assets/index.css @@ -99,4 +99,11 @@ layout: empty .plugin_links { @apply mb-0 italic } + + .anchor { + display: block; + position: relative; + top: -4.5rem; + visibility: hidden; + } } From 2e876e08deec91e6677d449795e062620cae9706 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Sat, 28 Jan 2023 15:48:34 +0100 Subject: [PATCH 50/57] Add a helptext --- _layouts/collection/collection_refpage.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/_layouts/collection/collection_refpage.html b/_layouts/collection/collection_refpage.html index eea9707a..746e047a 100644 --- a/_layouts/collection/collection_refpage.html +++ b/_layouts/collection/collection_refpage.html @@ -13,6 +13,8 @@ layout: content {% endfor %} {% assign all_items = all_items | uniq | sort %} +

The full list of plugins is available on the main plugin list page.

+

Click on a name to jump to the plugins that are marked with it.

{% for item in all_items %} {% unless tag == "" %} From 47bae413dee9e052b49498881a34e7d701cb49de Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Sat, 28 Jan 2023 15:54:50 +0100 Subject: [PATCH 51/57] add link to tags/categories --- plugins.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins.html b/plugins.html index e3e18923..4bad3ecc 100644 --- a/plugins.html +++ b/plugins.html @@ -6,10 +6,11 @@ permalink: /plugins

InvenTree Plugin List

-

+

InvenTree is a modular application and can be extended with plugins. This list is a collection of plugins that have been developed by the community. Beeing on this list does not mean that the plugin is officially supported by the InvenTree core team. We also do not check for security, privacy or performance issues or compatibility with the latest InvenTree version. -

+

+ You can also browse for plugins by tags or categories

{% for plugin in site.repo %}
From 6bcbd1d286c1c5367ab2e3751da3069b80852cf2 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Sat, 28 Jan 2023 15:56:23 +0100 Subject: [PATCH 52/57] reduce spacing on cards --- _includes/plugin_card.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_includes/plugin_card.html b/_includes/plugin_card.html index 551c95ff..cd9befc9 100644 --- a/_includes/plugin_card.html +++ b/_includes/plugin_card.html @@ -14,7 +14,7 @@ {% if plugin.published_on %}{{ plugin.published_on | date_to_string }} - {% endif %} {% include partial/publisher_ref.html pub=plugin.author %}
-

{{ plugin.excerpt | mardownify | remove: '

' | remove: '

' }}

+

{{ plugin.excerpt | mardownify | remove: '

' | remove: '

' }}

\ No newline at end of file From 5092c6e5dcc4993f44f528a704759e6542c09dff Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Sat, 28 Jan 2023 16:06:40 +0100 Subject: [PATCH 53/57] add spacing to plugins tags --- _includes/plugin_card.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_includes/plugin_card.html b/_includes/plugin_card.html index cd9befc9..17edf73e 100644 --- a/_includes/plugin_card.html +++ b/_includes/plugin_card.html @@ -1,7 +1,7 @@
- \ No newline at end of file diff --git a/assets/index.css b/assets/index.css index 855aa779..e142ce6e 100644 --- a/assets/index.css +++ b/assets/index.css @@ -59,6 +59,12 @@ layout: empty visibility: hidden; } + .content a { + color:#111827; + font-weight:500; + text-decoration:underline; + } + .color-link { @apply text-secondary } From 0b6e11e8a735289bc12917edb3037c92622ea998 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Sat, 28 Jan 2023 16:20:33 +0100 Subject: [PATCH 55/57] fix spacing and headers --- _layouts/collection/collection_refpage.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/_layouts/collection/collection_refpage.html b/_layouts/collection/collection_refpage.html index 1b5a62b4..4d5d6be6 100644 --- a/_layouts/collection/collection_refpage.html +++ b/_layouts/collection/collection_refpage.html @@ -17,7 +17,7 @@ layout: default {% endfor %} {% assign all_items = all_items | uniq | sort %} -

The full list of plugins is available on the main plugin list page.

+

The full list of plugins is available on the main plugin list page.


Click on a name to jump to the plugins that are marked with it.

{% for item in all_items %} @@ -28,11 +28,12 @@ layout: default {% endunless %} {% endfor %} +

{% for item in all_items %} {% unless item == "" %}
-

{{ item }}

+

{{ item }}

{% for plugin in site[page.collection] %} From 480da8886dafdb58eccc765db87b6e992aa46f2a Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Sat, 28 Jan 2023 16:24:47 +0100 Subject: [PATCH 56/57] show 2 plugins on tags and cats --- _layouts/collection/collection_refpage.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_layouts/collection/collection_refpage.html b/_layouts/collection/collection_refpage.html index 4d5d6be6..461960e4 100644 --- a/_layouts/collection/collection_refpage.html +++ b/_layouts/collection/collection_refpage.html @@ -35,7 +35,7 @@ layout: default

{{ item }}

-
+
{% for plugin in site[page.collection] %} {% assign col_items = "" | split: "/" %} {% for item in plugin[page.reference] %} @@ -43,7 +43,7 @@ layout: default {% assign col_items = col_items | push: lower_item %} {% endfor %} {% if col_items contains item %} - {% include plugin_card.html plugin=plugin %} +
{% include plugin_card.html plugin=plugin %}
{% endif %} {% endfor %}
From 00dcc7f154c26d302624d02c86f9db7586b8847f Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Sat, 28 Jan 2023 16:27:53 +0100 Subject: [PATCH 57/57] unify link formatting --- plugins.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins.html b/plugins.html index 4bad3ecc..db64fa43 100644 --- a/plugins.html +++ b/plugins.html @@ -6,11 +6,12 @@ permalink: /plugins

InvenTree Plugin List

-

+

InvenTree is a modular application and can be extended with plugins. This list is a collection of plugins that have been developed by the community. Beeing on this list does not mean that the plugin is officially supported by the InvenTree core team. We also do not check for security, privacy or performance issues or compatibility with the latest InvenTree version.

- You can also browse for plugins by tags or categories

+ You can also browse for plugins by tags or categories +

{% for plugin in site.repo %}