Skip to content

Commit

Permalink
Deployment Setup for MkDocs Documentation Site (#87)
Browse files Browse the repository at this point in the history
Initial setup and deployment of mkdocs site.
  • Loading branch information
eli64s authored Jan 27, 2024
1 parent 3beb6da commit 701c456
Show file tree
Hide file tree
Showing 26 changed files with 1,118 additions and 352 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Test Coverage
name: Codecov Coverage

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v2
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Deploy MkDocs

on: [push, pull_request]

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Install Poetry
run: |
python -m pip install --upgrade pip
pip install poetry
- name: Install dependencies
run: |
poetry install
- name: Build the MkDocs site
run: poetry run mkdocs build

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site
5 changes: 0 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,3 @@ examples/markdown/readme-edgecase.md
readmeai/markdown/data/badges.json
readmeai/settings/prompts.toml
templates/

# docs
docs/css/
docs/js/
docs/overrides/
18 changes: 8 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing Guidelines

Thanks for your interest in contributing to *readme-ai*! Please review these guidelines to ensure a smooth process.
Thanks for your interest in contributing to readme-ai. Please review these guidelines to ensure a smooth process.

## Make Valuable Contributions

Expand All @@ -14,10 +14,12 @@ Strive to make **useful**, **creative**, and **high quality** contributions.

## Follow The Code of Conduct

Review and adhere to our [CODE_OF_CONDUCT](./CODE_OF_CONDUCT.md).
Review and adhere to our [CODE_OF_CONDUCT](https://github.com/eli64s/readme-ai/blob/main/CODE_OF_CONDUCT.md)

## Ways to Contribute

There are many ways to contribute to readme-ai. Here are a few ideas to get you started:

- Simply start a discussion by asking a question or making a suggestion.
- Look for opportunities to make processes more efficient to improve the user experience.
- Find ways to make code more readable and easier to understand.
Expand All @@ -26,12 +28,8 @@ Review and adhere to our [CODE_OF_CONDUCT](./CODE_OF_CONDUCT.md).
- Brainstorm new CLI options and features that would be useful to users.
- i.e. `--language` option to specify the language of the README.
- What is the best way to implement README file generation in any language selected?
- Work on improving the [readme-ai.streamlit](https://readme-ai.streamlit.app/) web app.
- Improve the UI/UX of the web app.
- Catch any bugs or errors when using the web app.
- Any new features that would be useful to users.

These are just a few examples, there are many more ways yu can contribute to *readme-ai*!
These are just a few examples, there are many more ways to contribute to readme-ai!

## Submitting Changes

Expand All @@ -50,12 +48,12 @@ These are just a few examples, there are many more ways yu can contribute to *re

## Attribution

Contributors to our project will be acknowledged in the project's README.md file.
Contributors to our project will be acknowledged in the project's README.md file and AUTHORS.md file.

## License

By contributing to our project, you agree to license your contributions under the project's open source license. The project's license can be found in the [LICENSE](./LICENSE.md) file.
By contributing to our project, you agree to license your contributions under the project's open source license. The project's license can be found in the [LICENSE](https://github.com/eli64s/readme-ai/blob/main/LICENSE)

Thank you for your interest in contributing to *readme-ai*!
Thank you for contributing to our project!

---
52 changes: 52 additions & 0 deletions docs/cli.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
## Options

| Flag (Long/Short) | Default | Description | Type | Status |
|-------------------|---------|-------------|------|--------|
| `--align`/`-a` | `center` | Set header text alignment (`left`, `center`). | String | Optional |
| `--api-key`/`-k` | `OPENAI_API_KEY` env var | Your GPT model API key. | String | Optional |
| `--badges`/`-b` | `default` | Badge style options for your README file. | String | Optional |
| `--emojis`/`-e` | `False` | Add emojis to section header tiles. | Boolean | Optional |
| `--image`/`-i` | `default` | Project logo image displayed in README header. | String | Optional |
| `--max-tokens` | `3899` | Max number of tokens that can be generated. | Integer | Optional |
| `--model`/`-m` | `gpt-3.5-turbo` | Select GPT model for content generation. | String | Optional |
| `--offline` | `False` | Generate a README without an API key. | Boolean | Optional |
| `--output`/`-o` | `readme-ai.md` | README output file name. | Path/String | Optional |
| `--repository`/`-r` | None | Repository URL or local path. | URL/String | Required |
| `--temperature`/`-t` | `0.8` | LLM API creativity level. | Float | Optional |
| `--template` | None | Choose README template. | String | <em>WIP</em> |
| `--language`/`-l` | `English (en)` | Language for content. | String | <em>WIP</em> |

<sub><em>WIP</em> = work in progress, or feature currently under development.<br>For additional command-line information, run <code>readmeai --help</code> in your terminal for more details about each option.</sub><br>

## Badges

Select your preferred badge icon style to display in your output file using the `--badges` flag. The default badge style displays basic metadata about your repository using shields.io badges. If you select another option, the `default` badges will be automatically included.

| **Options** | **Preview** |
|------------------|----------|
| `default` | ![license](https://img.shields.io/github/license/eli64s/readme-ai?flat&color=0080ff) ![last-commit](https://img.shields.io/github/last-commit/eli64s/readme-ai?flat&color=0080ff) ![languages](https://img.shields.io/github/languages/top/eli64s/readme-ai?flat&color=0080ff) ![language-count](https://img.shields.io/github/languages/count/eli64s/readme-ai?flat&color=0080ff) |
| `flat` | ![flat](https://img.shields.io/badge/Python-3776AB.svg?&style=flat&logo=Python&logoColor=white) |
| `flat-square` | ![flat-square](https://img.shields.io/badge/Python-3776AB.svg?&style=flat-square&logo=Python&logoColor=white) |
| `for-the-badge` | ![for-the-badge](https://img.shields.io/badge/Python-3776AB.svg?&style=for-the-badge&logo=Python&logoColor=white) |
| `plastic` | ![plastic](https://img.shields.io/badge/Python-3776AB.svg?&style=plastic&logo=Python&logoColor=white) |
| `skills` | [![Skills](https://skillicons.dev/icons?i=py)](https://skillicons.dev) |
| `skills-light` | [![Skills-Light](https://skillicons.dev/icons?i=py&theme=light)](https://skillicons.dev) |
| `social` | ![social](https://img.shields.io/badge/Python-3776AB.svg?&style=social&logo=Python&logoColor=white) |

## Project Logo

Select an image to display in your README header section using the `--image` flag.

| **Options** | **Preview** |
|---------------|----------------|
| **default** | <img src="https://raw.githubusercontent.com/PKief/vscode-material-icon-theme/ec559a9f6bfd399b82bb44393651661b08aaf7ba/icons/folder-markdown-open.svg" width="100"> |
| **black** | <img src="https://img.icons8.com/external-tal-revivo-regular-tal-revivo/96/external-readme-is-a-easy-to-build-a-developer-hub-that-adapts-to-the-user-logo-regular-tal-revivo.png" width="100"> |
| **gradient** | <img src="https://img.icons8.com/?size=512&id=55494&format=png" width="100"> |
| **grey** | <img src="https://img.icons8.com/external-tal-revivo-filled-tal-revivo/96/external-markdown-a-lightweight-markup-language-with-plain-text-formatting-syntax-logo-filled-tal-revivo.png" width="100"> |
| **purple** | <img src="https://img.icons8.com/external-tal-revivo-duo-tal-revivo/100/external-markdown-a-lightweight-markup-language-with-plain-text-formatting-syntax-logo-duo-tal-revivo.png" width="100"> |
| **yellow** | <img src="https://img.icons8.com/pulsar-color/96/markdown.png" width="100"> |
| **cloud** | <img src="https://cdn-icons-png.flaticon.com/512/6295/6295417.png" width="100"> |

To provide your own image, use the CLI option `--image custom` and you will be prompted to enter a URL to your image.

---
12 changes: 5 additions & 7 deletions docs/concepts.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# readme-ai Core Concepts
# Core Concepts

readme-ai is a tool for auto-generating README files for code repositories using AI. Here are some of its key concepts:
Readme-ai is a tool for auto-generating README files for code repositories using AI. Here are some of its key concepts:

## Repository Analysis
## Codebase Analysis

- Traverses the repository directory tree to build a code structure overview
- Extracts metadata like dependencies and languages used
- Analyzes characteristics to inform content generation

## AI-Powered Content Creation
## Generative AI

- Uses GPT language models via the OpenAI API
- Structured prompts injected with repository details
Expand Down Expand Up @@ -49,9 +49,7 @@ By leveraging these concepts and more, readme-ai aims to offer a flexible platfo

---

Here is a markdown document discussing some of the core concepts of the readme-ai project:

# README-AI Core Concepts
# Core Concepts

README-AI is a tool for auto-generating detailed README files for software projects using AI. It utilizes several core concepts and components to analyze codebases and produce high-quality documentation.

Expand Down
12 changes: 7 additions & 5 deletions docs/contribute.md → docs/contributing.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing Guidelines

Thanks for your interest in contributing to *README-AI*! Please review these guidelines to ensure a smooth process.
Thanks for your interest in contributing to readme-ai. Please review these guidelines to ensure a smooth process.

## Make Valuable Contributions

Expand All @@ -14,11 +14,11 @@ Strive to make **useful**, **creative**, and **high quality** contributions.

## Follow The Code of Conduct

Review and adhere to our [CODE_OF_CONDUCT](./CODE_OF_CONDUCT.md).
Review and adhere to our [CODE_OF_CONDUCT](https://github.com/eli64s/readme-ai/blob/main/CODE_OF_CONDUCT.md)

## Ways to Contribute

There are many ways to contribute to *README-AI*! You can:
There are many ways to contribute to readme-ai. Here are a few ideas to get you started:

- Simply start a discussion by asking a question or making a suggestion.
- Look for opportunities to make processes more efficient to improve the user experience.
Expand All @@ -29,7 +29,7 @@ There are many ways to contribute to *README-AI*! You can:
- i.e. `--language` option to specify the language of the README.
- What is the best way to implement README file generation in any language selected?

These are just a few exmaples, there are many more ways to contribute to *README-AI*.
These are just a few examples, there are many more ways to contribute to readme-ai!

## Submitting Changes

Expand All @@ -52,6 +52,8 @@ Contributors to our project will be acknowledged in the project's README.md file

## License

By contributing to our project, you agree to license your contributions under the project's open source license. The project's license can be found in the [LICENSE](./LICENSE.md) file.
By contributing to our project, you agree to license your contributions under the project's open source license. The project's license can be found in the [LICENSE](https://github.com/eli64s/readme-ai/blob/main/LICENSE)

Thank you for contributing to our project!

---
107 changes: 107 additions & 0 deletions docs/css/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
:root {
--bg-color: #f7f7f7; /* A neutral, light grey that's easy on the eyes */
--text-color: #4a4a4a; /* A softer black for body text for reduced eye strain */
--code-bg: #fafafa; /* A very subtle grey to distinguish code blocks from the background */
--code-text-color: #2b2b2b; /* A dark grey that's less harsh than pure black for code */
--code-border-color: #e0e0e0; /* Light grey border for a refined edge on code blocks */
--code-shadow: rgba(0, 0, 0, 0.05); /* A very faint shadow for a sense of depth */
--gradient-start: #6e6e6e; /* A subdued gradient start for a professional look */
--gradient-end: #a7a7a7; /* A gentle gradient end that complements the start */
--border-radius: 6px; /* Softly rounded corners for a modern look */
--transition-speed: 0.2s; /* Quick transition for interactive elements */
}

body {
background-color: var(--bg-color);
color: var(--text-color);
font-family: 'Roboto', sans-serif;
font-size: 16px;
line-height: 1.75; /* Increased line height for better readability */
}

a {
color: var(--text-color);
text-decoration: none;
transition: color var(--transition-speed) ease-in-out;
}

a:hover, a:focus {
text-decoration: underline;
color: var(--gradient-end); /* Subtle hover effect */
}

/* Styles for inline code */
code {
padding: 2px 6px;
border-radius: var(--border-radius);
background-color: var(--code-bg);
font-family: 'Consolas', 'Menlo', monospace; /* Professional monospaced fonts */
font-size: 0.95em;
color: var(--code-text-color);
box-shadow: inset 0 0 0 1px var(--code-border-color); /* Inset border for a clean line */
}

/* Styles for code blocks */
pre {
background-color: var(--code-bg);
border-left: 4px solid var(--gradient-start); /* A colored border for visual interest */
box-shadow: 0 2px 4px var(--code-shadow);
border-radius: var(--border-radius);
padding: 20px; /* Sufficient padding for whitespace and focus */
overflow-x: auto;
font-size: 0.9em; /* Slightly smaller font for code blocks */
}

pre code {
padding: 0;
background: none;
box-shadow: none;
}

h1, h2, h3 {
color: var(--text-color); /* Remove gradient text for a more professional tone */
margin-top: 1.2em;
margin-bottom: 0.5em;
}

.md-header {
background-color: var(--bg-color); /* Match the header with the body for cohesion */
color: var(--text-color);
box-shadow: 0 2px 4px var(--code-shadow); /* A light shadow for subtle separation */
}

.md-nav__link:hover {
color: var(--gradient-end); /* Cohesive with link hover effects */
background-color: transparent; /* Remove gradient background on hover */
}

@media (max-width: 768px) {
body {
font-size: 15px; /* Slightly larger font for mobile readability */
}
}

/* Styling for form elements */
button,
input,
select,
textarea {
font-family: inherit;
font-size: inherit;
line-height: inherit;
border-radius: var(--border-radius);
border: 1px solid var(--code-border-color);
transition: background-color var(--transition-speed) ease-in-out, border-color var(--transition-speed) ease-in-out;
padding: 0.5em; /* Uniform padding for form elements */
background-color: white; /* A clean background for focus */
}

button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
button:focus,
input[type="submit"]:focus,
input[type="button"]:focus {
background-color: var(--gradient-start); /* A subtle interaction cue */
color: white;
}
Loading

0 comments on commit 701c456

Please sign in to comment.