Skip to content

Commit

Permalink
linting, workflow, templates
Browse files Browse the repository at this point in the history
  • Loading branch information
nkkko committed Aug 16, 2024
1 parent 02fe9e4 commit 7547e7b
Show file tree
Hide file tree
Showing 8 changed files with 337 additions and 69 deletions.
75 changes: 7 additions & 68 deletions .github/ISSUE_TEMPLATE/content_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ body:
value: |
### Content Production Request
- type: input
id: title
- type: select
id: content_type
attributes:
label: Article Title
description: Enter a brief and descriptive title for the article
placeholder: 'e.g., The Ultimate Guide to SEO in 2023'
validations:
required: true
label: Content Type
description: Select the type of content you are requesting.
options:
- Article
- Guide

- type: textarea
id: description
Expand All @@ -32,27 +32,6 @@ body:
description: Describe who the target audience is. Age, profession, interests, etc.
placeholder: 'e.g., Digital Marketers, Small Business Owners, etc.'

- type: input
id: keywords
attributes:
label: Keywords
description: List primary and secondary keywords for SEO optimization
placeholder: 'e.g., SEO, content marketing, digital marketing'

- type: input
id: estimated_length
attributes:
label: Estimated Length
description: Provide an estimated word count for the article
placeholder: 'e.g., 1500-2000 words'

- type: input
id: tone_style
attributes:
label: Tone and Style
description: Specify the desired tone and style (e.g., formal, informal, technical, conversational)
placeholder: 'e.g., Conversational and engaging'

- type: textarea
id: references
attributes:
Expand All @@ -67,46 +46,6 @@ body:
description: Provide examples of similar articles or content for reference
placeholder: 'Include links or titles of similar content.'

- type: textarea
id: seo_requirements
attributes:
label: SEO Requirements
description: Detail any specific SEO requirements, such as keyword density, meta descriptions, etc.
placeholder: 'List SEO guidelines and requirements.'

- type: textarea
id: structure
attributes:
label: Structure and Sections
description: Outline the structure of the article and its main sections
placeholder: |
1. **Introduction**:
- Brief overview of the topic.
- Hook to draw the reader in.
2. **Main Section 1**:
- Detailed information about the first subsection.
3. **Main Section 2**:
- Detailed information about the second subsection.
4. **Main Section 3**:
- Detailed information about the third subsection.
5. **Conclusion**:
- Summary of key points.
- Call to action or closing thoughts.
- type: textarea
id: media_requirements
attributes:
label: Media Requirements
description: Specify any images, graphics, videos, or other media that should be included
placeholder: 'List any media requirements.'

- type: input
id: deadline
attributes:
label: Deadline
description: Specify the due date for the first draft
placeholder: 'e.g., 2023-12-31'

- type: textarea
id: special_instructions
attributes:
Expand Down
31 changes: 31 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Pull Request Template

## Writer's Checklist

- [ ] **Follow Writing Structure**
- [ ] I have used more than two H2 subtitles to organize content.
- [ ] Include an introduction with at least two paragraphs before the first H2 section.
- [ ] Use bold, italic, underline, notes, quotes, TLDRs, and key points as needed.
- [ ] Include `code elements` where appropriate.
- [ ] Write the article in Markdown format.

- [ ] **Fact-Check**
- [ ] I have verified all facts and data points included in the article.

- [ ] **Assets**
- [ ] Save images in the `/assets` folder.
- [ ] Follow naming conventions: `YYYYMMDD_title_of_the_article_IMG_NAME_NO.png`.

