Skip to content

Commit 2791e9e

Browse files
committed
Add religions
1 parent edfa57e commit 2791e9e

File tree

11 files changed

+473
-54
lines changed

11 files changed

+473
-54
lines changed

README.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,15 +139,36 @@ AETHERIA_BASE_PATH=/Aetheria/ # GitHub Pages path
139139
- **Development Friendly**: Works with local files during development
140140
- **Production Flexible**: Can serve from CDN, API, or static files## 📁 **Project Structure**
141141

142+
- **`/content/`** - **📝 Narrative content** (Markdown) - Prose, lore, and instructional text
143+
- **`/site/public/data/`** - **🔢 Structured data** (JSON) - Lists, stats, and attributes
142144
- **`/site/`** - SolidJS application with data and pages
143-
- **`/src/data/`** - JSON data files with TypeScript types
144145
- **`/src/pages/`** - SolidJS page components
145146
- **`/docs/`** - Generated static site (GitHub Pages output)
146147
- **`/ai-docs/`** - Generated AI-optimized documentation (excluded from git)
147148
- **`/generate-ai-docs.js`** - AI documentation generator script
148149
- **`/dev.sh`** - Development workflow script
149150
- **`.github/workflows/`** - Automated deployment and AI docs generation
150151

152+
### Content Management Philosophy
153+
154+
This project uses a **hybrid approach** to maintain a single source of truth:
155+
156+
**Markdown in `/content/`** (for prose):
157+
- ✅ Religion lore and deity explanations
158+
- ✅ Character creation guidelines
159+
- ✅ Political system descriptions
160+
- ✅ Any narrative or instructional text
161+
- ✅ Easy to edit, version control friendly
162+
163+
**JSON in `/site/public/data/`** (for structured data):
164+
- ✅ Deity lists with domains and alignments
165+
- ✅ Character stats and attributes
166+
- ✅ Creature abilities and threat levels
167+
- ✅ Region hierarchies and demographics
168+
- ✅ Schema validation and iteration support
169+
170+
**Why This Matters**: You edit content ONCE in the appropriate format, then `generate-ai-docs.js` combines both sources to create comprehensive AI documentation. The website reads from JSON for dynamic content, while AI docs include both structured data AND narrative context.
171+
151172
## **Features**
152173

153174
### For AI Systems (RAG Integration)

content/README.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Content Directory
2+
3+
This directory contains **narrative and instructional content** for the Aetheria world, written in Markdown format.
4+
5+
## Purpose
6+
7+
The `/content` directory is part of a **hybrid content management approach**:
8+
9+
- **`/content/*.md`** - Prose, explanations, lore, and instructional text (single source of truth)
10+
- **`/site/public/data/*.json`** - Structured data for lists, stats, and attributes (single source of truth)
11+
12+
## Why This Structure?
13+
14+
### Markdown (in `/content`) is best for:
15+
- ✅ Prose and narrative content
16+
- ✅ Explanatory text and lore
17+
- ✅ How-to guides and instructions
18+
- ✅ Easy to edit and maintain
19+
- ✅ Version control friendly
20+
21+
### JSON (in `/site/public/data`) is best for:
22+
- ✅ Structured, repeating data (creatures, regions, characters)
23+
- ✅ Schema validation and consistency
24+
- ✅ Programmatic iteration (loops, filters, sorting)
25+
- ✅ Easier to catch missing fields
26+
27+
## Current Content Files
28+
29+
- **`religion-intro.md`** - Overview of gods and religion in Aetheria
30+
- **`character-creation.md`** - Step-by-step guide to creating characters
31+
- **`political-systems.md`** - Government types, titles, guilds, and ranks
32+
33+
## How It Works
34+
35+
1. **Edit content here** - Update markdown files in `/content`
36+
2. **Edit data in JSON** - Update structured data in `/site/public/data`
37+
3. **Generate AI docs** - Run `node generate-ai-docs.js` to:
38+
- Read markdown from `/content`
39+
- Read JSON from `/site/public/data`
40+
- Combine both into comprehensive AI-optimized documentation in `/ai-docs`
41+
4. **Website uses JSON** - The website reads directly from `/site/public/data` for dynamic content
42+
43+
## Adding New Content
44+
45+
### For narrative/instructional content:
46+
1. Create a new `.md` file in `/content`
47+
2. Update `generate-ai-docs.js` to load and use it
48+
3. Regenerate docs with `node generate-ai-docs.js`
49+
50+
### For structured data:
51+
1. Create or update `.json` file in `/site/public/data`
52+
2. Update `generate-ai-docs.js` if needed for new data structure
53+
3. Regenerate docs with `node generate-ai-docs.js`
54+
55+
## Single Source of Truth
56+
57+
The AI docs in `/ai-docs` are **generated artifacts**, not sources. Always edit:
58+
- Content → `/content/*.md`
59+
- Data → `/site/public/data/*.json`
60+
61+
Never edit files in `/ai-docs` directly - they will be overwritten on the next generation.

