|
| 1 | +# HMPL Blog |
| 2 | + |
| 3 | +This is the official blog for the **HMPL** language, built using Jekyll. |
| 4 | + |
| 5 | +## Installation |
| 6 | + |
| 7 | +Make sure you have **Ruby** and **Bundler** installed. |
| 8 | + |
| 9 | +1. Clone the repository: |
| 10 | + ```bash |
| 11 | + git clone https://github.com/hmpl-language/hmpl.git |
| 12 | + cd hmpl/www/blog |
| 13 | + ``` |
| 14 | + |
| 15 | +2. Install dependencies: |
| 16 | + ```bash |
| 17 | + bundle install |
| 18 | + ``` |
| 19 | + |
| 20 | +## Available Commands |
| 21 | + |
| 22 | +| Command | Description | |
| 23 | +|-----------------------|------------------------------------------------| |
| 24 | +| `bundle exec jekyll serve` | Starts the local development server | |
| 25 | +| `bundle exec jekyll build` | Builds the static site for production | |
| 26 | + |
| 27 | +### Start Development Server |
| 28 | + |
| 29 | +```bash |
| 30 | +bundle exec jekyll serve |
| 31 | +``` |
| 32 | + |
| 33 | +The site will be available at: [http://localhost:4000](http://localhost:4000) |
| 34 | + |
| 35 | +### Build for Production |
| 36 | + |
| 37 | +```bash |
| 38 | +bundle exec jekyll build |
| 39 | +``` |
| 40 | + |
| 41 | +The static site will be generated in the `_site` directory. |
| 42 | + |
| 43 | +## Project Structure |
| 44 | + |
| 45 | +``` |
| 46 | +blog/ |
| 47 | +├── _posts/ # Blog posts in markdown format |
| 48 | +├── _layouts/ # HTML layouts for different page types |
| 49 | +├── _includes/ # Reusable HTML components |
| 50 | +├── assets/ # Static assets (JS, CSS, etc.) |
| 51 | +├── css/ # Stylesheets |
| 52 | +├── images/ # Image files |
| 53 | +├── _config.yml # Jekyll configuration |
| 54 | +├── Gemfile # Ruby dependencies |
| 55 | +└── README.md # This file |
| 56 | +``` |
| 57 | + |
| 58 | +## Writing Posts |
| 59 | + |
| 60 | +1. Create a new markdown file in the `_posts` directory |
| 61 | +2. Name the file using the format: `YYYY-MM-DD-title.md` |
| 62 | +3. Add the following front matter at the top of your post: |
| 63 | + ```yaml |
| 64 | + --- |
| 65 | + layout: post |
| 66 | + title: "Your Post Title" |
| 67 | + date: YYYY-MM-DD HH:MM:SS +0000 |
| 68 | + categories: [category1, category2] |
| 69 | + --- |
| 70 | + ``` |
| 71 | +4. Write your post content in markdown format |
| 72 | + |
| 73 | +## Contributing |
| 74 | + |
| 75 | +1. Fork the repository |
| 76 | +2. Create a new branch: `git checkout -b feature/your-feature-name` |
| 77 | +3. Make your changes |
| 78 | +4. Commit your changes: `git commit -m 'Add: New post'` |
| 79 | +5. Push to your fork: `git push origin feature/your-feature-name` |
| 80 | +6. Open a Pull Request |
0 commit comments