Skip to content

Commit 02eec9f

Browse files
Copilotcsharpfritz
andcommitted
Add Contribute page with navigation and sitemap integration
Co-authored-by: csharpfritz <[email protected]>
1 parent 30d50ef commit 02eec9f

6 files changed

Lines changed: 215 additions & 7 deletions

File tree

Web/Extensions/EndpointExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public static void MapSitemapEndpoint(this WebApplication app)
3636
);
3737

3838
// Add URLs for static pages
39-
var staticPages = new[] { "/Privacy" };
39+
var staticPages = new[] { "/Privacy", "/Contribute" };
4040
foreach (var page in staticPages)
4141
{
4242
sitemap.Root.Add(

Web/Pages/Contribute.cshtml

Lines changed: 193 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
@page
2+
@model ContributeModel
3+
@{
4+
ViewData["Title"] = "Contribute - Copilot That Jawn";
5+
ViewData["Description"] = "Learn how to contribute tips, tricks, and insights to Copilot That Jawn by submitting pull requests to our GitHub repository.";
6+
}
7+
8+
<div class="container py-5">
9+
<div class="row justify-content-center">
10+
<div class="col-lg-8">
11+
<div class="text-center mb-5">
12+
<img src="~/img/icon.webp" alt="Copilot That Jawn Logo" class="header-icon mb-4" />
13+
<h1 class="display-4 fw-bold mb-4 brand-title">Contribute to Copilot That Jawn</h1>
14+
<p class="lead text-muted">Help the Philly dev community level up their AI game!</p>
15+
</div>
16+
17+
<div class="card shadow-sm mb-4">
18+
<div class="card-body">
19+
<h2 class="h4 mb-3">How to Contribute</h2>
20+
<p>We believe the best insights come from the community. If you've got a killer tip, trick, or insight about AI development tools, we want to hear from you! Contributing to Copilot That Jawn is straightforward - just submit a pull request with your content.</p>
21+
</div>
22+
</div>
23+
24+
<div class="row g-4 mb-5">
25+
<div class="col-md-6">
26+
<div class="card h-100 shadow-sm">
27+
<div class="card-body">
28+
<h3 class="h5 mb-3"><i class="bi bi-file-earmark-text text-primary me-2"></i>What We're Looking For</h3>
29+
<ul class="list-unstyled mb-0">
30+
<li class="mb-2"><i class="bi bi-check2-circle text-success me-2"></i>GitHub Copilot tips and tricks</li>
31+
<li class="mb-2"><i class="bi bi-check2-circle text-success me-2"></i>Microsoft 365 Copilot insights</li>
32+
<li class="mb-2"><i class="bi bi-check2-circle text-success me-2"></i>Azure AI Services best practices</li>
33+
<li class="mb-2"><i class="bi bi-check2-circle text-success me-2"></i>Copilot Studio tutorials</li>
34+
<li class="mb-2"><i class="bi bi-check2-circle text-success me-2"></i>AI productivity workflows</li>
35+
<li class="mb-2"><i class="bi bi-check2-circle text-success me-2"></i>Real-world case studies</li>
36+
</ul>
37+
</div>
38+
</div>
39+
</div>
40+
<div class="col-md-6">
41+
<div class="card h-100 shadow-sm">
42+
<div class="card-body">
43+
<h3 class="h5 mb-3"><i class="bi bi-gear text-primary me-2"></i>Content Guidelines</h3>
44+
<ul class="list-unstyled mb-0">
45+
<li class="mb-2"><i class="bi bi-arrow-right text-primary me-2"></i>Clear, actionable advice</li>
46+
<li class="mb-2"><i class="bi bi-arrow-right text-primary me-2"></i>Include code examples</li>
47+
<li class="mb-2"><i class="bi bi-arrow-right text-primary me-2"></i>Beginner to advanced levels</li>
48+
<li class="mb-2"><i class="bi bi-arrow-right text-primary me-2"></i>Test your examples</li>
49+
<li class="mb-2"><i class="bi bi-arrow-right text-primary me-2"></i>Proper attribution</li>
50+
<li class="mb-2"><i class="bi bi-arrow-right text-primary me-2"></i>Philly flavor welcome!</li>
51+
</ul>
52+
</div>
53+
</div>
54+
</div>
55+
</div>
56+
57+
<div class="card border-primary mb-4">
58+
<div class="card-header bg-primary text-white">
59+
<h3 class="h5 mb-0"><i class="bi bi-code-square me-2"></i>Step-by-Step Contribution Process</h3>
60+
</div>
61+
<div class="card-body">
62+
<ol class="mb-0">
63+
<li class="mb-3">
64+
<strong>Fork the Repository</strong><br>
65+
Head over to <a href="https://github.com/csharpfritz/CopilotThatJawn" target="_blank" class="text-primary">github.com/csharpfritz/CopilotThatJawn</a> and fork the repo to your account.
66+
</li>
67+
<li class="mb-3">
68+
<strong>Clone Your Fork</strong><br>
69+
<code class="text-muted">git clone https://github.com/[your-username]/CopilotThatJawn.git</code>
70+
</li>
71+
<li class="mb-3">
72+
<strong>Create a New Branch</strong><br>
73+
<code class="text-muted">git checkout -b add-[your-tip-name]</code>
74+
</li>
75+
<li class="mb-3">
76+
<strong>Add Your Content</strong><br>
77+
Create a new markdown file in the <code>Content/Tips/</code> directory following our format (see below).
78+
</li>
79+
<li class="mb-3">
80+
<strong>Test Locally</strong><br>
81+
Run <code class="text-muted">dotnet watch run --project Web</code> to see how your content looks.
82+
</li>
83+
<li class="mb-3">
84+
<strong>Commit Your Changes</strong><br>
85+
<code class="text-muted">git add . && git commit -m "Add tip: [brief description]"</code>
86+
</li>
87+
<li class="mb-0">
88+
<strong>Submit a Pull Request</strong><br>
89+
Push to your fork and create a pull request with a clear description of your contribution.
90+
</li>
91+
</ol>
92+
</div>
93+
</div>
94+
95+
<div class="card mb-4">
96+
<div class="card-header">
97+
<h3 class="h5 mb-0"><i class="bi bi-file-text me-2"></i>Markdown Format Template</h3>
98+
</div>
99+
<div class="card-body">
100+
<p>Each tip should be a markdown file with YAML frontmatter. Here's the template to follow:</p>
101+
<pre><code class="language-markdown">---
102+
title: "Your Tip Title Here"
103+
slug: "url-friendly-slug"
104+
category: "GitHub Copilot" # or "Microsoft 365 Copilot", "Azure AI", etc.
105+
tags: ["relevant", "tags", "here"]
106+
difficulty: "Beginner" # Beginner, Intermediate, or Advanced
107+
author: "Your Name"
108+
publishedDate: "2025-01-15"
109+
lastModified: "2025-01-15"
110+
description: "Brief description that appears in previews and search results."
111+
---
112+
113+
# Your Tip Title Here
114+
115+
Brief introduction explaining what this tip covers and why it's useful.
116+
117+
## Main Content
118+
119+
Use clear headings, code examples, and explanations. For example:
120+
121+
```csharp
122+
// Example code with comments
123+
public void ExampleMethod()
124+
{
125+
// Your code here
126+
}
127+
```
128+
129+
## Pro Tips
130+
131+
- Use bullet points for quick takeaways
132+
- Include real-world examples
133+
- Add Philly references if relevant!
134+
135+
Remember to test your examples and make sure they work!</code></pre>
136+
</div>
137+
</div>
138+
139+
<div class="row g-4 mb-5">
140+
<div class="col-md-6">
141+
<div class="card h-100 border-success">
142+
<div class="card-body">
143+
<h3 class="h5 text-success mb-3"><i class="bi bi-check-circle me-2"></i>Good Examples</h3>
144+
<ul class="list-unstyled mb-0">
145+
<li class="mb-2">✅ "GitHub Copilot Chat: Debugging Like a Pro"</li>
146+
<li class="mb-2">✅ "5 Copilot Shortcuts Every Philly Dev Should Know"</li>
147+
<li class="mb-2">✅ "Building Azure Functions with AI Assistance"</li>
148+
<li class="mb-2">✅ "Prompt Engineering for Better Code Generation"</li>
149+
</ul>
150+
</div>
151+
</div>
152+
</div>
153+
<div class="col-md-6">
154+
<div class="card h-100 border-warning">
155+
<div class="card-body">
156+
<h3 class="h5 text-warning mb-3"><i class="bi bi-exclamation-triangle me-2"></i>Things to Avoid</h3>
157+
<ul class="list-unstyled mb-0">
158+
<li class="mb-2">❌ Overly promotional content</li>
159+
<li class="mb-2">❌ Outdated or untested examples</li>
160+
<li class="mb-2">❌ Copy-paste from documentation</li>
161+
<li class="mb-2">❌ Missing code examples</li>
162+
</ul>
163+
</div>
164+
</div>
165+
</div>
166+
</div>
167+
168+
<div class="text-center mb-5">
169+
<h2 class="h4 mb-4">Ready to Contribute?</h2>
170+
<p class="mb-4">Join our community of contributors and help make AI development more accessible for everyone!</p>
171+
<a href="https://github.com/csharpfritz/CopilotThatJawn" class="btn btn-primary btn-lg me-3" target="_blank">
172+
<i class="bi bi-github me-2"></i>Visit GitHub Repo
173+
</a>
174+
<a href="https://github.com/csharpfritz/CopilotThatJawn/issues" class="btn btn-outline-primary btn-lg" target="_blank">
175+
<i class="bi bi-chat-dots me-2"></i>Suggest Ideas
176+
</a>
177+
</div>
178+
179+
<div class="card border-info">
180+
<div class="card-body">
181+
<h3 class="h5 mb-3"><i class="bi bi-question-circle text-info me-2"></i>Questions or Need Help?</h3>
182+
<p class="mb-3">Contributing for the first time? No worries! We're here to help:</p>
183+
<ul class="list-unstyled mb-0">
184+
<li class="mb-2"><i class="bi bi-arrow-right text-info me-2"></i>Check out our existing tips for inspiration</li>
185+
<li class="mb-2"><i class="bi bi-arrow-right text-info me-2"></i>Open an issue on GitHub to discuss your idea first</li>
186+
<li class="mb-2"><i class="bi bi-arrow-right text-info me-2"></i>Join the conversation in pull request discussions</li>
187+
<li class="mb-0"><i class="bi bi-arrow-right text-info me-2"></i>Don't be afraid to ask questions - we're all learning!</li>
188+
</ul>
189+
</div>
190+
</div>
191+
</div>
192+
</div>
193+
</div>

Web/Pages/Contribute.cshtml.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
using Microsoft.AspNetCore.Mvc.RazorPages;
2+
3+
namespace Web.Pages;
4+
5+
public class ContributeModel : PageModel
6+
{
7+
public void OnGet()
8+
{
9+
}
10+
}

Web/Pages/Shared/_Layout.cshtml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,17 @@
3232
<span class="navbar-toggler-icon"></span>
3333
</button> <div class="navbar-collapse collapse d-sm-inline-flex justify-content-between">
3434
<ul class="navbar-nav">
35-
@* <li class="nav-item">
35+
<li class="nav-item">
3636
<a class="nav-link" asp-page="/Tips/Index">Tips</a>
3737
</li>
3838

3939
<li class="nav-item">
40-
<a class="nav-link" asp-area="" asp-page="/Privacy">Privacy</a>
41-
</li> *@
40+
<a class="nav-link" asp-page="/About">About</a>
41+
</li>
42+
43+
<li class="nav-item">
44+
<a class="nav-link" asp-page="/Contribute">Contribute</a>
45+
</li>
4246
</ul>
4347

4448
<!-- Theme toggle will be injected here by JavaScript -->

Web/Program.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@
2929

3030
app.UseAuthorization();
3131

32-
app.UseStaticFiles();
33-
app.MapRazorPages();
32+
app.MapStaticAssets();
33+
app.MapRazorPages()
34+
.WithStaticAssets();
3435
app.MapControllers(); // Map controller routes for API endpoints
3536

3637
// Map sitemap and RSS feed endpoints

Web/Web.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net9.0</TargetFramework>
55
<Nullable>enable</Nullable>
66
<ImplicitUsings>enable</ImplicitUsings>
77
</PropertyGroup> <ItemGroup>

0 commit comments

Comments
 (0)