content/character-creation.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# How to Create a Character
2+
3+
First consider how this character fits into the world. Is it a simple villager who is just for background or a simple conversation? If so a simple race and gender maybe age and short description. If a minor NPC expand that with a longer more detailed description, probably a class and a couple personality traits. Is to be an ongoing character or NPC party member then a race, class, age, personality traits, relationships, and backstory are important.
4+
5+
## Steps to Create Your Character
6+
7+
1. Determine the character's role in the story (hero, villain, or background)
8+
2. Select a race (consider racial distribution by region)
9+
3. Pick an archetype (optional)
10+
4. Choose or pick a gender. In general it should be a pretty even split for most races.
11+
5. Decide on a class
12+
6. Determine age and appearance
13+
7. Finalize Alignment
14+
8. Add personality traits
15+
9. Establish relationships
16+
10. Create a backstory
17+
18+
## Races
19+
20+
What races are common depends on the region.
21+
22+
### Common Races
23+
- Human
24+
- Elf (High (also called moon or grey)/Wood/Desert/Arctic/Dark)
25+
- Dwarf (Common/Dark)
26+
- Gnome (Common/Dark)
27+
- Halfling
28+
- Beastkin (Cat/Mouse/Rabbit/Bird/Bear/Fox/Horse/Bull(Minotaur)/Wolf/Racoon/Fish/Turtle)
29+
- Half-Elf (various types)
30+
31+
### Uncommon Races
32+
- Half-Orc
33+
- Demonkin (Half-Demon)
34+
- Dragonkin (half-dragon (various types))
35+
- Damphir (half-vampire)
36+
- Elemental Touched (Earth/Air/Fire/Water/Shadow/Light/Aether/Spirit/Chrono/Mind)
37+
38+
### Rare Races
39+
- Dragon
40+
- Vampire
41+
- Ogre
42+
- Lizardman
43+
- Orc
44+
- Goblin
45+
- Demon (various types)
46+
- Centaur
47+
- Slime (genderless)
48+
- Fey (various types, Dryad, Fairy, etc.)

