Skip to content

Commit fee7849

Browse files
JeanneGrenetivan-dalmetyoannfleurydev
authored
FEAT : Env hint (#209)
Co-authored-by: Ivan Dalmet <ivan@dalmet.fr> Co-authored-by: Yoann Fleury <yoann.fleury@yahoo.com>
1 parent 32f4571 commit fee7849

File tree

13 files changed

+48
-13
lines changed

13 files changed

+48
-13
lines changed

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ENV_NAME="LOCAL"

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
11
# ↗️ Fork it! Community - Website
22

3+
## Installation
4+
5+
1. Duplicate the `.env.example` file to a new `.env` file, and update the environment variables
6+
7+
```bash
8+
cp .env.example .env
9+
```
10+
11+
2. Install dependencies
12+
13+
```bash
14+
pnpm install
15+
```
16+
17+
3. Development
18+
19+
```bash
20+
# Run the development server
21+
pnpm dev
22+
```
23+
324
## 🚀 Project Structure
425

526
Inside the project, you'll see the following folders and files:

astro.config.mjs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { defineConfig } from "astro/config";
1+
import { defineConfig, envField } from "astro/config";
22
import react from "@astrojs/react";
33
import tailwind from "@astrojs/tailwind";
44
import mdx from "@astrojs/mdx";
@@ -17,6 +17,16 @@ export default defineConfig({
1717
contentIntellisense: true,
1818
},
1919

20+
env: {
21+
schema: {
22+
ENV_NAME: envField.string({
23+
context: "server",
24+
access: "public",
25+
optional: true,
26+
}),
27+
},
28+
},
29+
2030
integrations: [
2131
react(),
2232
tailwind({
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
import { ENV_NAME } from "astro:env/server";
3+
---
4+
5+
{
6+
!!ENV_NAME && (
7+
<div class="pointer-events-none fixed left-0 right-0 top-0 z-[9999] h-[2px] bg-primary shadow-2xl">
8+
<span class="fixed left-0 top-0 rounded-br-sm bg-primary px-1.5 py-0.5 font-heading text-2xs font-medium uppercase tracking-widest text-black">
9+
{ENV_NAME}
10+
</span>
11+
</div>
12+
)
13+
}

src/content/events/2024-belgium-ottignies-louvain-la-neuve/index.mdx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
type: "meetup"
33
city: Ottignies-Louvain-la-Neuve
44
country: Belgium
5-
title: Fork it! Meetup Belgium 2024
65
date: 2024-11-19
76
status: "cancelled"
87
location:
@@ -42,5 +41,4 @@ schedule:
4241
startTime: 2024-11-19T19:30:00.000Z
4342
eventStatus: EventCancelled
4443
attendanceMode: OfflineEventAttendanceMode
45-
isFree: true
4644
---

src/content/events/2024-malaisia-kuala-lumpur/index.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ schedule:
4848
startTime: 2024-10-17T20:30:00.000Z
4949
eventStatus: EventScheduled
5050
attendanceMode: OfflineEventAttendanceMode
51-
isFree: true
5251
afterEventContent:
5352
photos:
5453
href: https://photos.app.goo.gl/SD81bdUVpdfm1iRg7

src/content/events/2024-morocco-casablanca/index.mdx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
---
2-
title: Fork it! Meetup Casablanca 2024
32
city: Casablanca
43
country: Morocco
54
date: 2024-11-28
@@ -48,7 +47,6 @@ schedule:
4847
startTime: 2024-11-28T21:00:00.000Z
4948
eventStatus: EventScheduled
5049
attendanceMode: OfflineEventAttendanceMode
51-
isFree: true
5250
afterEventContent:
5351
photos:
5452
href: https://photos.app.goo.gl/r69idnA4gxWJj4U46

src/content/events/2024-thailand-bangkok/index.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ schedule:
4949

5050
eventStatus: EventScheduled
5151
attendanceMode: OfflineEventAttendanceMode
52-
isFree: true
5352
afterEventContent:
5453
photos:
5554
href: https://photos.app.goo.gl/k74fQxdhqyX5gBWa9

src/content/events/2024-vietnam-da-nang/index.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ schedule:
4444
startTime: 2024-11-05T20:15:00.000Z
4545
eventStatus: EventScheduled
4646
attendanceMode: OfflineEventAttendanceMode
47-
isFree: true
4847
afterEventContent:
4948
photos:
5049
href: https://photos.app.goo.gl/kH76NbdFiNHzKbsD6

src/content/events/2024-vietnam-hanoi/index.mdx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
type: "meetup"
33
city: Hanoi
44
country: Vietnam
5-
title: Fork it! Meetup Hanoi 2024
65
date: 2024-10-17
76
status: "published"
87
location:
@@ -47,7 +46,6 @@ schedule:
4746
startTime: 2024-10-17T20:30:00.000Z
4847
eventStatus: EventScheduled
4948
attendanceMode: OfflineEventAttendanceMode
50-
isFree : true
5149
afterEventContent:
5250
photos:
5351
href: https://photos.app.goo.gl/wRQu4Byv75qCjUwF9

0 commit comments

Comments
 (0)