Skip to content

Commit

Permalink
Improve sponsor list generator (#200)
Browse files Browse the repository at this point in the history
* feat: add sponsor list generator;

* feat: added deploy action;

* fix: fixed layout;

* fix: use utm links inside tooltips;

* fix(CI): set engine version;

* chore: reverted the start button title change;

* fix: add the ability to retry the request to get a list of sponsors;

* chore: change sponsors config & fix sponsor card layout;

* chore: hide 'incognito' sponsor from the list of sponsors;

* chore: add Route4Me sponsor;

* chore: fixed resolution of utm link for manually added sponsors;

* chore: fixed sponsors' tiers resolving;

* chore: draft;

* chore(sponsors): disable utm links generation for `slotozilla-deutschland`;

* chore(draft): Improve sponsors list generator;

* chore(draft): fix origin preset;

* chore(draft): delete generated icon;

* chore(draft): add check to ensure dir exists;

* chore(draft): add check to ensure dir exists;

* chore(draft): activate GitHub data pulling;

* chore(draft): fix crown chevron styling;

* chore(draft): reduce logo min-width;

* chore(draft): add missed `route4me` light logo;

* chore(draft): add a title for readme sponsor block;

* chore(draft): fix description resolving;

* chore(draft): add utm links for sponsors rendered to markdown;

* chore(draft): respect autoUTMLinks for utm links generation;

* chore(draft): set user theme timeout to 24 hours;

* chore(draft): set utm link for markdown output;

* chore(draft): add sponsors' logos;

* chore(draft): fix sponsor.json;

* chore(draft): fix sponsor.json;

* chore(draft): add principal logo;

* chore(draft): add a hotfix for svg logos;

* chore(draft): use image metadata instead of file extension to determine image format;

* chore(draft): add Stytch & Descope links;

* chore(draft): fix utm link generator to respect sponsor's params;

* chore(draft): add page active link rendering;

* chore(draft): notes block refactoring;

* chore(draft): remove graphql packages;
  • Loading branch information
DigitalBrainJS authored Aug 19, 2024
1 parent b68c0fc commit 78067af
Show file tree
Hide file tree
Showing 24 changed files with 2,061 additions and 249 deletions.
14 changes: 14 additions & 0 deletions assets/icons/crown.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/sponsors/descope.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/sponsors/descope_white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/sponsors/principal.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file added assets/sponsors/route4me_white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/sponsors/stytch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/sponsors/stytch_white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 54 additions & 4 deletions data/sponsors.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@
"totalAmountDonatedThreshold": 200,
"monthlyContributionThreshold": 15,
"disappearCredit": 20,
"scoreTierPriceFactor": 0.70,
"scoreTierPriceFactor": 0.80,
"scoreTotalAmountFactor": 0.2,
"tiers": {
"backer" : {
"price": 20,
"benefits": {
"showAtSponsorList": true
},
"period": 2
},
"bronze": {
"price": 49,
"benefits": {
Expand All @@ -15,21 +22,34 @@
"price": 99,
"benefits": {
"showAtSponsorList": true,
"showAtPages": true
"github": true,
"showAtPages": false
}
},
"gold" : {
"price": 299,
"benefits": {
"showAtSponsorList": true,
"showAtPages": true
"github": true,
"showAtPages": true,
"links": 3,
"video": true,
"readme": true,
"crown": true,
"maxReadmeDescLength": 100
}
},
"platinum" : {
"price": 599,
"benefits": {
"showAtSponsorList": true,
"showAtPages": true
"github": true,
"showAtPages": true,
"links": 4,
"video": true,
"readme": true,
"crown": true,
"maxReadmeDescLength": 150
}
}
},
Expand All @@ -51,10 +71,13 @@
"hide": true
},
"route4me": {
"tier": "gold",
"image": "/assets/sponsors/route4me.png",
"image_dark": "/assets/sponsors/route4me_white.png",
"website": "https://route4me.com/",
"displayName": "Route4Me",
"alt": "Route Planner and Route Optimizer",
"description": "Best Route Planning And Route Optimization Software",
"isActive": true,
"totalAmountDonated": 300,
"createdAt": "2024-07-12 00:00",
Expand All @@ -67,6 +90,33 @@
},
"slotozilla-deutschland" : {
"autoUTMLinks": false
},
"stytch": {
"tier": "gold",
"description": "API-first authentication, authorization, and fraud prevention",
"image": "/assets/sponsors/stytch.png",
"image_dark": "/assets/sponsors/stytch_white.png",
"targetLink": "https://stytch.com/?utm_source=oss-sponsorship&utm_medium=paid_sponsorship&utm_content=website-link&utm_campaign=axios-http",
"links": {
"Website": "https://stytch.com/?utm_source=oss-sponsorship&utm_medium=paid_sponsorship&utm_content=website-link&utm_campaign=axios-http",
"Documentation": "https://stytch.com/docs?utm_source=oss-sponsorship&utm_medium=paid_sponsorship&utm_content=docs-link&utm_campaign=axios-http",
"Node.js": "https://github.com/stytchauth/stytch-node?utm_source=oss-sponsorship&utm_medium=paid_sponsorship&utm_content=node-sdk&utm_campaign=axios-http"
}
},
"descope": {
"tier": "gold",
"image": "/assets/sponsors/descope.png",
"image_dark": "/assets/sponsors/descope_white.png",
"targetLink": "https://www.descope.com/?utm_source=axios&utm_medium=referral&utm_campaign=axios-oss-sponsorship",
"links": {
"Website": "https://www.descope.com/?utm_source=axios&utm_medium=referral&utm_campaign=axios-oss-sponsorship",
"Documentation": "https://docs.descope.com/?utm_source=axios&utm_medium=referral&utm_campaign=axios-oss-sponsorship",
"Community": "https://www.descope.com/community?utm_source=axios&utm_medium=referral&utm_campaign=axios-oss-sponsorship"
}
},
"principal": {
"tier": "gold",
"image": "/assets/sponsors/principal.svg"
}
}
}
12 changes: 10 additions & 2 deletions en.lang.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ module.exports = {
Axios provides a simple to use library in a small package with a very
extensible interface.`,
sponsors: `<p>Thank you for considering supporting our project.</p>
<p>You will be automatically added to this list within 24 hours if the tier you select provides this benefit.</p>`
<p>You will be automatically added to this list within 24 hours if the tier you select provides this benefit.</p>
<div class="social"><a class="link" href="/docs/sponsor">Read more...</a></div>
`
},
// `t` stands fot `translation`. This will contain translations of single words or phrases
t: {
Expand All @@ -38,7 +40,8 @@ module.exports = {
"Axios Project Copy Right Footer": undefined,
"License Label Footer": undefined,
"Sponsors": undefined,
"Become a sponsor": undefined
"Become a sponsor": undefined,
"Gold Sponsors": undefined
},
sidebar: [
{
Expand Down Expand Up @@ -127,6 +130,11 @@ module.exports = {
type: "heading",
text: "Contributors",
},
{
type: "link",
href: "/docs/sponsor",
text: "Sponsoring Axios",
},
{
type: "link",
href: "https://github.com/axios/axios/blob/master/CODE_OF_CONDUCT.md",
Expand Down
2 changes: 1 addition & 1 deletion inert.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ module.exports = {
},
...langs.map(
(lang) => ({
folder: `posts/${lang.postsDir || lang.prefix.slice(1, -1)}`,
folder: `posts/${lang.postsDir || lang.prefix.slice(1, -1)}`,
build: {
traverseLevel: "recursive",
filePipeline: [
Expand Down
Loading

0 comments on commit 78067af

Please sign in to comment.