Skip to content

Commit 39a8b42

Browse files
authored
Merge pull request #226 from aminishere/docs/132-move-article-to-blog
issue-132-added-article-to-blog-md-file
0 parents  commit 39a8b42

File tree

55 files changed

+5030
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+5030
-0
lines changed

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
_site
2+
.sass-cache
3+
.jekyll-cache
4+
.jekyll-metadata
5+
vendor
6+
Gemfile.lock
7+
.DS_Store

404.html

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
permalink: /404.html
3+
layout: base
4+
title: 404 Page not found
5+
---
6+
7+
<style type="text/css" media="screen">
8+
.container {
9+
margin: 10px auto;
10+
max-width: 600px;
11+
text-align: center;
12+
}
13+
h1 {
14+
margin: 30px 0;
15+
font-size: 4em;
16+
line-height: 1;
17+
letter-spacing: -1px;
18+
}
19+
</style>
20+
21+
<div class="container">
22+
<h1>404</h1>
23+
24+
<p><strong>Page not found :(</strong></p>
25+
<p>The requested page could not be found.</p>
26+
</div>

CNAME

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blog.hmpl-lang.dev

Gemfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
source "https://rubygems.org"
2+
gem "jekyll", "~> 4.3.3"
3+
gem "minima", "~> 2.5.2"
4+
gem "csv"
5+
gem "logger"
6+
gem "base64"
7+
gem "erb"
8+
group :jekyll_plugins do
9+
gem "jekyll-feed", "~> 0.12"
10+
gem "jekyll-seo-tag"
11+
gem "jekyll-sitemap"
12+
gem "jekyll-paginate"
13+
end
14+
platforms :mingw, :x64_mingw, :mswin, :jruby do
15+
gem "tzinfo", ">= 1", "< 3"
16+
gem "tzinfo-data"
17+
end
18+
19+
# Windows Directory Monitor - commented out due to Ruby 3.4 compatibility issues
20+
# gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]
21+
22+
gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby]

README.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
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

_config.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
title: HMPL Blog
2+
author:
3+
name: "HMPL Team"
4+
5+
description: >
6+
HMPL Blog - HMPL.js is a lightweight server-oriented template language for JavaScript.
7+
Fetch HTML, render it safely, and keep apps dynamic, modern, and small.
8+
tagline: "Server-oriented customizable templating for JavaScript"
9+
url: "https://blog.hmpl-lang.dev"
10+
lang: en_US
11+
12+
# SEO Configuration
13+
seo:
14+
type: BlogPosting
15+
name: HMPL Blog
16+
headline: HMPL Blog - JavaScript Templating Tutorials and Guides
17+
description: >
18+
Comprehensive tutorials and guides for HMPL, a server-oriented customizable
19+
templating solution for JavaScript applications.
20+
keywords: >
21+
HMPL, JavaScript, templating, server-side rendering, SSR, web development,
22+
tutorials, guides, frontend, backend, template engine, JavaScript framework
23+
24+
# Social and Branding
25+
logo: "/favicon.ico"
26+
27+
# Site Configuration
28+
timezone: UTC
29+
permalink: /:year/:month/:day/:title/
30+
excerpt_separator: <!--more-->
31+
32+
# Theme Configuration
33+
# theme: minima # Disabled due to Sass compatibility issues
34+
35+
# Sass Configuration
36+
sass:
37+
style: compressed
38+
sass_dir: _sass
39+
sourcemap: never
40+
41+
plugins:
42+
- jekyll-feed
43+
- jekyll-seo-tag
44+
- jekyll-sitemap
45+
- jekyll-paginate
46+
47+
# Pagination Configuration
48+
paginate: 5
49+
paginate_path: "/page:num/"
50+
51+
# Feed Configuration
52+
feed:
53+
posts_limit: 20
54+
excerpt_only: true
55+
56+
# SEO Defaults
57+
defaults:
58+
- scope:
59+
path: ""
60+
type: "posts"
61+
values:
62+
layout: "post"
63+
author: "HMPL Team"
64+
image: "/favicon.ico"
65+
seo:
66+
type: "BlogPosting"
67+
68+
# Social Links
69+
social_links:
70+
- { platform: github, user_url: "https://github.com/hmpl-language/hmpl" }
71+
- { platform: x, user_url: "https://x.com/hmpljs" }
72+
- { platform: discord, user_url: "https://discord.gg/KFunMep36n" }
73+
- { platform: rss, user_url: "/feed.xml" }

_includes/breadcrumbs.html

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<nav id="breadcrumbs" aria-label="Breadcrumb">
2+
{% unless page.url == "/" %}
3+
<script type="application/ld+json">
4+
{
5+
"@context": "https://schema.org",
6+
"@type": "BreadcrumbList",
7+
"itemListElement": [
8+
{
9+
"@type": "ListItem",
10+
"position": 1,
11+
"name": "Home",
12+
"item": "{{ site.url }}/"
13+
},
14+
{
15+
"@type": "ListItem",
16+
"position": 2,
17+
"name": "{{ page.title }}",
18+
"item": "{{ page.url | absolute_url }}"
19+
}
20+
]
21+
}
22+
</script>
23+
24+
<ol class="breadcrumb-list" itemscope itemtype="https://schema.org/BreadcrumbList">
25+
<li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
26+
<a itemprop="item" href="{{ site.url }}/">
27+
<span itemprop="name">Home</span>
28+
</a>
29+
<meta itemprop="position" content="1" />
30+
</li>
31+
<li class="breadcrumb-separator">/</li>
32+
<li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
33+
<span itemprop="name">{{ page.title }}</span>
34+
<meta itemprop="item" content="{{ page.url | absolute_url }}" />
35+
<meta itemprop="position" content="2" />
36+
</li>
37+
</ol>
38+
{% endunless %}
39+
</nav>

_includes/footer.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<footer class="site-footer h-card">
2+
<data class="u-url" href="{{ "/" | relative_url }}"></data>
3+
4+
<div class="wrapper footer-wrapper">
5+
6+
<div class="footer-col-wrapper">
7+
<div class="footer-col">
8+
<p>{{ site.description | escape }}</p>
9+
</div>
10+
</div>
11+
12+
<div class="social-links">
13+
{%- include social.html -%}
14+
</div>
15+
16+
</div>
17+
18+
</footer>

_includes/header.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<header class="site-header">
2+
<div class="wrapper">
3+
{%- assign default_paths = site.pages | map: "path" -%}
4+
{%- assign page_paths = site.header_pages | default: default_paths -%}
5+
{%- assign titles_size = site.pages | map: 'title' | join: '' | size -%}
6+
<a class="site-title" rel="author" href="{{ "/" | relative_url }}">{{ site.title | escape }}</a>
7+
8+
<nav class="site-nav">
9+
<div class="search-container">
10+
<input type="text" id="search-box" placeholder="Search...">
11+
<ul id="results"></ul>
12+
</div>
13+
<a class="page-link" href="https://hmpl-lang.dev">hmpl-lang.dev</a>
14+
</nav>
15+
</div>
16+
</header>

0 commit comments

Comments
 (0)