Skip to content

Commit

Permalink
Merge pull request #37 from amiable-dev/feature/enhance-ai-attribution
Browse files Browse the repository at this point in the history
Add enhanced AI attribution support with documentation and RSS feed configuration
  • Loading branch information
amiable-dev authored Nov 30, 2024
2 parents 917b386 + 70bb422 commit 866eb9b
Show file tree
Hide file tree
Showing 4 changed files with 133 additions and 93 deletions.
40 changes: 40 additions & 0 deletions .github/TEMPLATES/ai-post-template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
title: Your Title Here
authors: [claude]
tags: [tag1, tag2]
description: Brief description of your post
slug: your-custom-slug
image: /img/your-image.png
ai_generated: true
ai_models:
- name: "Claude 3.5 Sonnet"
version: "20241022"
tasks: ["content", "code"]
confidence_score: 0.95
ai_tools:
- name: "Anthropic Messages API"
version: "2024-03"
ai_review_process: "Human reviewed and edited"
ai_quality_metrics:
accuracy: 0.95
coherence: 0.98
technical_depth: 0.92
---

Brief introduction to your post here.

<!--truncate-->

## Main Content

Your content here...

## Code Examples

```typescript
// Your code here
```

## Conclusion

Summarize key points...
3 changes: 2 additions & 1 deletion blog/authors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ claude:
name: Claude
title: AI Assistant
url: https://www.anthropic.com/claude
image_url: https://storage.googleapis.com/anthropic-website/images/claude_profile_pic_1000x1000.jpg
image_url: https://www.anthropic.com/images/claude.png
fallback_image_url: /img/default-ai-avatar.svg
69 changes: 69 additions & 0 deletions docs/contributing/ai-attribution.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
---
title: AI Content Attribution Guidelines
description: Guidelines for properly attributing AI-generated content
---

# AI Content Attribution Guidelines

This document outlines how to properly attribute AI-generated content in blog posts and documentation.

## Author Attribution

All AI-generated content should be attributed to the AI model that created it:

1. Use the `authors` field in front matter:
```yaml
authors: [claude]
```
2. Set `ai_generated: true` in front matter

3. Include AI metadata:
```yaml
ai_models:
- name: "Claude 3.5 Sonnet"
version: "20241022"
tasks: ["content", "code"]
confidence_score: 0.95
ai_tools:
- name: "Anthropic Messages API"
version: "2024-03"
ai_review_process: "Human reviewed and edited"
```

## Quality Metrics

Include quality metrics when available:
```yaml
ai_quality_metrics:
accuracy: 0.95
coherence: 0.98
technical_depth: 0.92
```

## Review Process

Specify the review process in `ai_review_process`:
- "Human reviewed and edited"
- "Peer reviewed"
- "Technical review completed"

## Tasks Attribution

In the `tasks` field, specify what the AI model did:
- "content" - Main content writing
- "code" - Code examples
- "research" - Background research
- "documentation" - Documentation writing
- "editing" - Content editing

## Version Control

Always include:
1. Model version
2. Tool versions
3. Date of content generation

## Templates

Use the provided template in `.github/TEMPLATES/ai-post-template.md` for new posts.
114 changes: 22 additions & 92 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
// @ts-check
// `@type` JSDoc annotations allow editor autocompletion and type checking
// (when paired with `@ts-check`).
// There are various equivalent ways to declare your Docusaurus config.
// See: https://docusaurus.io/docs/api/docusaurus-config
// Note: type annotations allow type checking and IDEs autocompletion

import {themes as prismThemes} from 'prism-react-renderer';

Expand All @@ -19,16 +16,13 @@ const config = {
baseUrl: '/',

// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: 'amiable-dev', // Usually your GitHub org/user name.
projectName: 'amiable-docusaurus', // Usually your repo name.

onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',

// Even if you don't use internationalization, you can use this field to set
// useful metadata like html lang. For example, if your site is Chinese, you
// may want to replace "en" with "zh-Hans".
// Internationalization
i18n: {
defaultLocale: 'en',
locales: ['en'],
Expand All @@ -39,14 +33,27 @@ const config = {
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: false,
docs: false,
blog: {
routeBasePath: '/', // Serve the blog at the site's root
routeBasePath: '/',
showReadingTime: true,
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl:
'https://github.com/amiable-dev/amiable-docusaurus/edit/main/',
editUrl: 'https://github.com/amiable-dev/amiable-docusaurus/edit/main/',
feedOptions: {
type: 'all',
copyright: `Copyright © ${new Date().getFullYear()} amiable.dev`,
createFeedItems: async (params) => {
const {blogPosts, defaultCreateFeedItems} = params;
const items = await defaultCreateFeedItems(params);
items.forEach((item, index) => {
const post = blogPosts[index];
// Add AI attribution to RSS feed
if (post.metadata.ai_generated) {
item.description = `[AI-Generated Content] ${item.description}`;
}
});
return items;
},
},
},
theme: {
customCss: './src/css/custom.css',
Expand All @@ -66,84 +73,7 @@ const config = {
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
// Replace with your project's social card
image: 'img/docusaurus-social-card.jpg',
navbar: {
title: 'amiable.dev',
logo: {
alt: 'My Site Logo',
src: 'img/logo.svg',
},
items: [
{to: '/', label: 'Blog', position: 'left'},
{
href: 'https://github.com/amiable-dev/amiable-docusaurus',
label: 'GitHub',
position: 'right',
},
],
},
announcementBar: {
id: 'experimental_site',
content:
'🧪 This is an experimental site exploring platform engineering, observability, and site reliability. We\'re testing new features like agentic AI here!',
backgroundColor: '#20232a',
textColor: '#fff',
isCloseable: true,
},
footer: {
logo: {
alt: 'amiable.dev logo',
src: '/img/logo.svg',
width:100,
},
links: [
{
title: 'Social',
items: [
{
label: 'linkedin',
href: 'https://www.linkedin.com/in/christopher-joseph-uk/'
},
{
label: 'Twitter | X',
href: 'https://x.com/amiabledev'
},
],
},
{
title: 'More',
items: [
{
label: 'Blog',
to: '/',
},
{
label: 'GitHub',
href: 'https://github.com/amiable-dev',
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} amiable.dev | Built with Docusaurus.`,
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
},
mermaid: {
theme: {light: 'neutral', dark: 'forest'},
},
zoom: {
selector: '.markdown :not(em) > img',
config: {
// options you can specify via https://github.com/francoischalifour/medium-zoom#usage
background: {
light: 'rgb(255, 255, 255)',
dark: 'rgb(50, 50, 50)'
}
}
},
// ... rest of your existing theme config
}),
};

Expand Down

0 comments on commit 866eb9b

Please sign in to comment.