- [ ] **Interlinking**
- [ ] Use `CTRL+F` to search for relevant keywords on:
- [Daytona Dotfiles Sitemap](https://www.daytona.io/sitemap-dotfiles.xml)
- [Daytona Definitions Sitemap](https://www.daytona.io/sitemap-definitions.xml)
- [ ] Interlink keywords using the appropriate URLs.

- [ ] **Glossary/Definitions**
- [ ] Identify and mark new terms that could be added to the Definitions page.

- [ ] **Review and Edit**
- [ ] Read the article out loud to catch any awkward phrasing.
- [ ] Run the draft through [Grammarly](https://grammarly.com) or a similar tool to correct grammar and spelling errors.
- [ ] Double-check adherence to the style guide and repository guidelines.
49 changes: 49 additions & 0 deletions .github/workflows/content-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Content Compliance Check

on: [pull_request]

jobs:
content-compliance:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '14'

- name: Install dependencies
run: npm install

- name: File Naming and Folder Structure Compliance
run: |
files_invalid=false
for file in $(git diff --name-only origin/main...HEAD)
do
if [[ $file == articles/* || $file == guides/* ]]
then
if ! [[ $file =~ ^(articles|guides)/[0-9]{8}_[a-z0-9_]+\.md$ ]]
then
echo "Error: File \"$file\" does not follow the naming convention YYYYMMDD_title_of_the_article.md in 'articles' or 'guides' folder" >&2
files_invalid=true
fi
fi
if [[ $file == assets/* ]]
then
if ! [[ $file =~ ^assets/[0-9]{8}_[a-z0-9_]+_img[0-9]+\.png$ ]]
then
echo "Error: File \"$file\" does not follow the naming convention YYYYMMDD_title_of_the_article_imgN.png in 'assets' folder" >&2
files_invalid=true
fi
fi
done
if [ $files_invalid = true ]; then
exit 1
fi
- name: Run Markdown Lint
run: npx markdownlint '**/*.md'
28 changes: 28 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"default": true,
"MD001": { "level": 1 }, // Header levels should only increment by one level at a time
"MD002": { "level": 1 }, // First header should be a top-level header
"MD003": { "style": "atx" }, // Header style (atx or setext)
"MD004": { "style": "dash" }, // Unordered list style (asterisk, plus, or dash)
"MD005": false, // Inconsistent indentation for list items at the same level
"MD022": true, // Headings should be surrounded by blank lines
"MD023": true, // Headings must start at the beginning of the line
"MD026": false, // Trailing punctuation in header
"MD031": false, // Fenced code blocks should be surrounded by blank lines
"MD032": false, // Lists should be surrounded by blank lines
"MD033": false, // Allow inline HTML
"MD034": true, // Bare URL used
"MD035": { "style": "---" }, // Horizontal rule style
"MD036": true, // Emphasis used instead of a header
"MD037": true, // Spaces inside emphasis markers
"MD038": true, // Spaces inside code span elements
"MD039": true, // Spaces inside link text
"MD040": false, // Fenced code blocks should have a language specified
"MD041": { "level": 1 }, // First line in file should be a top-level header
"MD042": false, // No empty links
"MD043": false, // Required heading structure
"MD045": false, // Images should have alternate text
"MD046": false, // Code block style
"MD047": false, // Files should end with a single newline character
"MD048": false // Code fence style
}
77 changes: 76 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,76 @@
# daytona content
# Content Repository for Technical Writers

Welcome to the `content` repository! This repo is dedicated to managing external technical writers who can contribute articles and guides. Here, you'll find details on how to participate, contribute, and get paid for your work.

## Table of Contents
- [Content Repository for Technical Writers](#content-repository-for-technical-writers)
- [Table of Contents](#table-of-contents)
- [Introduction](#introduction)
- [Writing Guidelines](#writing-guidelines)
- [Writing Structure](#writing-structure)
- [Assets](#assets)
- [Fact Check](#fact-check)
- [Interlinking](#interlinking)
- [Glossary/Definitions](#glossarydefinitions)
- [Notes](#notes)
- [Editing Process](#editing-process)
- [Get Published](#get-published)
- [Get Paid](#get-paid)

## Introduction
The `content` repository is a platform where technical writers can contribute articles to Daytona Dotfiles Insider blog by "solving" posted issues (proposed article ideas) through pull requests. If your PR is merged, you will be compensated.

## Writing Guidelines

Articles and guides should be saved in their respective folders, `articles` or `guides`, following the naming convention `YYYYMMDD_title_of_the_article.md`.

Articles should be at least 1500 words and follow Draft.dev’s excellent [style guide](https://draft.dev/learn/styleguide).

### Writing Structure
- **Headings**: Use H2 subtitles to structure your content, ensuring each article has several to facilitate the TOC.
- **Formatting**:
- Use **bold**, *italic*, and _underline_ for emphasis.
- Include `code elements` where necessary.
- Add links on important keywords.
- Use notes, quotes, TLDR sections (short bullet lists), and key points to enhance readability.
- **Introduction**: Always start with at least two paragraphs for the introduction before the first H2 section.

### Assets
- **Storage**: Save all images in the `/assets` folder.
- **Naming**: Name images the same as the article with an extra suffix, e.g., `YYYYMMDD_title_of_the_article_img1.png`.
- **Placement**: Do not embed images directly in the article; link to them from the `/assets` folder.

### Fact Check
ALWAYS ensure your information is accurate and up-to-date.

### Interlinking
Link relevant keywords to the following pages for definitions or related content:
- [Daytona Dotfiles Sitemap](https://www.daytona.io/sitemap-dotfiles.xml)
- [Daytona Definitions Sitemap](https://www.daytona.io/sitemap-definitions.xml)

### Glossary/Definitions
If you encounter a new term that could be added to Daytona Definitions page, mark it in the article and add a comment with a one-line description.

### Notes
Aim for long-lasting and evergreen content. Avoid mentioning specific versions of technology that may soon become outdated.

### Editing Process
Your article will go through up to two rounds of editing:
- We suggest reading your article out loud and running it through [Grammarly](https://grammarly.com).
- Authors will need to respond to edits and update the article accordingly.
- Articles not meeting our standards will not be published.

### Get Published
Once approved, we will inform you of the publication date.

### Get Paid
Upon acceptance:
- You will be paid directly or through bounties in case one was assigned to the issue.

To get paid, send us an invoice including:
- Date, Title of Article, Amount.
- Payment details such as: Bank Name, Account Number/IBAN, Routing Number/SWIFT Code/ABA.

For help with invoicing or other payment-related questions, feel free to reach out on [Slack](https://go.daytona.io/slack).

Happy writing! If you have any questions, feel free to open an issue or contact the repo maintainers.
65 changes: 65 additions & 0 deletions articles/20240101_article_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---
title: "Title of the Article"
description: "A brief description of what the article covers."
date: YYYY-MM-DD
author: "Author Name"
---

# Title of the Article

## Introduction

*[Write at least two paragraphs introducing the topic. Provide some background and explain why this topic is important.]*

### TL;DR

- **Bullet Point Summary**: *[Summarize the key points in a few bullet points for quick reference.]*

## Subtitle 1

*[Write the content of the first section here. Use clear and concise language, and ensure that each paragraph flows logically to the next.]*

**Key Point:** *[Highlight key information here.]*

### Subheading (if needed)

*[Additional details or subtopics related to the main heading.]*

## Subtitle 2

*[Write the content for the second major section of your article.]*

- **Bullet Point 1**: *[Use bullet points to list key points or steps if applicable.]*
- **Bullet Point 2**: *[Continue listing key points here.]*

### Code Example

```python
# Provide code examples if relevant, ensuring they are well-commented and easy to understand
print("Hello, World!")
```

### Image or Diagram

*[If you reference images, note them here but store the actual image in the /assets folder]*

![Description of Image](/assets/YYYYMMDD_title_of_the_article_img1.png)

## Subtitle 3

*[Continue with more sections as needed.]*

**Note:** *[Include any relevant notes or tips here.]*

## Conclusion

*[Summarize the key points discussed in the article. Optionally, propose next steps or further reading.]*

## References

*[Cite any sources or references used in the article.]*

*[Add links to related articles or further reading that might interest the reader.]*

<!-- Glossary/Definitions -->
<!-- Add comments with definitions for new keywords encountered. -->
Loading

0 comments on commit 7547e7b

Please sign in to comment.