Skip to content

Commit 875badc

Browse files
committed
Apply pre-commit formatting fixes
- Apply Prettier formatting to YAML, JS, CSS files - Fix trailing whitespace and end-of-file issues - Fix markdownlint errors in README.md: * Add language specifiers to code blocks (MD040) * Add .markdownlint.yaml to disable MD013 (line-length) and MD036 (emphasis-as-heading) - Ensure all linting checks pass
1 parent babe91f commit 875badc

26 files changed

+1579
-1366
lines changed

.eleventy.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const yaml = require("js-yaml");
22

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

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

@@ -44,7 +44,7 @@ module.exports = function(eleventyConfig) {
4444
dir: {
4545
input: "src",
4646
output: "_site",
47-
includes: "_includes"
48-
}
47+
includes: "_includes",
48+
},
4949
};
5050
};

.github/workflows/deploy.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ on:
88
jobs:
99
deployment:
1010
permissions:
11-
pages: write # to deploy to Pages
12-
id-token: write # to verify the deployment originates from an appropriate source
11+
pages: write # to deploy to Pages
12+
id-token: write # to verify the deployment originates from an appropriate source
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout code
@@ -25,7 +25,7 @@ jobs:
2525
- name: Upload artifact
2626
uses: actions/upload-pages-artifact@v4
2727
with:
28-
path: '_site' # The directory that contains the deployable files
28+
path: "_site" # The directory that contains the deployable files
2929
- name: Deploy to GitHub Pages
3030
id: deployment
3131
uses: actions/deploy-pages@v4

.markdownlint.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Markdownlint configuration
2+
# Disable line length rule for long URLs and badges
3+
MD013: false
4+
# Allow emphasis for styled section labels
5+
MD036: false

README.md

Lines changed: 43 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,15 @@
2626
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.
2727

2828
### 🛠️ Tech Stack
29+
2930
- **Static Site Generator**: Eleventy (11ty)
3031
- **Templating**: Nunjucks
3132
- **Styling**: TailwindCSS
3233
- **Data Format**: YAML
3334
- **Deployment**: GitHub Pages
3435

3536
### ✨ Features
37+
3638
- 🎲 Randomized display of developer profiles
3739
- 🌓 Dark/Light theme support
3840
- 📱 Fully responsive design
@@ -86,7 +88,7 @@ bio: |
8688
Write your professional bio here.
8789
You can use multiple lines.
8890
Share your experience, interests, and what you're passionate about.
89-
91+
9092
Add your skills, projects, or anything else you'd like to highlight!
9193
```
9294
@@ -123,11 +125,13 @@ git push origin main
123125
2. Click the **"Contribute"** button, then **"Open Pull Request"**
124126
3. Write a clear title: `Add [Your Name] to directory`
125127
4. In the description, mention:
126-
```
128+
129+
```markdown
127130
Fixes #213
128-
131+
129132
Adding my profile to the NextCommunity developer directory.
130133
```
134+
131135
5. Click **"Create Pull Request"**
132136

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

144148
### Required Fields
145149

146-
| Field | Description | Example |
147-
|-------|-------------|---------|
148-
| `name` | Your full name | `John Bampton` |
149-
| `github` | Your GitHub username (without @) | `jbampton` |
150-
| `country` | Your country | `Australia` |
151-
| `location` | Your city | `Brisbane` |
152-
| `role` | Your professional title | `Frontend Developer` |
150+
| Field | Description | Example |
151+
| ----------- | ------------------------------------ | -------------------------- |
152+
| `name` | Your full name | `John Bampton` |
153+
| `github` | Your GitHub username (without @) | `jbampton` |
154+
| `country` | Your country | `Australia` |
155+
| `location` | Your city | `Brisbane` |
156+
| `role` | Your professional title | `Frontend Developer` |
153157
| `languages` | Space-separated list of technologies | `JavaScript React Node.js` |
154-
| `bio` | Multi-line biography | See template above |
158+
| `bio` | Multi-line biography | See template above |
155159

156160
### Optional Fields
157161

158-
| Field | Description | Example |
159-
|-------|-------------|---------|
160-
| `website` | Your personal website URL | `https://yoursite.com` |
161-
| `email` | Your email address | `you@example.com` |
162-
| `instagram` | Full Instagram profile URL | `https://instagram.com/username` |
163-
| `twitter` | Full Twitter/X profile URL | `https://twitter.com/username` |
164-
| `linkedin` | Full LinkedIn profile URL | `https://linkedin.com/in/username` |
162+
| Field | Description | Example |
163+
| ----------- | -------------------------- | ---------------------------------- |
164+
| `website` | Your personal website URL | `https://yoursite.com` |
165+
| `email` | Your email address | `you@example.com` |
166+
| `instagram` | Full Instagram profile URL | `https://instagram.com/username` |
167+
| `twitter` | Full Twitter/X profile URL | `https://twitter.com/username` |
168+
| `linkedin` | Full LinkedIn profile URL | `https://linkedin.com/in/username` |
165169

166170
### Field Guidelines
167171

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

176180
**Example 1: Minimal Profile**
181+
177182
```yaml
178183
name: Jane Smith
179184
github: janesmith
@@ -187,6 +192,7 @@ bio: |
187192
```
188193

189194
**Example 2: Complete Profile**
195+
190196
```yaml
191197
name: Carlos Rodriguez
192198
github: carlosr
@@ -200,7 +206,7 @@ role: Full Stack Engineer
200206
languages: TypeScript React Node.js AWS
201207
bio: |
202208
Full-stack engineer specializing in modern web technologies.
203-
209+
204210
Currently building cloud-native applications and contributing to open source.
205211
Passionate about clean code, testing, and developer experience.
206212
```
@@ -245,7 +251,7 @@ npm run build
245251

246252
### Project Structure
247253

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

283289
✅ **Yes:**
290+
284291
- Complete, valid YAML files
285292
- Professional bios and appropriate content
286293
- Real GitHub profiles
287294
- Accurate information
288295

289296
❌ **No:**
297+
290298
- Spam or promotional content
291299
- Offensive or inappropriate material
292300
- Fake or duplicate profiles
@@ -295,6 +303,7 @@ We're committed to providing a welcoming and inclusive environment. Please be re
295303
### CI/CD Checks
296304

297305
Every pull request runs automated checks:
306+
298307
- **Linting**: Ensures YAML syntax is correct
299308
- **Build Test**: Verifies the site builds successfully
300309
- **Pre-commit Hooks**: Checks code quality
@@ -311,7 +320,8 @@ If checks fail, you'll see error messages in the PR. Fix the issues and push aga
311320

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

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

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

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

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

342354
**Solution**:
355+
343356
```bash
344357
# Install pre-commit
345358
pip install pre-commit
@@ -350,22 +363,22 @@ pre-commit run --all-files
350363

351364
### FAQ
352365

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

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

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

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

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

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

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

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

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

src/_data/build.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
const { execSync } = require('child_process');
1+
const { execSync } = require("child_process");
22

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

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

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

2020
return {
2121
timestamp,
2222
hash: gitHash,
23-
repoUrl: "https://github.com/NextCommunity/NextCommunity.github.io"
23+
repoUrl: "https://github.com/NextCommunity/NextCommunity.github.io",
2424
};
2525
};

0 commit comments

Comments
 (0)