Skip to content
Open
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
171 changes: 171 additions & 0 deletions meta/style-guide/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
# Evergreen Style Guide

This document serves to provide a set of guidelines for how to write good
documentation for Evergreen. This guide is less focused on the content and
more focused on the style and structure of the documentation.

## People

Whenever referring to someone in Evergreen, if they are a member of our
team and have an entry in [purduehackers/dark-forest](https://github.com/purduehackers/dark-forest)
then you should ALWAYS use the following format to refer to them:

✅ Correct

```markdown
[@rayhanadev](https://github.com/purduehackers/dark-forest/blob/main/people/organizers/rayhanadev.md)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's not abundantly clear from this where i get this username. should mention explicitly that the username should be pulled from dark-forest

```

You should never not link to someone in dark-forest if they have an entry there
and you should never refer to someone by a handle besides their dark-forest
handle.

❌ Incorrect

```markdown
@rayhanadev
@someotherhandleforray
[Ray](https://github.com/purduehackers/dark-forest/blob/main/people/organizers/rayhanadev.md)
```

## Linking

When linking to other pages in the Evergreen documentation, you should always
use absolute links from the root of the repository. This is to ensure that
links do not break _toooooo_ hard when the documentation is moved around.

✅ Correct

```markdown
[Hack Bishops](/meta/structure/bishops.md)
```

❌ Incorrect

```markdown
[Hack Bishops](../structure/bishops.md)
[Hack Bishops](structure/bishops.md)
```

You should also always use the title of the page as the text for the link
if it is a page in the Evergreen documentation.

✅ Correct

```markdown
[Hack Bishops](/meta/structure/bishops.md)
```

❌ Incorrect

```markdown
[The Bishops Page](/meta/structure/bishops.md)
```

## Files and Folders

As long as it generally makes sense, you should always feel free to create
new files and folders in the Evergreen repository. Some general tips for when
to create new files and folders:
Comment on lines +67 to +69
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
As long as it generally makes sense, you should always feel free to create
new files and folders in the Evergreen repository. Some general tips for when
to create new files and folders:
As long as it generally makes sense, you should always feel free to create
new files and folders in the Evergreen repository. Some tips for when
to create new files and folders:

pedantic nit but you're using "generally" too much :P


- If a page is getting too long, consider splitting it into multiple pages
- If a page is getting too complex, consider splitting it into multiple pages
- If aspects of a page can stand alone, consider splitting them into multiple pages
- If you are working on a project, consider creating a folder for that project

✅ Correct

```plaintext
/meta/structure/bishops.md
/meta/structure/divisons.md
/meta/structure/hierarchy.md
/meta/structure/roles.md
```

❌ Incorrect

```plaintext
/meta/structure.md
/meta/roles-and-divisons.md
```
Comment on lines +85 to +90
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This example is not communicated well in the above text. The above text says "feel free to create files, but split them out if they're too complex." The "feel free to create files" part confuses the rule. I think this rule should be simplified to something like: "Keep each page focused to one topic; do not make a file too broad or cover more than one specific topic"


## README.md vs Other Files

It is generally recommended to use `<project-name>/README.md` when creating a
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
It is generally recommended to use `<project-name>/README.md` when creating a
Use `<project-name>/README.md` when creating a

new project in Evergreen vs. adding a `<project-name>.md` file. This is because
the README file is the first file that is displayed when you navigate to a
folder in GitHub and it is generally the first file that people will look at
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
folder in GitHub and it is generally the first file that people will look at
folder in GitHub and it is the first file that people will look at

when they are looking at a project.

You should create `<item>.md` files within a specific project folder for more
topics that are related to that project. A good example of this is the [Hack Night](/events/hack-night/README.md)
folder in the Evergreen repository.

✅ Correct

```plaintext
events/hack-night
├── README.md
├── attendance.md
├── badges.md
└── circles
├── README.md
├── data-science.md
└── systems.md
```

❌ Incorrect

```plaintext
events
└── hack-night.md

events/hack-night
├── hack-night.md
└── circles
└── circles.md
```
Comment on lines +104 to +127
Copy link
Member

@MatthewStanciu MatthewStanciu Feb 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These examples having slightly different file trees confuses the example. The point of this example is to illustrate using README.md over item.md, so the trees should be at parity in every way except for this.


## Attribution

You should never write an attribution in Evergreen. This philosophy is because
we use Git/Github to track changes to the documentation and it is easy to see
who wrote what and when and get a clearer picture of the document's history.
Adding an attribution to a page is redundant and adds complexity to what needs
to be updated in documentation, therefore it is preferred that you do not add
attributions to pages.
Comment on lines +131 to +136
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
You should never write an attribution in Evergreen. This philosophy is because
we use Git/Github to track changes to the documentation and it is easy to see
who wrote what and when and get a clearer picture of the document's history.
Adding an attribution to a page is redundant and adds complexity to what needs
to be updated in documentation, therefore it is preferred that you do not add
attributions to pages.
Do not write an attribution to an Evergreen document. We use Git/GitHub to track changes, including attribution. Adding your own attribution to a page is redundant and adds complexity.


✅ Correct

```markdown
# Hack Bishops
```

❌ Incorrect

```markdown
# Hack Bishops

Written by @rayhanadev
Last updated by @rayhanadev
```

## Images

When adding images to the Evergreen documentation, you should always add them
to a folder relative to the project. For example, if you are adding an image to
the [Hack Night](/events/hack-night/README.md) folder, you should add the image
to the `events/hack-night/images` folder, even if a subfolder is using the image.
Comment on lines +155 to +158
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The wording on this is confusing and creates lots of questions. What does "project" mean and what if you're not adding documentation for a project?

The subfolder part is confusing to me too. Where exactly should the image be added? What is considered a subfolder and not?

I think it's also worth adding more correct/incorrect examples to this rule's examples.


✅ Correct

```plaintext
![Hack Night](/events/hack-night/images/hack-night.png)
```

❌ Incorrect

```plaintext
![Hack Night](https://example.com/hack-night.png)
![Hack Night](/images/hack-night.png)
```