Skip to content

Commit

Permalink
Merge pull request #45 from thedevdavid/release/0.7.1
Browse files Browse the repository at this point in the history
Release/0.7.1
  • Loading branch information
thedevdavid authored Aug 22, 2023
2 parents 32bae58 + 4f9a2cd commit ccef24e
Show file tree
Hide file tree
Showing 17 changed files with 55 additions and 10 deletions.
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ NEXT_PUBLIC_UMAMI_WEBSITE_ID=
NEXT_PUBLIC_PLAUSIBLE_DOMAIN=
NEXT_PUBLIC_PLAUSIBLE_SCRIPT_URL=

#Google Analytics
NEXT_PUBLIC_GOOGLE_ANALYTICS_ID=

#Email
EMAIL_API_BASE=
NEXT_PUBLIC_EMAIL_API_KEY=
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.7.1] - 2023-08-22

### Added

- Google Analytics provider

### Fixed

- Footer social icons responsive issues

## [0.7.0] - 2023-08-19

### Added
Expand Down
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Modern Developer Blog Template (Digital Garden Starter)

![Image2](/screenshots/garden2.png)
![GardenPromo](/screenshots/garden-promo.jpg)
[More screenshots here](/screenshots/)

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fthedevdavid%2Fdigital-garden%2F)
Expand Down Expand Up @@ -33,6 +33,7 @@ If you love this template and/or use it, please give it a star on GitHub. This w
- [Vercel](#vercel)
- [Umami](#umami)
- [Plausible](#plausible)
- [Google Analytics](#google-analytics)
- [Other analytics providers](#other-analytics-providers)
- [Newsletter subscription](#newsletter-subscription)
- [MailerLite](#mailerlite)
Expand Down Expand Up @@ -158,6 +159,13 @@ Plausible is a simple, lightweight, open-source alternative to Google Analytics.
Configure:
Set `NEXT_PUBLIC_PLAUSIBLE_DOMAIN` & `NEXT_PUBLIC_PLAUSIBLE_SCRIPT_URL` environment variables on your `.env.local` file and on Vercel dashboard. If you're concerned about ad blockers, you can proxy the plausible script through your own domain. You can read more about it [here](https://plausible.io/docs/proxy/guides/nextjs).

#### Google Analytics

Google Analytics is a web analytics service offered by Google that tracks and reports website traffic, currently as a platform inside the Google Marketing Platform brand. You can read more about it on [Google Analytics website](https://analytics.google.com/).

Configure:
Set `NEXT_PUBLIC_GOOGLE_ANALYTICS_ID` environment variable on your `.env.local` file and on Vercel dashboard.

#### Other analytics providers

Supporting other analytics providers are in progress. Feel free to open an issue if you have any suggestions or a PR if you want to implement it yourself.
Expand Down Expand Up @@ -219,7 +227,7 @@ Note: DO NOT overdo it. You can easily make images look bad with lossy compressi
- [x] projects page
- [x] about section on homepage
- [x] search & command bar
- [x] Analytics: Vercel, Umami, Plausible
- [x] Analytics: Vercel, Umami, Plausible, Google Analytics
- [x] Post series
- [x] Not found page
- [x] contributing docs
Expand Down
24 changes: 22 additions & 2 deletions components/analytics.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const Analytics = () => {
async
defer
data-website-id={process.env.NEXT_PUBLIC_UMAMI_WEBSITE_ID}
src={process.env.NEXT_PUBLIC_UMAMI_SCRIPT_URL}
src={process.env.NEXT_PUBLIC_UMAMI_SCRIPT_URL || "https://analytics.umami.is/script.js"}
/>
);
case "plausible":
Expand All @@ -21,9 +21,29 @@ export const Analytics = () => {
async
defer
data-domain={process.env.NEXT_PUBLIC_PLAUSIBLE_DOMAIN}
src={process.env.NEXT_PUBLIC_PLAUSIBLE_SCRIPT_URL}
src={process.env.NEXT_PUBLIC_PLAUSIBLE_SCRIPT_URL || "https://plausible.io/js/plausible.js"}
/>
);
case "google":
return (
<>
<Script
async
defer
strategy="afterInteractive"
src={`https://www.googletagmanager.com/gtag/js?id=${process.env.NEXT_PUBLIC_GOOGLE_ANALYTICS_ID}`}
/>

<Script strategy="afterInteractive" id="ga-script">
{`
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '${process.env.NEXT_PUBLIC_GOOGLE_ANALYTICS_ID}');
`}
</Script>
</>
);
case "vercel":
return <VercelAnalytics />;
default:
Expand Down
6 changes: 3 additions & 3 deletions components/footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import { SocialButton } from "@/components/social-button";

const Footer = () => {
return (
<footer className="mx-auto flex max-w-6xl flex-col items-center gap-6 border-t py-6">
<footer className="mx-auto flex max-w-6xl flex-col items-center gap-6 border-t py-6 pb-28 sm:pb-6">
<Signature />
<div className="container flex flex-col items-center justify-between space-y-5 text-center lg:flex-row lg:space-y-0 lg:text-left">
<div className="flex flex-col items-center gap-4 px-8 md:flex-row md:gap-2 md:px-0 lg:order-2">
<div className="flex flex-row space-x-2 text-sm text-muted-foreground">
<div className="flex flex-row flex-wrap justify-center space-x-2 text-sm text-muted-foreground">
{defaultAuthor.socialProfiles.map((platform) => (
<SocialButton
key={platform.name}
Expand All @@ -32,7 +32,7 @@ const Footer = () => {
<p className="text-sm text-muted-foreground md:text-left">
&copy; {new Date().getFullYear()} Built by {defaultAuthor.name}. &nbsp;
<a
href={defaultAuthor.socialProfiles.find((platform) => platform.name === "twitter")?.link}
href={defaultAuthor.socialProfiles.find((platform) => platform.name === "x")?.link}
target="_blank"
rel="noreferrer"
className="font-medium underline underline-offset-4"
Expand Down
2 changes: 1 addition & 1 deletion content/posts/get-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Editing list pages is done in the `lib` folder.
- `/projects` - `lib/projects-data.ts`
- `/social` - `lib/social-data.ts`

```hello.js
```js title="hello.js"
let hello = "hello darkness";

console.log(hello, "my old friend");
Expand Down
1 change: 1 addition & 0 deletions lib/metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const siteMetadata: SiteMetaData = {
},
description: defaultDescription,
siteRepo: "https://github.com/thedevdavid/digital-garden",
newsletterProvider: "mailerlite",
newsletterUrl: "https://developreneur.davidlevai.com",
analyticsProvider: "umami",
defaultTheme: "system",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "digital-garden",
"version": "0.7.0",
"version": "0.7.1",
"private": true,
"repository": "https://github.com/thedevdavid/digital-garden",
"author": {
Expand Down
Binary file added screenshots/garden-promo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/garden2.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 modified screenshots/garden3.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 modified screenshots/garden4.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 modified screenshots/garden5.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 screenshots/gardenv07-1.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 screenshots/gardenv07-2.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 screenshots/gardenv07-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion types/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ export interface MobileLinkProps extends LinkProps {
className?: string;
}

export type AnalyticsProvider = "umami" | "vercel" | "plausible";
export type AnalyticsProvider = "umami" | "vercel" | "plausible" | "google";

export type NewsletterProvider = "convertkit" | "substack" | "mailerlite";

export type SiteMetaData = {
title: {
Expand All @@ -35,6 +37,7 @@ export type SiteMetaData = {
};
description: string;
siteRepo: string;
newsletterProvider?: NewsletterProvider;
newsletterUrl?: string;
analyticsProvider?: AnalyticsProvider;
defaultTheme: "light" | "dark" | "system";
Expand Down

1 comment on commit ccef24e

@vercel
Copy link

@vercel vercel bot commented on ccef24e Aug 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.