-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refine content formatting, improve searching/prompt context
- Loading branch information
Showing
16 changed files
with
1,477 additions
and
1,040 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Category: dips | ||
|
||
SECTION1 | ||
Contribute: Devcon Improvement Proposals (DIPs) provide a mechanism for collecting collaborative community input on what should be included at the upcoming Devcon.: While we are excited to have a more formal process to hear ideas from the community (roughly inspired by the more decentralized PEP, BIP and EIP processes), this is an experiment, and it should be understood that approval of proposals ultimately lies solely with the Devcon team. DIPs focus on collaboration in the ecosystem between different projects. The Devcon team also publishes Requests For Proposals (RFPs), which are specific ideas we'd love to see take place for the next Devcon edition. They are available on our forum. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Category: faq | ||
|
||
QUESTIONS | ||
Devcon and Devconnect are the only two events organized by the Ethereum Foundation (yes, all the other amazing ETH events are community-run!). Both events are Ethereum-focused but serve different purposes. Devcon is a global Ethereum family reunion, a place to celebrate success and align on updates and direction. It is our principal event, all in one place with one big venue, and talks and workshops open to all. {link|Devcon SEA will take place in Bangkok, Thailand between 12-15 November 2024! |https://devcon.org/}Devconnect on the other hand, is a week to make progress, dive deep into specific topics among fellow experts, to co-work and collaborate. It is structurally entirely different from Devcon, and consists of many individual events, organized by you the community, that each cover one topic in depth. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Category: index | ||
|
||
SECTION1 | ||
Discover Ethereum and its community at Devcon!: Devcon is the Ethereum conference for developers, thinkers, and makers. Join Devcon and empower yourself to use and build decentralized systems. Devcon is more than just a conference with talks and presentations to learn about Ethereum. It’s a cultural hub and a place for inspiration for passionate builders, engineers, designers, researchers, community organizers, and artists. Whether you're a seasoned Ethereum expert or just starting, Devcon is for you. It’s an intensive introduction for new Ethereum explorers, a global family reunion for those already a part of our ecosystem, and a source of energy and creativity for all. | ||
|
||
SECTION2 | ||
Devcon 7 — Southeast Asia: Devcon’s goal is to make Ethereum more accessible to communities around the world and to contribute to the ongoing evolution of the global Ethereum ecosystem.: Our intention is to bring the Devcon experience to the entire Southeast Asia region. On the Road to Devcon (RTD), you can explore Ethereum communities in SEA and join meetups, conferences, and workshops. Ethereum can have real use cases in SEA. Vietnam, the Philippines, Indonesia, and Thailand are among the top 10 countries leading in the Global Crypto Adoption Index.{button|Explore RTD Events →|/road-to-devcon} | ||
|
||
SECTION3 | ||
Road to Devcon Grants: Are you based in SEA, driven by a community-oriented spirit, and passionate about Ethereum's potential to create a positive impact?: Check out the Road to Devcon grants round and apply. This initiative was born from our commitment to support the rise of new Ethereum events, grassroots communities, and educational endeavors across Southeast Asia before Devcon 7.{button|Apply for RTD Grants →|https://esp.ethereum.foundation/devcon-grants} | ||
|
||
SECTION4 | ||
Devcon VI Bogotá: Tracing our roots back to ÐΞVcon 0, a meetup of early Ethereum devs in Berlin, Devcon has grown into a global beacon for the Ethereum community, uniting voices, ideas, and innovations from across the world.: At Devcon VI, we turned our spotlight to Latin America. The Road to Devcon VI was paved with ~14 events across the region, hosted by the passionate local communities of builders in Latam.{button|Devcon VI Recap →|https://blog.ethereum.org/en/2022/11/17/devcon-vi-wrap} | ||
|
||
SECTION5 | ||
Devcon is geared toward Ethereum's builders, creators, and thinkers who wish to improve this world. Programming at Devcon takes a holistic approach and aims to engage all attendees through talks, panels, workshops, lightning talks, and freeform learning sessions.{button|View Full Archive →|https://archive.devcon.org} | ||
|
||
DEVCON_WEEK | ||
Devcon is a 4-day conference, all in one venue, happening between 12-15 November . But as usual, Devcon Week will span the entire week of November 9-17 , with events before and after Devcon, and side events during the nights, organized by the local and global Ethereum community. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Category: past_events | ||
|
||
SECTION1 | ||
Devcon Editions: Everything began in Berlin Kreuzberg in 2014 when the co-founders and earliest builders of Ethereum came together for a meet-up they named Devcon 0. Since then, Devcon has rotated the world. The journey went from Berlin to London, Shanghai, Cancún, Prague, Osaka and Bogotá. Each location brings something unique to the developer conference.: You might want to check out some details about Devcon’s history. Read on below for summaries of past editions, or head to the {link|Devcon Archive|https://archive.devcon.org/archive} to watch round-up videos, talks, and presentations. | ||
|
||
EVENTS | ||
After a three-year-long pause, we emerged from the pandemic stronger than before and reunited in Bogotá for the largest and some would say, “best Devcon yet.” One of its most powerful aspects was the impact on the regional community and the involvement of the flourishing Latin American Ethereum community, which had organized 14 community events around the region leading up to Devcon. Devcon 5 brought the Ethereum ecosystem together in Japan in October of 2019 for an event that featured more content and attendees than ever before. In addition to the conference talks, Devcon featured the event's first community run outdoor stage and experiential Park area, a powerful open from the City of Osaka, a celebrity appearance by the world’s most well-known dog, Kabosu (the original “Doge”) and so much more. Devcon 4 brought Ethereum's ecosystem and family back to Europe with a 2018 event at the Prague Convention Center in the Czech Republic (Czechia). With 3,000 strong in attendance, Devcon was filled with talks, experiences, teams from a matured application ecosystem, and more enterprise support than ever before. Devcon 3 was a celebration held around "Dio de Los Muertos" and Halloween in Cancun, Mexico in November of 2017. It was the largest ever Ethereum gathering at the time, with just under 2000 attending in a year of unprecedented growth in terms of network use, adoption and progress. Devcon 2 came alongside one of the most (in)famous moments in Ethereum's early history, as a set of Denial of Service attacks were launched against the network just hours before the event was set to begin. With many of the most formidable builders in the ecosystem gathered together in Shanghai, they helped to coordinate emergency upgrades backstage to restore full functionality to the network, moments before stepping forward to speak to the future of the network on stage. Only a few months after Ethereum came to life, DΞVCON 1 was held in London in November of 2015. Presenters remained hard at work on each piece of the original Ethereum roadmap, early dApp teams took the stage, and supporters teased the early industry adoption that was to arrive soon. It all began in Berlin. Long prior to the launch of Ethereum, the earliest builders and co-founders gathered in the Kreuzberg neighborhood in late November of 2014 to outline their work and designs for the future of Ethereum at a meetup called "ÐΞVcon-0". A great resource to learn about the historical context and the early ethos of the project. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Category: road_to_devcon | ||
|
||
JOURNEY | ||
Hey there, I'm Deva, the Devcon unicorn. Since the dawn of Devcon I have been a guiding light to the wonderstruck wanderers of Ethereum's vast universe, supporting them to find their tribe and community.: And now, the Road to Devcon calls again, inviting a diverse array of mavericks, just like you. Why Devcon is for You: Devcon is the Ethereum conference for developers, thinkers, and makers. You’ll meet the smartest and kindest people in the Ethereum ecosystem IRL, and gain insight into a unique culture that is challenging to fully understand just online. At Devcon, we explore Ethereum together through fiery dialogues, workshops, and peer-to-peer interactions. It’s where you are welcomed by a tribe that nurtures your growth, and where you build new relationships and networks. What is the Road to Devcon?: The Road to Devcon (RTD) is a series of Ethereum events and educational initiatives leading up to Devcon, organized by the active local communities in Southeast Asia. Explorers like you are shaping the road together, diving into workshops and talks, empowered by Ethereum’s promises and the motivation to bring this innovation to local communities, creating opportunities to learn and connect. Become a leader: Organize an event or start a community: If you're in SEA, community-driven, and passionate about Ethereum's positive impact, we're here to support you! This is your call to adventure, to be part of something bigger, something wilder. Imagine organizing events within your community to showcase Ethereum, or starting a new grassroots community through meetups and other educational initiatives focused on Ethereum. If a fire is ignited within you, now is the time to apply for the RTD grants and be a part of building our empowered, decentralized future. 🦄✨ | ||
|
||
EVENTS_TABLE | ||
The Road to Devcon (RTD) is a series of Ethereum events and educational initiatives leading up to Devcon, organized by the local communities in and near Southeast Asia. |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
import { client } from '../../../../tina/__generated__/client' | ||
import path from 'path'; | ||
const fs = require('fs') | ||
|
||
function cleanUpText(text: string): string { | ||
// Fix spacing around periods and braces that are incorrectly joined to words | ||
// text = text.replace(/([a-zA-Z])(\{link\|)/g, '$1 $2'); // Ensures space before "{link|" | ||
// text = text.replace(/(\})([a-zA-Z])/g, '$1 $2'); // Ensures space after "}" | ||
text = text.replace(/(\.)([A-Z])/g, '$1 $2'); // Ensures space after periods before capital letters | ||
// | ||
// Additional common cleanups can be added here | ||
return text; | ||
} | ||
|
||
const processContent = async (fileName: any) => { | ||
try { | ||
const cmsContent = await client.queries.pages({ relativePath: fileName }) | ||
const jsonData = cmsContent.data.pages as any; | ||
|
||
// Write the raw data to files, easier to inspect/debug this way - adds no functionality/can be commented out as needed | ||
fs.writeFileSync(path.resolve(__dirname, 'tina-queries', fileName.split('.mdx')[0].concat('.json')), JSON.stringify(jsonData)); | ||
|
||
// Function to recursively extract text | ||
function extractText(node: any): string { | ||
if (!node || typeof node !== 'object') return ''; | ||
let text = ''; | ||
|
||
if (node.type) { | ||
switch (node.type) { | ||
case 'text': | ||
// Ignore the bold property and append the text directly. | ||
text += node.text; | ||
break; | ||
case 'a': | ||
const linkText = node.children ? node.children.map((child: any) => extractText(child)).join('') : ''; | ||
text += `{link|${linkText}|${node.url}}`; | ||
break; | ||
case 'h1': | ||
case 'h2': | ||
case 'h3': | ||
case 'h4': | ||
case 'h5': | ||
case 'h6': | ||
if (node.children) { | ||
text += `${node.children.map((child: any) => extractText(child)).join('')}: `; | ||
} | ||
break; | ||
case 'p': | ||
case 'div': | ||
if (node.children && Array.isArray(node.children)) { | ||
text += node.children.map((child: any) => extractText(child)).join(' '); | ||
} | ||
break; | ||
default: | ||
if (node.children && Array.isArray(node.children)) { | ||
text += extractText(node.children); | ||
} | ||
} | ||
} else { | ||
// Handle objects possibly representing buttons or other link elements | ||
if (node.link && node.text && typeof node.link === 'string' && typeof node.text === 'string') { | ||
text += `{button|${node.text}|${node.link}}`; | ||
} else { | ||
// Recursively process other properties | ||
Object.keys(node).forEach(key => { | ||
if (!['id', '__typename', '_sys', 'url', 'title', 'type', 'bold', 'link', 'text'].includes(key)) { | ||
text += extractText(node[key]); | ||
} | ||
}); | ||
} | ||
} | ||
return text; | ||
} | ||
|
||
// Ignored keys at the root level | ||
const ignoredRootKeys = ['id', '__typename', '_sys']; | ||
|
||
// Collecting content with headers for each section | ||
let content = `Category: ${jsonData._sys.filename}\n\n`; | ||
Object.keys(jsonData).forEach(key => { | ||
if (!ignoredRootKeys.includes(key)) { | ||
content += `${key.toUpperCase()}\n`; | ||
content += extractText(jsonData[key]) + '\n\n'; | ||
} | ||
}); | ||
|
||
// Ensure the content directory exists | ||
const contentDir = path.resolve(__dirname, 'content'); | ||
if (!fs.existsSync(contentDir)) { | ||
fs.mkdirSync(contentDir); | ||
} | ||
|
||
// Writing the content to a file | ||
const filename = path.join(contentDir, jsonData._sys.filename.replace(/\.[^/.]+$/, "") + '.txt'); | ||
|
||
content = cleanUpText(content); | ||
|
||
fs.writeFileSync(filename, content.trim(), 'utf-8'); | ||
console.log(`Content written to ${filename}`); | ||
|
||
// return filename; // Return the path where the file was written | ||
} catch (error) { | ||
console.error('Error reading, parsing, or writing the file:', fileName, error); | ||
return null; | ||
} | ||
} | ||
|
||
// Load all files from folder | ||
function loadAllFilesFromFolder(folderPath: any) { | ||
try { | ||
const directoryPath = path.resolve(__dirname, folderPath); | ||
const files = fs.readdirSync(directoryPath).filter(Boolean); | ||
return files; | ||
} catch (error) { | ||
console.error('Error accessing folder or reading files:', error); | ||
return []; | ||
} | ||
} | ||
|
||
const contentFiles = loadAllFilesFromFolder('../../../../cms/pages') | ||
|
||
contentFiles.forEach((fileName: any) => { | ||
processContent(fileName); | ||
}) |
Oops, something went wrong.