Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .eleventy.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const yaml = require("js-yaml");

module.exports = function(eleventyConfig) {
module.exports = function (eleventyConfig) {
// Add this line to copy your external assets
eleventyConfig.addPassthroughCopy("src/assets");
// 1. Recognize YAML as a template format
Expand All @@ -20,11 +20,11 @@ module.exports = function(eleventyConfig) {
const fs = require("fs/promises");
const content = await fs.readFile(inputPath, "utf-8");
return yaml.load(content);
}
},
});

// 2. The Randomized Collection
eleventyConfig.addCollection("randomPeople", function(collectionApi) {
eleventyConfig.addCollection("randomPeople", function (collectionApi) {
// Grab all yaml files from the users folder
const people = collectionApi.getFilteredByGlob("src/users/*.yaml");

Expand All @@ -44,7 +44,7 @@ module.exports = function(eleventyConfig) {
dir: {
input: "src",
output: "_site",
includes: "_includes"
}
includes: "_includes",
},
};
};
6 changes: 3 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ on:
jobs:
deployment:
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand All @@ -25,7 +25,7 @@ jobs:
- name: Upload artifact
uses: actions/upload-pages-artifact@v4
with:
path: '_site' # The directory that contains the deployable files
path: "_site" # The directory that contains the deployable files
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
5 changes: 5 additions & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Markdownlint configuration
# Disable line length rule for long URLs and badges
MD013: false
# Allow emphasis for styled section labels
MD036: false
49 changes: 49 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Pre-commit configuration for NextCommunity.github.io
# See https://pre-commit.com for more information

repos:
# Standard pre-commit hooks for basic file checks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
exclude: ^package-lock\.json$
- id: end-of-file-fixer
exclude: ^package-lock\.json$
- id: check-yaml
args: ["--unsafe"]
- id: check-added-large-files
args: ["--maxkb=1000"]
- id: check-json
exclude: ^package-lock\.json$
- id: check-merge-conflict
- id: check-case-conflict
- id: mixed-line-ending
args: ["--fix=lf"]

# Prettier for code formatting (JavaScript, CSS, HTML, Markdown, YAML, JSON)
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
hooks:
- id: prettier
types_or: [javascript, css, html, markdown, yaml, json]
exclude: ^(package-lock\.json|_site/)
additional_dependencies:
- prettier@3.1.0

# Markdownlint for markdown files
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.39.0
hooks:
- id: markdownlint
args: ["--fix"]
exclude: ^node_modules/

# Exclude patterns applied to all hooks
exclude: |
(?x)(
^_site/|
^node_modules/|
^\.git/|
package-lock\.json
)
74 changes: 43 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,15 @@
NextCommunity is a static site directory built with [Eleventy (11ty)](https://www.11ty.dev/) that celebrates the global developer community. Each developer gets their own profile page showcasing their skills, bio, and social links.

### 🛠️ Tech Stack

- **Static Site Generator**: Eleventy (11ty)
- **Templating**: Nunjucks
- **Styling**: TailwindCSS
- **Data Format**: YAML
- **Deployment**: GitHub Pages

### ✨ Features

- 🎲 Randomized display of developer profiles
- 🌓 Dark/Light theme support
- 📱 Fully responsive design
Expand Down Expand Up @@ -86,7 +88,7 @@ bio: |
Write your professional bio here.
You can use multiple lines.
Share your experience, interests, and what you're passionate about.

Add your skills, projects, or anything else you'd like to highlight!
```

Expand Down Expand Up @@ -123,11 +125,13 @@ git push origin main
2. Click the **"Contribute"** button, then **"Open Pull Request"**
3. Write a clear title: `Add [Your Name] to directory`
4. In the description, mention:
```

```markdown
Fixes #213

Adding my profile to the NextCommunity developer directory.
```

5. Click **"Create Pull Request"**

### Step 8: Wait for Review ⏳
Expand All @@ -143,25 +147,25 @@ git push origin main

### Required Fields

| Field | Description | Example |
|-------|-------------|---------|
| `name` | Your full name | `John Bampton` |
| `github` | Your GitHub username (without @) | `jbampton` |
| `country` | Your country | `Australia` |
| `location` | Your city | `Brisbane` |
| `role` | Your professional title | `Frontend Developer` |
| Field | Description | Example |
| ----------- | ------------------------------------ | -------------------------- |
| `name` | Your full name | `John Bampton` |
| `github` | Your GitHub username (without @) | `jbampton` |
| `country` | Your country | `Australia` |
| `location` | Your city | `Brisbane` |
| `role` | Your professional title | `Frontend Developer` |
| `languages` | Space-separated list of technologies | `JavaScript React Node.js` |
| `bio` | Multi-line biography | See template above |
| `bio` | Multi-line biography | See template above |

### Optional Fields

| Field | Description | Example |
|-------|-------------|---------|
| `website` | Your personal website URL | `https://yoursite.com` |
| `email` | Your email address | `you@example.com` |
| `instagram` | Full Instagram profile URL | `https://instagram.com/username` |
| `twitter` | Full Twitter/X profile URL | `https://twitter.com/username` |
| `linkedin` | Full LinkedIn profile URL | `https://linkedin.com/in/username` |
| Field | Description | Example |
| ----------- | -------------------------- | ---------------------------------- |
| `website` | Your personal website URL | `https://yoursite.com` |
| `email` | Your email address | `you@example.com` |
| `instagram` | Full Instagram profile URL | `https://instagram.com/username` |
| `twitter` | Full Twitter/X profile URL | `https://twitter.com/username` |
| `linkedin` | Full LinkedIn profile URL | `https://linkedin.com/in/username` |

### Field Guidelines

Expand All @@ -174,6 +178,7 @@ git push origin main
### 📚 Real Examples

**Example 1: Minimal Profile**

```yaml
name: Jane Smith
github: janesmith
Expand All @@ -187,6 +192,7 @@ bio: |
```

**Example 2: Complete Profile**

```yaml
name: Carlos Rodriguez
github: carlosr
Expand All @@ -200,7 +206,7 @@ role: Full Stack Engineer
languages: TypeScript React Node.js AWS
bio: |
Full-stack engineer specializing in modern web technologies.

Currently building cloud-native applications and contributing to open source.
Passionate about clean code, testing, and developer experience.
```
Expand Down Expand Up @@ -245,7 +251,7 @@ npm run build

### Project Structure

```
```text
NextCommunity.github.io/
├── src/
│ ├── _data/ # Site-wide data files
Expand Down Expand Up @@ -281,12 +287,14 @@ We're committed to providing a welcoming and inclusive environment. Please be re
### What Gets Approved?

✅ **Yes:**

- Complete, valid YAML files
- Professional bios and appropriate content
- Real GitHub profiles
- Accurate information

❌ **No:**

- Spam or promotional content
- Offensive or inappropriate material
- Fake or duplicate profiles
Expand All @@ -295,6 +303,7 @@ We're committed to providing a welcoming and inclusive environment. Please be re
### CI/CD Checks

Every pull request runs automated checks:

- **Linting**: Ensures YAML syntax is correct
- **Build Test**: Verifies the site builds successfully
- **Pre-commit Hooks**: Checks code quality
Expand All @@ -311,7 +320,8 @@ If checks fail, you'll see error messages in the PR. Fix the issues and push aga

**Problem**: Your YAML file has syntax errors.

**Solution**:
**Solution**:

- Check for proper indentation (use spaces, not tabs)
- Ensure colons have a space after them (`name: John`, not `name:John`)
- Use `|` for multi-line bio text
Expand All @@ -321,7 +331,8 @@ If checks fail, you'll see error messages in the PR. Fix the issues and push aga

**Problem**: The `github` field doesn't match a real GitHub profile.

**Solution**:
**Solution**:

- Ensure you're using your exact GitHub username
- Check for typos
- Username is case-sensitive in this field
Expand All @@ -331,6 +342,7 @@ If checks fail, you'll see error messages in the PR. Fix the issues and push aga
**Problem**: File naming or format issue.

**Solution**:

- File must be in `src/users/` directory
- File must be named `username.yaml` (lowercase, with `.yaml` extension)
- All required fields must be filled in
Expand All @@ -340,6 +352,7 @@ If checks fail, you'll see error messages in the PR. Fix the issues and push aga
**Problem**: Code quality checks didn't pass.

**Solution**:

```bash
# Install pre-commit
pip install pre-commit
Expand All @@ -350,22 +363,22 @@ pre-commit run --all-files

### FAQ

**Q: Can I update my profile after it's merged?**
**Q: Can I update my profile after it's merged?**
A: Yes! Just create a new PR with updates to your YAML file.

**Q: How long does review take?**
**Q: How long does review take?**
A: Usually within 24-48 hours, depending on maintainer availability.

**Q: Can I add multiple social links?**
**Q: Can I add multiple social links?**
A: Yes, all social fields (twitter, linkedin, instagram) are optional and independent.

**Q: What if I don't have a personal website?**
**Q: What if I don't have a personal website?**
A: No problem! Just omit the `website` field or set it to your GitHub profile.

**Q: Can I use emojis in my profile?**
**Q: Can I use emojis in my profile?**
A: Yes, emojis are supported in the `name` and `bio` fields! 🎉

**Q: Is there a character limit for the bio?**
**Q: Is there a character limit for the bio?**
A: No hard limit, but keep it concise (2-4 paragraphs recommended).

---
Expand All @@ -374,7 +387,8 @@ A: No hard limit, but keep it concise (2-4 paragraphs recommended).

This project is licensed under the **GNU General Public License v3.0** - see the [LICENSE](LICENSE) file for details.

### What this means:
### What this means

- ✅ You can freely use, modify, and distribute this code
- ✅ You must disclose source code when distributing
- ✅ Changes must also be GPL-3.0 licensed
Expand All @@ -396,5 +410,3 @@ This project is licensed under the **GNU General Public License v3.0** - see the
- **Report bugs**: [Open an issue](https://github.com/jbampton/NextCommunity.github.io/issues)
- **Ask questions**: [Start a discussion](https://github.com/jbampton/NextCommunity.github.io/discussions)
- **Maintainer**: [@jbampton](https://github.com/jbampton)


14 changes: 7 additions & 7 deletions src/_data/build.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
const { execSync } = require('child_process');
const { execSync } = require("child_process");

module.exports = () => {
const now = new Date();

// Format the date: "Jan 26, 2026, 07:51 AM"
const timestamp = now.toLocaleString('en-US', {
dateStyle: 'medium',
timeStyle: 'short',
const timestamp = now.toLocaleString("en-US", {
dateStyle: "medium",
timeStyle: "short",
});

let gitHash = 'development';
let gitHash = "development";
try {
// Get the short git hash (first 7 characters)
gitHash = execSync('git rev-parse --short HEAD').toString().trim();
gitHash = execSync("git rev-parse --short HEAD").toString().trim();
} catch (e) {
console.warn("Could not fetch git hash, defaulting to 'development'");
}

return {
timestamp,
hash: gitHash,
repoUrl: "https://github.com/NextCommunity/NextCommunity.github.io"
repoUrl: "https://github.com/NextCommunity/NextCommunity.github.io",
};
};
Loading