content/political-systems.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Political Landscape
2+
3+
Aetheria is a land of diverse political systems, ranging from absolute monarchies to simple tribal councils. The governance structures often reflect the cultural values and historical contexts of their respective regions.
4+
5+
## Political Systems
6+
7+
**Monarchy**: A system where a single ruler, often hereditary, holds significant power.
8+
9+
**Republic**: A government where senators are elected by the populace to make decisions and represent their interests.
10+
11+
**Council**: A governance structure where decisions are made by a council of elders or leaders from various clans.
12+
13+
**Oligarchy**: A system where a small group of powerful individuals or families control the government.
14+
15+
**Tribal**: A decentralized system where local chieftains or elders govern their own communities with loose alliances between tribes.
16+
17+
**Theocracy**: A system where religious leaders govern in accordance with divine guidance.
18+
19+
## Political Ranks and Titles
20+
21+
### Noble Titles
22+
23+
**Emperor/Empress**: The supreme ruler of an empire, often overseeing multiple kingdoms or territories. Their authority is considered absolute, and they are typically addressed as "Your Imperial Majesty".
24+
25+
**King/Queen**: The sovereign ruler of a kingdom. Their word is law, and they often have final say in all matters of state. All lesser nobles are expected to show deference. Addressed as "Your Majesty".
26+
27+
**Prince/Princess**: A royal title for the children of the monarch. Addressed as "Your Highness", the designated heir is typically addressed as "Your Royal Highness".
28+
29+
**Duke/Duchess**: A noble rank below the monarch, often governing a duchy. Frequently responsible for a large territory and vassalage, known as a duchy, may include multiple counties. Addressed as "Your Grace".
30+
31+
**Count/Countess**: A noble rank below duke/duchess, often governing a county. Frequently responsible for a moderate-sized realm, may be responsible for overseeing one or more barons. Addressed as "Your Grace".
32+
33+
**Baron/Baroness**: The lowest rank of landed nobility, often governing a small to moderate area with a large city and a few farms and villages together known as a barony. Addressed as "Your Excellency".
34+
35+
**Lord/Lady**: A general title for nobility. Typically those with titles but little in the way of land holdings which are generally limited to an estate or perhaps a small village. Addressed as "My Lord"/"My Lady".
36+
37+
### Other Titles and Ranks
38+
39+
**Chieftain**: The leader of a tribe or clan, often chosen for their leadership qualities and strength.
40+
41+
**Senator**: An elected representative in a republic, responsible for making laws and policies.
42+
43+
**High Priest/Priestess**: The leading religious figure in a theocracy, often wielding significant political power.
44+
45+
**Advisor**: A trusted counselor to a ruler or governing body, often providing expertise in specific areas.
46+
47+
**Governor**: An appointed official responsible for overseeing a specific region or territory on behalf of a monarch or central government.
48+
49+
**Ambassador**: A diplomatic representative sent to another kingdom or nation to manage relations and negotiate treaties.
50+
51+
**Admiral**: A high-ranking naval officer, often in charge of a fleet or naval operations.
52+
53+
**General**: A high-ranking military officer, often in charge of armies or military campaigns.
54+
55+
**Captain**: A mid-level military officer, often in charge of a company or ship.
56+
57+
**Commander**: A military officer ranking above a captain, often in charge of larger units or specific missions.
58+
59+
**Lieutenant**: A junior military officer, often serving under a captain or commander.
60+
61+
**Marshal/Sheriff**: A military officer assigned to oversee law enforcement and maintain order.
62+
63+
## Major Guilds
64+
65+
**The Adventurers Guild**: The quintessential organization for those who seek fortune and glory through exploration and adventure. Those seeking adventure may find quests and party members here. This is also a place to trade in monster parts and other valuable resources.
66+
67+
**The Merchants Guild**: A powerful organization that oversees trade and commerce throughout Aetheria. They regulate markets, set trade standards, and provide support to merchants and traders. Those wishing to set up a shop or trade caravan must become a member.
68+
69+
**The Mages Guild**: An esteemed institution dedicated to the study and practice of magic. The guild offers training, resources, and a community for magic users of all levels. All mages must be registered with the guild. The guild also monitors magical practices to ensure compliance with regulations. Keeping special watch on those with restricted skills.
70+
71+
**The Artisans Guild**: A collective of skilled craftsmen and artisans who create everything from everyday goods to exquisite works of art. The guild promotes high standards of craftsmanship and provides a marketplace for their creations.
72+
73+
**The Seafarers Guild**: An organization that represents the interests of sailors, fishermen, and others who make their living on the water. The guild provides support, training, and resources for those in maritime professions. Often works closely with the Merchants Guild.

content/religion-intro.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Gods and Religion
2+
3+
Aetheria is home to a pantheon of gods and goddesses, each representing different aspects of life and nature. Worship of these deities is widespread, with temples and shrines dedicated to them found throughout the land. Gods and goddesses have domains and portfolios they oversee, and their followers often seek their favor through prayer, offerings, and rituals.
4+
5+
Few are truly good or evil, simply powerful beings embodying different aspects of existence. Note that while powerful and near omnipotent in their domains, gods in Aetheria are not all-powerful nor infallible. They suffer from human-like flaws and limitations, and their actions can have unintended consequences. They tend to rely on their immortality to save them from their follies.

generate-ai-docs.js

