Skip to content

Commit

Permalink
Merge pull request #1 from goatbytes/develop
Browse files Browse the repository at this point in the history
Update site
  • Loading branch information
jaredrummler committed Mar 28, 2024
2 parents 0f2215e + ef664e3 commit c254cd3
Show file tree
Hide file tree
Showing 43 changed files with 4,485 additions and 5,548 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Deploy MkDocs Site
name: Build and Deploy GoatStyles

on:
push:
Expand Down
427 changes: 427 additions & 0 deletions LICENSE.txt

Large diffs are not rendered by default.

140 changes: 140 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
# GoatStyles by GoatBytes.IO`() {`

## Introduction

:wave: Welcome to GoatStyles, a repository for professional code style guides, where we strive to
uphold the highest standards of software engineering.

In the realm of code style guides, we understand that opinions vary, and decisions often balance
between necessity and subjectivity. However, amidst this diversity of perspectives, one principle
remains paramount: __consistency__. By adhering to a consistent style, developers can enhance
readability, maintainability, and collaboration within their codebases.

## Styles

Click on the programming language logo to view the style guide for that language.

| ▁▁▁▁▁▁▁ | ▁▁▁▁▁▁▁ | ▁▁▁▁▁▁▁ | ▁▁▁▁▁▁▁ | ▁▁▁▁▁▁▁ | ▁▁▁▁▁▁▁ |
|:-----------------------------------------------:|:------------------------------------------------------------------:|:----------------------------------------------:|:--------------------------------------:|:------------------------------------------:|:--------------------------------------------------------------:|
| [![C++][CPP_Logo]][CPP]<br>**C**++ | [![C#][CSharp_Logo]][CSharp]<br>**C**# | [![Dart][Dart_Logo]][Dart]<br>**Dart** | [![Go][Go_Logo]][Go]<br>**Go** | [![Java][Java_Logo]][Java]<br>**Java** | [![JavaScript][JavaScript_Logo]][JavaScript]<br>**JavaScript** |
| [![Kotlin][Kotlin_Logo]][Kotlin]<br>**Kotlin** | [![Objective-C][Objective-C_Logo]][Objective-C]<br>**Objective-C** | [![Python][Python_Logo]][Python]<br>**Python** | [![Rust][Rust_Logo]][Rust]<br>**Rust** | [![Swift][Swift_Logo]][Swift]<br>**Swift** | [![TypeScript][TypeScript_Logo]][TypeScript]<br>**TypeScript** |

## Project Overview

### Programming Languages

GoatStyles provides comprehensive style guides for C++, C#, Dart, Go, Java, JavaScript, Kotlin,
Objective-C, Python, Rust, Shell, Swift, and TypeScript. Our aim is to support a wide range of
development environments, catering to the diverse needs of the software development community.

### Technology Stack and Tools

- **MKDocs** for a fast and user-friendly static site generation.
- **GitHub Actions** and **GitHub Pages** for automated deployments and hosting.
- **JavaScript**, **CSS**, and **Markdown**

### Repository Structure

The GoatStyles style guides are meticulously documented in Markdown and located within the
[`docs/styles`](docs/styles) directory of the repository.

## How to Contribute

We encourage contributions to GoatStyles! Before making a contribution, please review our
[contributing](docs/contributing.md) guidelines. All contributors must complete our
[Individual Contributor License Agreement (CLA)][CLA] before their code can be accepted.

Forking the repository and proposing changes through pull requests are great ways to contribute.
Though not all suggestions may be accepted, your contributions are highly appreciated and crucial
to the project's growth and diversity.

## Build Instructions

To build and serve the GoatStyles site locally, follow these instructions:

### Prerequisites

- **Python 3.x**: Ensure you have Python 3.x installed on your machine. You can check your
Python version by running `python --version` in your terminal.
- **Git**: Make sure Git is installed for cloning the repository.

### Steps

1. **Clone the Repository**
- Use Git to clone the GoatStyles repository to your local machine:
```shell
git clone https://github.com/goatbytes/GoatStyles.git
cd GoatStyles
```

2. **Set Up Python Environment (Optional)**
- It's recommended to create a virtual environment to keep dependencies required by the project
separate from your global Python environment:
```shell
python -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
```

3. **Install Dependencies**
- Install the required Python packages including MkDocs and its extensions used by the project:
```shell
pip install mkdocs mkdocs-material pymdown-extensions mkdocs-minify-plugin neoteroi-mkdocs mkdocs-git-revision-date-localized-plugin
```

4. **Build the MkDocs Site**
- Build the static site files with MkDocs:
```shell
mkdocs build
```
- This command generates the site static files in the `site` directory.

5. **Serve the Site Locally**
- To preview the site on your local machine, run:
```shell
mkdocs serve
```
- This command starts a local web server that serves the GoatStyles site. You can view the site
by navigating to `http:https://127.0.0.1:8000` in your web browser.

6. **Making Changes**
- You can now make changes to the Markdown files. The site will automatically rebuild and
refresh the browser page when you save changes.

## License

[GoatStyles][GoatStylesRepo] © 2024 by [GoatBytes.IO][GoatBytes.IO] is licensed under [Attribution-ShareAlike 4.0 International][LicenseUrl]

# `};`

[GoatBytes.IO]: https://goatbytes.io
[GoatStylesRepo]: https://github.com/goatbytes/GoatStyles
[LicenseUrl]: https://creativecommons.org/licenses/by-sa/4.0/
[CLA]: https://forms.gle/J5iqyH4hrHQQDfUCA

<!-- Logo URLs -->
[CPP_Logo]: ./docs/assets/img/cplusplus.svg
[CSharp_Logo]: ./docs/assets/img/csharp.svg
[Dart_Logo]: ./docs/assets/img/dart.svg
[Go_Logo]: ./docs/assets/img/go.svg
[Java_Logo]: ./docs/assets/img/java.svg
[JavaScript_Logo]: ./docs/assets/img/javascript.svg
[Kotlin_Logo]: ./docs/assets/img/kotlin.svg
[Objective-C_Logo]: ./docs/assets/img/objective-c.svg
[Python_Logo]: ./docs/assets/img/python.svg
[Rust_Logo]: ./docs/assets/img/rust.svg
[Swift_Logo]: ./docs/assets/img/swift.svg
[TypeScript_Logo]: ./docs/assets/img/typescript.svg

<!-- Page URLs -->
[CPP]: https://goatbytes.github.io/GoatStyles/styles/cpp/
[CSharp]: https://goatbytes.github.io/GoatStyles/styles/csharp/
[Dart]: https://goatbytes.github.io/GoatStyles/styles/dart/
[Go]: https://goatbytes.github.io/GoatStyles/styles/go/
[Java]: https://goatbytes.github.io/GoatStyles/styles/java/
[JavaScript]: https://goatbytes.github.io/GoatStyles/styles/javascript/
[Kotlin]: https://goatbytes.github.io/GoatStyles/styles/kotlin/
[Objective-C]: https://goatbytes.github.io/GoatStyles/styles/objc/
[Python]: https://goatbytes.github.io/GoatStyles/styles/python/
[Rust]: https://goatbytes.github.io/GoatStyles/styles/rust/
[Swift]: https://goatbytes.github.io/GoatStyles/styles/swift/
[TypeScript]: https://goatbytes.github.io/GoatStyles/styles/typescript/
Binary file added docs/.DS_Store
Binary file not shown.
Binary file added docs/assets/.DS_Store
Binary file not shown.
32 changes: 16 additions & 16 deletions docs/assets/cards/languages.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,61 +2,61 @@
{
"title": "C++",
"url": "styles/cpp",
"image": "https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/cplusplus/cplusplus-original.svg"
"image": "assets/img/cplusplus.svg"
},
{
"title": "C#",
"url": "styles/csharp",
"image": "https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/csharp/csharp-original.svg"
"image": "assets/img/csharp.svg"
},
{
"title": "Dart",
"url": "styles/dart",
"image": "https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/dart/dart-original.svg"
"image": "assets/img/dart.svg"
},
{
"title": "Go",
"url": "styles/go",
"image": "https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/go/go-original-wordmark.svg"
"image": "assets/img/go.svg"
},
{
"title": "Java",
"url": "styles/java",
"image": "https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/java/java-original.svg"
"image": "assets/img/java.svg"
},
{
"title": "JavaScript",
"url": "styles/javascript",
"image": "https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/javascript/javascript-original.svg"
"image": "assets/img/javascript.svg"
},
{
"title": "Kotlin",
"url": "styles/kotlin",
"image": "https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/kotlin/kotlin-original.svg"
"image": "assets/img/kotlin.svg"
},
{
"title": "Objective-C",
"url": "styles/objc",
"image": "https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/objectivec/objectivec-plain.svg"
"image": "assets/img/objective-c.svg"
},
{
"title": "Python",
"url": "styles/python",
"image": "https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/python/python-original.svg"
"image": "assets/img/python.svg"
},
{
"title": "Rust",
"url": "styles/rust",
"image": "https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/rust/rust-line.svg"
},
{
"title": "Shell",
"url": "styles/shell",
"image": "https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/swift/swift-original.svg"
"image": "assets/img/rust.svg"
},
{
"title": "Swift",
"url": "styles/swift",
"image": "https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/typescript/typescript-original.svg"
"image": "assets/img/swift.svg"
},
{
"title": "TypeScript",
"url": "styles/typescript",
"image": "assets/img/typescript.svg"
}
]
71 changes: 37 additions & 34 deletions docs/assets/css/app.css
Original file line number Diff line number Diff line change
@@ -1,67 +1,70 @@
:root {
--md-primary-fg-color: #007BFF;
--md-primary-fg-color--light: #288EFA;
--md-primary-fg-color--dark: #005DC1;
--md-primary-fg-color: #007BFF;
--md-primary-fg-color--light: #288EFA;
--md-primary-fg-color--dark: #005DC1;
}

/* region: Code Block Styles */

/* Code Block: good-code */
.highlight.good-code code, .highlight.good-code code *,
.highlight.good-code .linenos, .highlight.good-code .linenos * {
background-color: #f3fbf9 !important;
background-color: #f3fbf9 !important;
}

/* Title: good-code */
.highlight.good-code th, .highlight.good-code th * {
background-color: #2c7a7b !important;
color: #f0f3f4;
.highlight.good-code th, .highlight.good-code th *,
.highlight.good-code .filename, .highlight.good-code .filename * {
background-color: #2c7a7b !important;
color: #f0f3f4;
}

/* Code Block: bad-code */
.highlight.bad-code code, .highlight.bad-code code *,
.highlight.bad-code .linenos, .highlight.bad-code .linenos * {
background-color: #fcf3f6 !important;
background-color: #fcf3f6 !important;
}

/* Title: bad-code */
.highlight.bad-code th, .highlight.bad-code th * {
background-color: #a8323e !important;
color: #f9f9f9;
.highlight.bad-code th, .highlight.bad-code th *,
.highlight.bad-code .filename, .highlight.bad-code .filename * {
background-color: #a8323e !important;
color: #f9f9f9;
}


[data-md-color-scheme="slate"] {

/* Code Block: good-code */
/* Code Block: good-code */

.highlight.good-code code, .highlight.good-code code *,
.highlight.good-code .linenos, .highlight.good-code .linenos * {
background-color: #1a2a2a !important;
color: #e0e0e0;
}
.highlight.good-code code, .highlight.good-code code *,
.highlight.good-code .linenos, .highlight.good-code .linenos * {
background-color: #1a2a2a !important;
color: #e0e0e0;
}

/* Title: good-code */
/* Title: good-code */

.highlight.good-code th, .highlight.good-code th * {
background-color: #20635c !important;
color: #e0e0e0;
}
.highlight.good-code th, .highlight.good-code th *,
.highlight.good-code .filename, .highlight.good-code .filename * {
background-color: #20635c !important;
color: #e0e0e0;
}

/* Code Block: bad-code */
/* Code Block: bad-code */

.highlight.bad-code code, .highlight.bad-code code *,
.highlight.bad-code .linenos, .highlight.bad-code .linenos * {
background-color: #2a1a1f !important;
color: #d1d1d1;
}
.highlight.bad-code code, .highlight.bad-code code *,
.highlight.bad-code .linenos, .highlight.bad-code .linenos * {
background-color: #2a1a1f !important;
color: #d1d1d1;
}

/* Title: bad-code */
/* Title: bad-code */

.highlight.bad-code th, .highlight.bad-code th * {
background-color: #78202a !important;
color: #d1d1d1;
}
.highlight.bad-code th, .highlight.bad-code th *,
.highlight.bad-code .filename, .highlight.bad-code .filename * {
background-color: #78202a !important;
color: #d1d1d1;
}
}

/* endregion */
28 changes: 28 additions & 0 deletions docs/assets/files/kotlin-jetbrains.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<code_scheme name="GoatStyles — Kotlin" version="173">
<option name="RIGHT_MARGIN" value="100" />
<JavaCodeStyleSettings>
<option name="CLASS_NAMES_IN_JAVADOC" value="3" />
<option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="666" />
<option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="666" />
</JavaCodeStyleSettings>
<JetCodeStyleSettings>
<option name="PACKAGES_TO_USE_STAR_IMPORTS">
<value>va.util" alias="false" withSubpackages="false" />
<package name="kotlinx.html" alias="false" withSubpackages="true" />
<package name="kotlinx.android.synthetic" alias="false" withSubpackages="true" />
<package name="io.ktor" alias="false" withSubpackages="true" />
</value>
</option>
<option name="NAME_COUNT_TO_USE_STAR_IMPORT" value="2147483647" />
<option name="NAME_COUNT_TO_USE_STAR_IMPORT_FOR_MEMBERS" value="2147483647" />
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
</JetCodeStyleSettings>
<codeStyleSettings language="kotlin">
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
<indentOptions>
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="4" />
<option name="TAB_SIZE" value="2" />
</indentOptions>
</codeStyleSettings>
</code_scheme>
Loading

0 comments on commit c254cd3

Please sign in to comment.