Skip to content

Commit 4c964fe

Browse files
committed
Resolve submodule conflict for _includes/community
2 parents 20e1384 + dcfc4df commit 4c964fe

34 files changed

+1232
-520
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
run: yarn run test:coverage:all
6565

6666
- name: Upload coverage report to Codecov
67-
uses: codecov/codecov-action@v4.6.0
67+
uses: codecov/codecov-action@v5.1.1
6868
with:
6969
token: ${{ secrets.CODECOV_TOKEN }}
7070
name: ${{ env.CODECOV_UNIQUE_NAME }}

.github/workflows/issue.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Auto Label Issue
13-
uses: Renato66/[email protected].0
13+
uses: Renato66/[email protected].1
1414
with:
1515
repo-token: ${{ secrets.GITHUB_TOKEN }}
1616
ignore-comments: true

CONTRIBUTING-docs.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,22 @@ After you have been assigned to an issue, fork the [json-schema-org/website](htt
6464

6565
To propose modifications to our documentation that do not have an issue in the [documentation board](https://github.com/orgs/json-schema-org/projects/16), you can [create a GitHub issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/creating-an-issue#creating-an-issue-from-a-repository) and use the *Documentation* template to describe the changes. After that, you can decide whether you want to work on the changes yourself or let someone else claim the issue. If you decide to work on the issue, assign it to yourself and commit the changes to a new branch.
6666

67+
## Add metadata to newly created markdown files
68+
Metadata helps organize content and maintain consistency across all pages in the documentation. It also provides key information about the file, such as its title, author, and the last updated date.
69+
70+
When contributing to the documentation, it is essential to include metadata in every new markdown file. Metadata is critical for successfully building and rendering the file locally. Without it, the file may fail to render correctly or cause errors in the documentation system.
71+
72+
### Example of metadata in a new markdown file
73+
Every new `.md` file should start with a YAML front matter block. Here's an example:
74+
---
75+
title: "Your Page Title"
76+
section: "docs" # Can be used to categorize the content
77+
date: "YYYY-MM-DD" # Optional: Date when the page was created or last updated
78+
author: "Your Name" # Optional: Your name if you're the author
79+
tags: ["tag1", "tag2"] # Optional: Tags to categorize the page
80+
---
81+
To add the front matter metadata, copy and paste the example above at the top of your .md file and replace the details with the information of your document.
82+
6783
## Create a Pull Request
6884

6985
To submit your work to review by the community, open a draft pull request to the `main` upstream branch, and add the issue your pull request solves. Add @json-schema-org/docs-team as a reviewer of your pull request, and let us know in the #documentation Slack channel your pull request is ready for review.

README.md

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@
2020
</p>
2121

2222
# 👋 Welcome to the JSON Schema website
23-
This repository contains the sources of JSON Schema website:
23+
This repository contains the source code of the JSON Schema website:
2424

25-
* It's powered by Next.js,
26-
* It uses Tailwind CSS framework,
27-
* It's build and deployed with Netlify.
25+
* Powered by Next.js,
26+
* Uses the Tailwind CSS framework,
27+
* Built and deployed with Netlify.
2828

29-
## Setting up Project
29+
## Setting up the Project
3030

31-
Please refer to the [INSTALLATION.md](./INSTALLATION.md) file for instructions on how to set up the project on your local machine.
31+
Please refer to [INSTALLATION.md](./INSTALLATION.md) for instructions on how to set up the project for local development.
3232

3333
## Project structure
3434

@@ -37,41 +37,42 @@ This repository has the following structure:
3737
<!-- If you make any changes in the project structure, remember to update it. -->
3838

3939
```text
40-
├── .github # Definitions of GitHub workflows, pull request and issue templates
40+
├── .github # Definitions of GitHub workflows, pull request, and issue templates
4141
├── components # Various generic components such as "Button", "Figure", etc.
42-
├── data # JSON Schema Implementations.
42+
├── data # JSON Schema implementations
4343
├── styles # Various CSS files
44-
├── lib # Various JS code for preparing static data to render in pages
45-
├── pages # Website's pages source. It includes raw markdown files and React page templates.
44+
├── lib # Various JS code for preparing static data to render on pages
45+
├── pages # Website's pages source, including raw markdown files and React page templates
4646
│ ├── overview # JSON Schema initiative docs
4747
│ ├── blog # Blog posts
4848
│ ├── learn # JSON Schema docs
4949
│ └── implementations # Various pages to describe tools
50-
├── public # Data for site metadata and static blog such as images
50+
├── public # Data for site metadata and static assets such as images
5151
├── next.config.js # Next.js configuration file
5252
5353
```
5454

5555
## Contribute
56-
5756
Here are some areas where you can contribute to the website:
58-
- Blogs posts
59-
- Case Studies
57+
58+
- Blog posts
59+
- Case studies
6060
- Design
61-
- Documentation
61+
- Documentation improvements
6262
- Website enhancements
63-
- Add a new JSON Schema Implementation
63+
- Add a new JSON Schema implementation
6464
- JSON Schema Landscape
6565

66-
To figure out a good first issue to work on, join our Slack workspace and visit the `#contribute` channel. This channel is specifically designed for onboarding and supporting new contributors.
66+
To identify good first issues to work on, join our Slack workspace and visit the `#contribute` channel. This channel is specifically designed for onboarding and supporting new contributors.
6767

6868
You should also check out our [Contributing guidelines](./CONTRIBUTING.md).
6969

7070
### Contributors
7171

72-
Thanks goes to these wonderful people who contributed to this website:
73-
<a href = "https://github.com/json-schema-org/website/graphs/contributors">
74-
<img src = "https://contrib.rocks/image?repo=json-schema-org/website"/>
72+
Thanks to these wonderful people who contributed to this website:
73+
<br />
74+
<a href="https://github.com/json-schema-org/website/graphs/contributors">
75+
<img src="https://contrib.rocks/image?repo=json-schema-org/website"/>
7576
</a>
7677

7778
<sub>Made with [contributors-img](https://contrib.rocks).</sub>
@@ -83,19 +84,20 @@ Thanks goes to these wonderful people who contributed to this website:
8384
### Backers
8485

8586
**Thank you to all our backers!**
87+
8688
[![Backers](https://opencollective.com/json-schema/backers.svg)](https://opencollective.com/json-schema/backers.svg?avatarHeight=90)
8789

8890
## Connect with the JSON Schema Community
8991

9092
<p align="left">
91-
<a href="https://json-schema.org/slack" target="blank" style="margin-right: 5px;"><img align="center" src="https://img.icons8.com/color/48/null/slack-new.png" alt="JSON Schema Slack" height="30" width="40" /></a>
92-
<a href="https://x.com/jsonschema" target="blank" style="margin-right: 5px;"><img align="center" src="https://raw.githubusercontent.com/rahuldkjain/github-profile-readme-generator/master/src/images/icons/Social/twitter.svg" alt="JSON Schema Twitter" height="30" width="40" /></a>
93-
<a href="https://www.linkedin.com/company/jsonschema" target="blank" style="margin-right: 5px;"><img align="center" src="https://raw.githubusercontent.com/rahuldkjain/github-profile-readme-generator/master/src/images/icons/Social/linked-in-alt.svg" alt="JSON Schema LinkedIn" height="30" width="40" /></a>
94-
<a href="https://www.youtube.com/@JSONSchemaOrgOfficial" target="blank"><img align="center" src="https://raw.githubusercontent.com/rahuldkjain/github-profile-readme-generator/master/src/images/icons/Social/youtube.svg" alt="JSON Schema YouTube" height="30" width="40" /></a>
93+
<a href="https://json-schema.org/slack" target="_blank" style="margin-right: 5px;"><img align="center" src="https://img.icons8.com/color/48/null/slack-new.png" alt="JSON Schema Slack" height="30" width="auto" /></a>
94+
<a href="https://twitter.com/jsonschema" target="_blank" style="margin-right: 5px;"><img align="center" src="https://raw.githubusercontent.com/rahuldkjain/github-profile-readme-generator/master/src/images/icons/Social/twitter.svg" alt="JSON Schema Twitter" height="30" width="auto" /></a>
95+
<a href="https://www.linkedin.com/company/jsonschema" target="_blank" style="margin-right: 5px;"><img align="center" src="https://raw.githubusercontent.com/rahuldkjain/github-profile-readme-generator/master/src/images/icons/Social/linked-in-alt.svg" alt="JSON Schema LinkedIn" height="30" width="auto" /></a>
96+
<a href="https://www.youtube.com/@JSONSchemaOrgOfficial" target="_blank"><img align="center" src="https://raw.githubusercontent.com/rahuldkjain/github-profile-readme-generator/master/src/images/icons/Social/youtube.svg" alt="JSON Schema YouTube" height="30" width="auto" /></a>
9597
</p>
9698

9799
## Inspired by
98-
This document has been inspired by [AsyncAPI website README.md](https://github.com/asyncapi/website/blob/master/README.md).
100+
This document was inspired by [AsyncAPI website README.md](https://github.com/asyncapi/website/blob/master/README.md).
99101

100102
## License
101-
The contents of this repository are [licensed under](./LICENSE) either the BSD 3-clause license *or* the Academic Free License v3.0.
103+
The contents of this repository are licensed under either the BSD 3-clause license *or* the Academic Free License v3.0. See [LICENSE](./LICENSE).

data/ambassador_lists.json

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{
2+
"contents": [
3+
{
4+
"title": "Written content",
5+
"details": "Write guides, step-by-step tutorials, community documentation, JSON Schema blog posts, and beyond.",
6+
"icon": "/img/ambassadors/illustrations/content.png"
7+
},
8+
{
9+
"title": "Podcasts and Videos",
10+
"details": "Produce educational videos, podcasts or livestreams speaking about JSON Schema.",
11+
"icon": "/img/ambassadors/illustrations/video.png"
12+
},
13+
{
14+
"title": "Give talks",
15+
"details": "Speak at meetups and conferences; we’ll help with slides, abstract submissions, and travel budget.",
16+
"icon": "/img/ambassadors/illustrations/speaker.png"
17+
},
18+
{
19+
"title": "JSON Schema Contributions",
20+
"details": "Collaborate with the JSON Schema community via diverse contributions and improvements.",
21+
"icon": "/img/ambassadors/illustrations/contributing.png"
22+
},
23+
{
24+
"title": "Ecosystem Impact",
25+
"details": "Promote JSON Schema adoption in other ecosystems.",
26+
"icon": "/img/ambassadors/illustrations/ecosystem.png"
27+
},
28+
{
29+
"title": "Gather Case Studies",
30+
"details": "Collaborate in the production of case-studies.",
31+
"icon": "/img/ambassadors/illustrations/case-studies.png"
32+
}
33+
],
34+
"tokens": [
35+
{
36+
"emoji": "🗺️",
37+
"title": "Travel",
38+
"details": "Ambassadors are provided free entry to JSON conferences."
39+
},
40+
{
41+
"emoji": "🌟",
42+
"title": "Recognition",
43+
"details": "Ambassadors receive community-wide recognition."
44+
},
45+
{
46+
"emoji": "🎁",
47+
"title": "Special Swags",
48+
"details": "Community members recognize you by gifting you exclusive JSON Ambassador swag."
49+
},
50+
{
51+
"emoji": "🧰",
52+
"title": "Workshop Swags",
53+
"details": "Ambassadors are gifted swag from JSON conferences and workshops."
54+
}
55+
]
56+
}

data/ambassadors.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../_includes/community/programs/ambassadors/ambassadors.json

lib/calendarUtils.ts

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
import moment from 'moment-timezone';
2+
3+
export async function fetchRemoteICalFile(url: string): Promise<string | null> {
4+
try {
5+
const response = await fetch(url, { method: 'GET', mode: 'no-cors' });
6+
if (!response.ok) {
7+
throw new Error(`HTTP error! status: ${response.status}`);
8+
}
9+
return await response.text();
10+
} catch (error) {
11+
console.error('Error fetching iCal file:', error);
12+
return null;
13+
}
14+
}
15+
16+
export function printEventsForNextWeeks(icalData: { [x: string]: any }) {
17+
const arrayDates = [];
18+
if (!icalData) {
19+
console.error('iCal data is empty or invalid.');
20+
return;
21+
}
22+
23+
// Calculate the range of dates for the next 12 weeks from today
24+
const today = moment().startOf('day');
25+
const nextTwelveWeeksEnd = moment().add(12, 'weeks').endOf('day');
26+
27+
// Loop through the events in the iCal data
28+
for (const k in icalData) {
29+
const event = icalData[k];
30+
31+
if (event.type === 'VEVENT') {
32+
const title = event.summary;
33+
34+
const timezoneL = moment.tz.guess(); // Default to UTC if timezone information is not provided
35+
36+
const startDate = moment.tz(event.start, timezoneL);
37+
38+
// Complicated case - if an RRULE exists, handle multiple recurrences of the event.
39+
if (event.rrule !== undefined) {
40+
const dates = event.rrule.between(
41+
today.toDate(),
42+
nextTwelveWeeksEnd.toDate(),
43+
true,
44+
);
45+
46+
// Loop through the set of date entries to see which recurrences should be printed.
47+
for (const date of dates) {
48+
const startDate = moment.tz(date, timezoneL);
49+
const eventtimezone = event.start.tz;
50+
const owntimezone = moment.tz.guess();
51+
const eventOffset = moment.tz(eventtimezone).utcOffset();
52+
const localOffset = moment.tz(owntimezone).utcOffset();
53+
const offsetDifference = localOffset - eventOffset;
54+
55+
// Check if the event falls within the next 4 weeks from today
56+
if (startDate.isBetween(today, nextTwelveWeeksEnd, undefined, '[]')) {
57+
const dateTimezone = moment.tz.zone(event.start.tz);
58+
let offset;
59+
if (dateTimezone && offsetDifference)
60+
offset = offsetDifference - dateTimezone.utcOffset(date);
61+
62+
const newDate = moment(date).subtract(offset, 'minutes').toDate();
63+
64+
const start = moment(newDate);
65+
const utcDate = start.utc();
66+
67+
const time = utcDate.format('MMMM Do YYYY, HH:mm');
68+
const day = utcDate.format('D');
69+
const parsedStartDate = utcDate.format('YYYY-MM-DD HH:mm:ss');
70+
arrayDates.push({
71+
title,
72+
time,
73+
day,
74+
timezone: 'UTC',
75+
parsedStartDate,
76+
});
77+
}
78+
}
79+
} else {
80+
// Simple case - no recurrences, just print out the calendar event.
81+
if (startDate.isBetween(today, nextTwelveWeeksEnd, undefined, '[]')) {
82+
const utcDate = startDate.utc();
83+
84+
const time = utcDate.format('MMMM Do YYYY, HH:mm');
85+
const day = utcDate.format('D');
86+
const parsedStartDate = utcDate.format('YYYY-MM-DD HH:mm:ss');
87+
arrayDates.push({
88+
title,
89+
time,
90+
day,
91+
timezone: 'UTC',
92+
parsedStartDate,
93+
});
94+
}
95+
}
96+
}
97+
}
98+
99+
arrayDates.sort(
100+
(x, y) =>
101+
new Date(x.parsedStartDate).getTime() -
102+
new Date(y.parsedStartDate).getTime(),
103+
);
104+
105+
return arrayDates;
106+
}

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"node": "^20.0.0"
2727
},
2828
"dependencies": {
29-
"@docsearch/react": "3.6.1",
29+
"@docsearch/react": "3.8.0",
3030
"@types/jsonpath": "^0.2.4",
3131
"axios": "1.7.7",
3232
"babel-loader": "^9.1.3",
@@ -38,8 +38,8 @@
3838
"js-yaml": "^4.1.0",
3939
"jsonpath": "^1.1.1",
4040
"jszip": "^3.10.1",
41-
"markdown-to-jsx": "^7.4.7",
42-
"moment": "2.29.4",
41+
"markdown-to-jsx": "^7.6.2",
42+
"moment": "2.30.1",
4343
"next": "14.2.14",
4444
"next-sitemap": "^4.2.3",
4545
"next-themes": "^0.3.0",
@@ -49,17 +49,17 @@
4949
"react-syntax-highlighter": "^15.6.1",
5050
"react-text-truncate": "^0.19.0",
5151
"reading-time": "^1.5.0",
52-
"slate": "^0.103.0",
52+
"slate": "^0.110.2",
5353
"slate-react": "^0.108.0",
5454
"slugify": "^1.6.5",
5555
"yarn": "1.22.22",
5656
"zero-fill": "^2.2.4",
5757
"zustand": "^5.0.0"
5858
},
5959
"devDependencies": {
60-
"@babel/core": "^7.25.2",
60+
"@babel/core": "^7.26.0",
6161
"@babel/preset-env": "^7.26.0",
62-
"@cypress/code-coverage": "^3.13.2",
62+
"@cypress/code-coverage": "^3.13.6",
6363
"@next/eslint-plugin-next": "^14.0.1",
6464
"@svgr/webpack": "^8.1.0",
6565
"@types/babel__core": "^7",
@@ -92,7 +92,7 @@
9292
"postcss": "^8.4.41",
9393
"prettier": "3.3.3",
9494
"tailwindcss": "^3.3.5",
95-
"typescript": "5.2.2",
95+
"typescript": "5.7.2",
9696
"webpack": "^5.94.0"
9797
},
9898
"babel": {

0 commit comments

Comments
 (0)