@@ -43,46 +43,63 @@ Visit [http://localhost:4000](http://localhost:4000)
4343| ` make images-webp ` | Convert to WebP (requires ` webp ` ) |
4444| ` make setup-hooks ` | Enable git pre-commit hooks |
4545
46- ## Workflows
47-
48- ### Adding a New Article
46+ ## Adding a New Page
4947
5048``` bash
51- # 1. Create the post file
52- touch _posts/ $( date +%Y-%m-%d ) - my-article-slug.md
49+ # 1. Create the layout
50+ touch _layouts/ my-page.html
5351
54- # 2. Add front matter and content (see template below)
52+ # 2. Create page files for each language
53+ mkdir -p ar/my-page en/my-page
54+ echo ' ---\nlayout: my-page\nlang: ar\npermalink: /ar/my-page/\n---' > ar/my-page/index.html
55+ echo ' ---\nlayout: my-page\nlang: en\npermalink: /en/my-page/\n---' > en/my-page/index.html
5556
56- # 3. Preview locally
57- make serve
57+ # 3. Add strings to _data/strings_ar.yml and _data/strings_en.yml
5858
59- # 4. Build and commit
59+ # 4. Preview and build
60+ make serve
6061make prod-build
61- git add .
62- git commit -m " Add new article: My Article Title"
63- git push
6462```
6563
66- ### Updating Assets (Logo, Fonts, Images)
67-
68- ``` bash
69- # 1. Replace source files in assets/img/ (keep originals)
70-
71- # 2. Regenerate optimized versions
72- make images # Creates resized PNG/JPG
73- make images-webp # Creates WebP versions
64+ ** Layout template:**
7465
75- # 3. If updating fonts
76- make assets
77-
78- # 4. Build and commit
79- make prod-build
80- git add .
81- git commit -m " Update assets"
82- git push
66+ ``` liquid
67+ ---
68+ layout: default
69+ ---
70+ {%- assign lang = page.lang | default: site.default_lang -%}
71+ {%- assign strings = site.data['strings_' | append: lang] -%}
72+
73+ {% include hero-banner.html
74+ image_base="my_page_hero"
75+ title=strings.my_page.title
76+ subtitle=strings.my_page.subtitle
77+ %}
78+
79+ <section class="section">
80+ <h2>{{ strings.my_page.heading }}</h2>
81+ <div class="info-card-grid">
82+ {% for item in strings.my_page.items %}
83+ <div class="info-card info-card--flat">
84+ <h3>{{ item.title }}</h3>
85+ <p>{{ item.description }}</p>
86+ </div>
87+ {% endfor %}
88+ </div>
89+ </section>
90+
91+ {% include copy-block.html
92+ id="template-text"
93+ heading=strings.my_page.template.heading
94+ content=strings.my_page.template.content
95+ button_text=strings.my_page.template.copy
96+ lang=lang
97+ %}
8398```
8499
85- ## Writing Articles
100+ 📖 ** Full reference:** See [ ` _design_docs/design-system.md ` ] ( _design_docs/design-system.md ) for all components, tokens, and patterns.
101+
102+ ## Adding an Article
86103
87104Create ` _posts/YYYY-MM-DD-slug.md ` :
88105
@@ -96,37 +113,41 @@ lang: ar # 'ar' or 'en'
96113category : community # See _data/categories.yml
97114author_type : team # 'team' or 'member'
98115excerpt : " Brief description"
99- reading_time : 5 # Minutes
116+ reading_time : 5
100117---
101118
102- Your content here (supports Markdown and HTML) ...
119+ Your content here...
103120```
104121
105122## Project Structure
106123
107124```
108- _config.yml # Jekyll config
109- _data/ # Translations & content (strings_ar.yml, strings_en.yml, categories.yml)
110- _docs/ # Design system documentation
111- _includes/ # Components (article-card, header, footer)
112- _layouts/ # Templates (home, article, archive, rules)
113- _posts/ # Articles (bilingual)
114- pages/ar/, pages/en/ # Language-specific pages
115- assets/css/ # Styles (SCSS → compiled CSS)
116- assets/fonts/ # Self-hosted fonts (Space Grotesk, IBM Plex Sans Arabic)
117- assets/img/ # Optimized images (WebP)
118- scripts/ # Utility scripts (download-assets.sh)
119- Makefile # Dev commands
125+ _config.yml # Jekyll config
126+ _data/ # Translations (strings_ar.yml, strings_en.yml)
127+ _design_docs/ # Design system documentation
128+ _includes/ # Reusable components
129+ ├── hero-banner.html # Hero with light/dark images
130+ ├── copy-block.html # Copy-to-clipboard template
131+ ├── article-card.html # Article card component
132+ ├── header.html # Site header
133+ └── footer.html # Site footer
134+ _layouts/ # Page templates
135+ _posts/ # Articles
136+ ar/, en/ # Language-specific pages
137+ assets/
138+ ├── css/styles.scss # Main stylesheet
139+ ├── fonts/ # Self-hosted fonts
140+ └── img/ # Optimized images
120141```
121142
122143## Fonts
123144
124- | Font | Language | Weights | Source |
125- | ------| ----------| ---------| -------- |
126- | Space Grotesk | English (LTR) | 400, 500, 700 | [ Google Fonts ] ( https://fonts.google.com/specimen/Space+Grotesk ) |
127- | IBM Plex Sans Arabic | Arabic (RTL) | 400, 500, 700 | [ Google Fonts ] ( https://fonts.google.com/specimen/IBM+Plex+Sans+Arabic ) |
145+ | Font | Language | Weights |
146+ | ------| ----------| ---------|
147+ | Space Grotesk | English | 400, 500, 700 |
148+ | IBM Plex Sans Arabic | Arabic | 400, 500, 700 |
128149
129- Fonts are self-hosted for performance . Run ` make assets ` to download.
150+ Fonts are self-hosted. Run ` make assets ` to download.
130151
131152## Deployment
132153
0 commit comments