|
1 | | -# weeklydevchat.github.io |
2 | | -A static website hosted by GitHub Pages. |
| 1 | +# Weekly Dev Chat Website |
3 | 2 |
|
4 | | -We're using GitHub's Actions, so any push to the **_main_** branch triggers a build of the HTML. Those are put into the _**gh_pages**_ branch |
| 3 | +A static website for the Weekly Dev Chat community - a weekly virtual developer chat that meets every Tuesday at 12pm Mountain Time. |
5 | 4 |
|
6 | | -Results are published to [weeklydevchat.github.io](https://weeklydevchat.github.io/) |
| 5 | +**Live Site**: [weeklydevchat.com](https://weeklydevchat.com) |
7 | 6 |
|
8 | 7 |  |
9 | 8 | [](https://squidfunk.github.io/mkdocs-material/) |
10 | 9 |
|
| 10 | +## About |
11 | 11 |
|
12 | | -# Authors Guide |
| 12 | +This is a static site built with [MkDocs Material](https://squidfunk.github.io/mkdocs-material/) and hosted on GitHub Pages. The site features: |
| 13 | +- Weekly blog posts for Tuesday chat topics |
| 14 | +- Host information and community guidelines |
| 15 | +- Sponsor information |
| 16 | +- Automatic deployment via GitHub Actions |
13 | 17 |
|
14 | | -Requirements: |
15 | | - - **Python** (any recent should be fine. Recommended to use a virtual environment.) |
16 | | - - **Material for MkDocs** |
| 18 | +## Technology Stack |
17 | 19 |
|
18 | | - `pip install mkdocs-material` |
| 20 | +- **Static Site Generator**: [MkDocs](https://www.mkdocs.org) |
| 21 | +- **Theme**: [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/) |
| 22 | +- **Language**: Python 3.x |
| 23 | +- **Hosting**: GitHub Pages |
| 24 | +- **CI/CD**: GitHub Actions |
| 25 | +- **Container Support**: Docker Compose |
19 | 26 |
|
20 | | -[Material for MKDocs](https://squidfunk.github.io/mkdocs-material/) is a theme and plugin package for [MkDocs](https://www.mkdocs.org). Visit both sites for complete information. |
| 27 | +## Quick Start |
21 | 28 |
|
| 29 | +### Prerequisites |
22 | 30 |
|
23 | | -## Commands |
| 31 | +- Python 3.x (recommended: use a virtual environment) |
| 32 | +- OR Docker and Docker Compose |
24 | 33 |
|
25 | | -* `mkdocs serve` - Start the live-reloading docs server. Use this to test changes locally before pushing. |
26 | | -* `mkdocs -h` - Print help message and exit. |
| 34 | +### Local Development (Native) |
27 | 35 |
|
28 | | -## Project layout |
| 36 | +1. Install dependencies: |
| 37 | + ```bash |
| 38 | + pip install mkdocs-material |
| 39 | + ``` |
29 | 40 |
|
30 | | - mkdocs.yml # The configuration file. |
31 | | - docs/ |
32 | | - index.md # The documentation homepage. |
33 | | - posts/ # blog posts, organised anyway you like |
34 | | - ... # Other markdown pages, images and other files. |
| 41 | +2. Start the development server: |
| 42 | + ```bash |
| 43 | + mkdocs serve |
| 44 | + ``` |
35 | 45 |
|
36 | | -## Docker Guide |
| 46 | +3. Open your browser to [http://127.0.0.1:8000](http://127.0.0.1:8000) |
37 | 47 |
|
38 | | -If you want to develop using Docker run the following command: |
| 48 | +### Local Development (Docker) |
39 | 49 |
|
40 | | -```sh |
41 | | -docker compose up app |
| 50 | +1. Start the development server: |
| 51 | + ```bash |
| 52 | + docker compose up app |
| 53 | + ``` |
| 54 | + |
| 55 | +2. Open your browser to [http://localhost:8000](http://localhost:8000) |
| 56 | + |
| 57 | +The site will automatically reload when you make changes to the content. |
| 58 | + |
| 59 | +## Creating Blog Posts |
| 60 | + |
| 61 | +### Using Helper Scripts |
| 62 | + |
| 63 | +We provide scripts to automatically create properly formatted blog posts for the next Tuesday: |
| 64 | + |
| 65 | +**Bash (Linux/macOS)**: |
| 66 | +```bash |
| 67 | +./create_post.sh |
| 68 | +``` |
| 69 | + |
| 70 | +**PowerShell (Windows)**: |
| 71 | +```powershell |
| 72 | +.\create_post.ps1 |
| 73 | +``` |
| 74 | + |
| 75 | +These scripts will: |
| 76 | +- Calculate the date of the next Tuesday (or use today if it's Tuesday) |
| 77 | +- Create the directory structure: `docs/posts/YYYY/MM/DD/` |
| 78 | +- Generate an `index.md` file with proper frontmatter |
| 79 | + |
| 80 | +### Manual Blog Post Creation |
| 81 | + |
| 82 | +1. Create a directory following the date pattern: `docs/posts/YYYY/MM/DD/` |
| 83 | + |
| 84 | +2. Create an `index.md` file with the following frontmatter: |
| 85 | + ```yaml |
| 86 | + --- |
| 87 | + title: "Your Blog Post Title" |
| 88 | + date: YYYY-MM-DD |
| 89 | + authors: |
| 90 | + - chris |
| 91 | + --- |
| 92 | + ``` |
| 93 | + |
| 94 | +3. Add your content following this template: |
| 95 | + ```markdown |
| 96 | + TOPIC_INTRODUCTION_HERE |
| 97 | + |
| 98 | + Everyone and anyone are welcome to [join](https://weeklydevchat.com/join/) as long as you are kind, supportive, and respectful of others. Zoom link will be posted at 12pm MDT. |
| 99 | + |
| 100 | +  |
| 101 | + ``` |
| 102 | + |
| 103 | +4. Add any images to the same directory as the post |
| 104 | + |
| 105 | +## Project Structure |
| 106 | + |
| 107 | +``` |
| 108 | +. |
| 109 | +├── mkdocs.yml # Main configuration file |
| 110 | +├── requirements.txt # Python dependencies |
| 111 | +├── docker-compose.yml # Docker development environment |
| 112 | +├── create_post.sh # Bash script to create blog posts |
| 113 | +├── create_post.ps1 # PowerShell script to create blog posts |
| 114 | +├── .github/ |
| 115 | +│ └── workflows/ |
| 116 | +│ └── ci.yml # GitHub Actions deployment |
| 117 | +└── docs/ # All site content |
| 118 | + ├── .authors.yml # Author metadata |
| 119 | + ├── index.md # Homepage |
| 120 | + ├── join.md # How to join |
| 121 | + ├── hosts/ # Current hosts |
| 122 | + ├── past-hosts/ # Past hosts |
| 123 | + ├── sponsors/ # Sponsors |
| 124 | + ├── posts/ # Blog posts (YYYY/MM/DD/) |
| 125 | + ├── assets/ # Images, logos |
| 126 | + └── stylesheets/ |
| 127 | + └── extra.css # Custom CSS |
| 128 | +``` |
| 129 | + |
| 130 | +## Common Commands |
| 131 | + |
| 132 | +```bash |
| 133 | +# Development |
| 134 | +mkdocs serve # Start development server |
| 135 | +mkdocs serve -a 0.0.0.0:8000 # Start server accessible on network |
| 136 | + |
| 137 | +# Build |
| 138 | +mkdocs build # Build static site to site/ directory |
| 139 | +mkdocs build --clean # Clean build |
| 140 | + |
| 141 | +# Help |
| 142 | +mkdocs -h # Show help |
| 143 | + |
| 144 | +# Docker |
| 145 | +docker compose up app # Start development server |
| 146 | +docker compose down # Stop containers |
| 147 | +``` |
| 148 | + |
| 149 | +## Deployment |
| 150 | + |
| 151 | +### Automatic Deployment |
| 152 | + |
| 153 | +Pushes to the `main` branch automatically trigger deployment via GitHub Actions: |
| 154 | + |
| 155 | +1. The workflow builds the site using `mkdocs gh-deploy` |
| 156 | +2. The static HTML is pushed to the `gh-pages` branch |
| 157 | +3. GitHub Pages serves the site from `gh-pages` |
| 158 | + |
| 159 | +See [.github/workflows/ci.yml](.github/workflows/ci.yml) for details. |
| 160 | + |
| 161 | +### Manual Deployment |
| 162 | + |
| 163 | +While not typically needed, you can manually deploy: |
| 164 | +```bash |
| 165 | +mkdocs gh-deploy --force |
42 | 166 | ``` |
| 167 | +## Resources |
| 168 | + |
| 169 | +- [MkDocs Documentation](https://www.mkdocs.org) |
| 170 | +- [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/) |
| 171 | +- [Material Blog Plugin](https://squidfunk.github.io/mkdocs-material/plugins/blog/) |
| 172 | +- [GitHub Pages Documentation](https://docs.github.com/en/pages) |
| 173 | + |
| 174 | +## Community |
43 | 175 |
|
44 | | -This will bring the application up on port 8000 (e.g. http://localhost:8000). It should hot-reload any changes you make during development. |
| 176 | +Join our virtual chat every Tuesday at 12pm Mountain Time! Visit [weeklydevchat.com/join](https://weeklydevchat.com/join) for details. We also occasionally do in real-life events. |
0 commit comments