feature - added promotekit
This commit is contained in:
parent
4cdb73a9fd
commit
187ce1b57f
|
@ -4,11 +4,11 @@ sidebar_position: 1
|
|||
|
||||
# Quick Start
|
||||
|
||||
Let's discover **Docusaurus in less than 3 hours** with free hosting.
|
||||
Let's get setup with **FastPocket in less than 3 hours** with free hosting.
|
||||
|
||||
Assumptions
|
||||
|
||||
- We are going straight to live, using stripe and react
|
||||
- We are going straight to live, using stripe and react and we aren't going to host our own environment yet
|
||||
|
||||
## Overview
|
||||
|
||||
|
@ -38,31 +38,48 @@ Assumptions
|
|||
- [Node.js](https://nodejs.org/en/download/) version 18.0 or above:
|
||||
- When installing Node.js, you are recommended to check all checkboxes related to dependencies.
|
||||
|
||||
## Generate a new site
|
||||
## Setup Your Tooling - Skip if this ain't your first rodeo (35 min)
|
||||
|
||||
Generate a new Docusaurus site using the **classic template**.
|
||||
### Stripe CLI (5 min)
|
||||
|
||||
The classic template will automatically be added to your project after you run the command:
|
||||
### NVM (5 min)
|
||||
|
||||
```bash
|
||||
npm init docusaurus@latest my-website classic
|
||||
```
|
||||
### Setup stripe account (10 min)
|
||||
|
||||
You can type this command into Command Prompt, Powershell, Terminal, or any other integrated terminal of your code editor.
|
||||
### Setup fly.io account (5 min)
|
||||
|
||||
The command also installs all necessary dependencies you need to run Docusaurus.
|
||||
### Setup vercel account (5 min)
|
||||
|
||||
## Start your site
|
||||
### Setup posthog account (5 min)
|
||||
|
||||
Run the development server:
|
||||
### Setup google analytics account (5 min)
|
||||
|
||||
```bash
|
||||
cd my-website
|
||||
npm run start
|
||||
```
|
||||
## Registering a new domain (5 min)
|
||||
|
||||
The `cd` command changes the directory you're working with. In order to work with your newly created Docusaurus site, you'll need to navigate the terminal there.
|
||||
### Finding a good name (3 min)
|
||||
|
||||
The `npm run start` command builds your website locally and serves it through a development server, ready for you to view at http://localhost:3000/.
|
||||
### Purchasing on Porkbun (2 min)
|
||||
|
||||
Open `docs/intro.md` (this page) and edit some lines: the site **reloads automatically** and displays your changes.
|
||||
Every great project starts with registering a new domain so naturally we will start there as well.
|
||||
|
||||
## Designing a new logo (20 min)
|
||||
|
||||
In order to make a new logo you are going to want to create
|
||||
|
||||
## Design a nice background (10 min)
|
||||
|
||||
You are wanting to make a nice background
|
||||
|
||||
## Setup Stripe
|
||||
|
||||
### Setup products
|
||||
|
||||
### Setup webhooks
|
||||
|
||||
### Setup checkout page
|
||||
|
||||
### Setup manage page
|
||||
|
||||
## Setup FastPocket instance
|
||||
|
||||
##
|
||||
|
|
|
@ -9,6 +9,7 @@ import { cookies } from "next/headers";
|
|||
import { isAuthenticated } from "@/lib/auth";
|
||||
import { GTagProvider, PHProvider, ThemeProvider } from "./providers";
|
||||
import { title } from "@/constants";
|
||||
import Script from "next/script";
|
||||
|
||||
const raleway = Arimo({
|
||||
variable: "--body-font",
|
||||
|
@ -63,6 +64,39 @@ export default async function RootLayout({
|
|||
theme="colored"
|
||||
/>
|
||||
</ThemeProvider>
|
||||
<Script
|
||||
id="promotekit-js"
|
||||
async
|
||||
src="https://cdn.promotekit.com/promotekit.js"
|
||||
data-promotekit="41c8e339-d2aa-414b-88b8-31b6d6346e2b"
|
||||
/>
|
||||
<Script
|
||||
id="promotekit-jq"
|
||||
src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"
|
||||
/>
|
||||
<Script
|
||||
id="promotekit"
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: `
|
||||
$(document).ready(function(){
|
||||
setTimeout(function() {
|
||||
$('a[href^="https://buy.stripe.com/"]').each(function(){
|
||||
const oldBuyUrl = $(this).attr("href");
|
||||
const referralId = window.promotekit_referral;
|
||||
if (!oldBuyUrl.includes("client_reference_id")) {
|
||||
const newBuyUrl = oldBuyUrl + "?client_reference_id=" + referralId;
|
||||
$(this).attr("href", newBuyUrl);
|
||||
}
|
||||
});
|
||||
$("[pricing-table-id]").each(function(){
|
||||
$(this).attr("client-reference-id", window.promotekit_referral);
|
||||
});
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
`,
|
||||
}}
|
||||
></Script>
|
||||
</body>
|
||||
</PHProvider>
|
||||
</html>
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
import "aos/dist/aos.css";
|
||||
import React from "react";
|
||||
import {
|
||||
SquaredBackgroundHero,
|
||||
WaitingListWithImageHero,
|
||||
} from "@/sections/Hero";
|
||||
import { SquaredBackgroundHero } from "@/sections/Hero";
|
||||
import PageWrapper from "@/components/Utilities/PageWrapper";
|
||||
import Footer from "@/components/Footer";
|
||||
import PageHeader from "@/sections/PageHeader";
|
||||
|
|
Loading…
Reference in New Issue