Lines changed: 75 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@ const __dirname = dirname(__filename)
2222
class AetheriaAIDocsGenerator {
2323
constructor() {
2424
this.dataPath = join(__dirname, 'site', 'public', 'data')
25+
this.contentPath = join(__dirname, 'content')
2526
this.outputPath = join(__dirname, 'ai-docs')
2627
this.data = {}
28+
this.content = {}
2729
}
2830

2931
async loadAllData() {
@@ -51,6 +53,24 @@ class AetheriaAIDocsGenerator {
5153
}
5254
}
5355

56+
async loadContentFiles() {
57+
console.log('📖 Loading content markdown files...')
58+
59+
try {
60+
const files = await readdir(this.contentPath)
61+
for (const file of files) {
62+
if (file.endsWith('.md')) {
63+
const name = file.replace('.md', '')
64+
const content = await readFile(join(this.contentPath, file), 'utf-8')
65+
this.content[name] = content
66+
console.log(` ✓ Loaded ${name}.md`)
67+
}
68+
}
69+
} catch (error) {
70+
console.log(` ⚠️ Content directory not found or empty`)
71+
}
72+
}
73+
5474
async ensureOutputDir() {
5575
await mkdir(this.outputPath, { recursive: true })
5676
await mkdir(join(this.outputPath, 'regions'), { recursive: true })
@@ -200,6 +220,8 @@ Last updated: ${new Date().toISOString()}
200220
- [Character Classes](#character-classes)
201221
- [Creatures](#creatures)
202222
- [Political Systems](#political-systems)
223+
- [Gods and Religion](#gods-and-religion)
224+
- [Character Creation](#character-creation)
203225
- [Skills and Abilities](#skills-and-abilities)
204226
- [Equipment and Items](#equipment-and-items)
205227
- [Organizations](#organizations)
@@ -338,6 +360,8 @@ Last updated: ${new Date().toISOString()}
338360

339361
// Continue with other sections...
340362
content += this.generatePoliticsSection()
363+
content += this.generateReligionSection()
364+
content += this.generateCharacterCreationSection()
341365
content += this.generateSkillsSection()
342366
content += this.generateEquipmentSection()
343367
content += this.generateOrganizationsSection()
@@ -716,7 +740,12 @@ Last updated: ${new Date().toISOString()}
716740
generatePoliticsSection() {
717741
let content = '# Political Systems\n\n'
718742

719-
content += `## Government Types
743+
// Use content from markdown if available, otherwise use hardcoded fallback
744+
if (this.content['political-systems']) {
745+
content += this.content['political-systems']
746+
content += '\n\n---\n\n'
747+
} else {
748+
content += `## Government Types
720749
721750
**Monarchy**: A system where a single ruler, often hereditary, holds significant power.
722751
@@ -781,6 +810,50 @@ Last updated: ${new Date().toISOString()}
781810
---
782811
783812
`
813+
}
814+
return content
815+
}
816+
817+
generateReligionSection() {
818+
let content = '# Gods and Religion\n\n'
819+
820+
// Add intro text from markdown content
821+
if (this.content['religion-intro']) {
822+
content += this.content['religion-intro']
823+
content += '\n\n'
824+
}
825+
826+
// Add structured deity data from JSON (sorted alphabetically)
827+
if (this.data.religion?.deities && Array.isArray(this.data.religion.deities)) {
828+
content += '## Deities\n\n'
829+
830+
// Sort deities alphabetically by name
831+
const sortedDeities = [...this.data.religion.deities].sort((a, b) =>
832+
a.name.localeCompare(b.name)
833+
)
834+
835+
sortedDeities.forEach(deity => {
836+
content += `### ${deity.name}\n\n`
837+
content += `**Domains**: ${Array.isArray(deity.domains) ? deity.domains.join(', ') : deity.domains}\n\n`
838+
content += `**Alignment**: ${deity.alignment}\n\n`
839+
content += `${deity.description}\n\n`
840+
})
841+
}
842+
843+
content += '---\n\n'
844+
return content
845+
}
846+
847+
generateCharacterCreationSection() {
848+
let content = '# Character Creation\n\n'
849+
850+
// Use content from markdown if available
851+
if (this.content['character-creation']) {
852+
content += this.content['character-creation']
853+
content += '\n\n'
854+
}
855+
856+
content += '---\n\n'
784857
return content
785858
}
786859

@@ -1660,6 +1733,7 @@ The modifier in parentheses provides specific context for how that axis manifest
16601733
console.log('🚀 Starting AI-optimized documentation generation...')
16611734

16621735
await this.loadAllData()
1736+
await this.loadContentFiles()
16631737
await this.generateAllFiles()
16641738

16651739
console.log(`📁 Files generated in: ${this.outputPath}`)

package-lock.json

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)