Skip to content

Commit

Permalink
Use new plugin to format pricing
Browse files Browse the repository at this point in the history
  • Loading branch information
MMore committed Oct 6, 2023
1 parent 6d96816 commit ee958db
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 5 deletions.
19 changes: 19 additions & 0 deletions _plugins/number_format_filter.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module Jekyll
module NumberFormatFilter
def format(input, currency)
currency_symbol = case currency
when "USD"
"$"
when "EUR"
"€"
else
""
end


"#{currency_symbol}#{input}"
end
end
end

Liquid::Template.register_filter(Jekyll::NumberFormatFilter)
2 changes: 1 addition & 1 deletion _vendors/airtable.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
base_pricing: 10
currency: $
currency: USD
notes: $60 per user per month, minimum of $3000 per month.
name: Airtable
pricing_sources:
Expand Down
2 changes: 1 addition & 1 deletion _vendors/intercom.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
base_pricing: 136
currency: $
currency: USD
name: Intercom
pricing_sources:
- https://twitter.com/brianebeyer/status/1053797786301489153
Expand Down
6 changes: 3 additions & 3 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ If companies claim to "take your security seriously", then SSO should be availab
Many vendors charge 2x, 3x, or 4x the base product pricing for access to SSO, which disincentivizes its use and encourages poor security practices.
</details>

{% assign all = site.vendors | where: "currency", "$" | sort: "name" %}
{% assign all = site.vendors | where: "currency", "USD" | sort: "name" %}
{% assign vendors = "" | split: ',' %}
{% assign call_us = "" | split: ',' %}
{% for vendor in all %}
Expand Down Expand Up @@ -55,8 +55,8 @@ Many vendors charge 2x, 3x, or 4x the base product pricing for access to SSO, wh
{% for vendor in vendors %}
<tr>
<td markdown="span"><a href="{{ vendor.vendor_url }}">{{ vendor.name }}</a></td>
<td markdown="span">{{ vendor.currency }}{{ vendor.base_pricing }}</td>
<td markdown="span">{{ vendor.currency }}{{ vendor.sso_pricing }}</td>
<td markdown="span">{{ vendor.base_pricing | format: vendor.currency }}</td>
<td markdown="span">{{ vendor.sso_pricing | format: vendor.currency}}</td>
<td markdown="span">{{ vendor.pricing_scheme }}</td>
<td markdown="span">{{ vendor.sso_pricing | minus: vendor.base_pricing | times: 1.0 | divided_by: vendor.base_pricing | times: 100 | round }}%</td>
<td style="font-size: 0.7em;" title="{{ vendor.notes }}">{{ vendor.notes | truncate: 50 }}</td>
Expand Down

0 comments on commit ee958db

Please sign in to comment.