Skip to content

Commit 807e556

Browse files
authored
Merge pull request #36 from ValienteTechnologies/staging
Staging
2 parents 5da27b0 + b5c7e9e commit 807e556

47 files changed

Lines changed: 884 additions & 337 deletions

Some content is hidden

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

.ruby-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.2.2

Gemfile

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,14 @@
1-
#after any changes to the Gemfile, execute bundle update!
1+
# After any changes to the Gemfile, run: bundle update
22
source "https://rubygems.org"
33

44
gem "jekyll-remote-theme"
5+
gem "jekyll-agency", "~> 1.2"
6+
gem "webrick", "~> 1.9"
57

68
group :jekyll_plugins do
7-
gem "jekyll-feed", "~> 0.6"
8-
gem "jekyll-sitemap"
9-
gem "jekyll-redirect-from"
10-
gem "jekyll-polyglot"
9+
gem "jekyll-feed", "~> 0.6"
10+
gem "jekyll-sitemap", "~> 1.4"
11+
gem "jekyll-redirect-from", "~> 0.16"
12+
gem "jekyll-polyglot", "~> 1.8"
1113
# gem "github-pages" # https://github.com/github/pages-gem
1214
end
13-
14-
# Uncomment the following line if developing on Windows:
15-
# Performance-booster for watching directories on Windows
16-
# gem "wdm", ">= 0.1.0" if Gem.win_platform?
17-
18-
gem "jekyll-agency"
19-
gem "webrick"

README.md

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
# ValienteTechnologies.github.io
2+
3+
Marketing site for [Valiente Technologies](https://valientetechnologies.com) — Turkey's first cybersecurity firm based in Antalya.
4+
5+
Built with **Jekyll** + [jekyll-agency](https://github.com/y7kim/agency-jekyll-theme) theme, deployed via **GitHub Pages**, served behind **Cloudflare**.
6+
7+
---
8+
9+
## Prerequisites
10+
11+
| Tool | Version | Purpose |
12+
|------|---------|---------|
13+
| Ruby | 3.2.2 (see `.ruby-version`) | Jekyll runtime |
14+
| Bundler | latest | Gem management |
15+
| Python 3 | any | WebP image conversion |
16+
| Node / npm | any | JS minification |
17+
| terser | `npm install -g terser` | Minify `assets/js/src/*.js` |
18+
| Pillow | `pip install pillow` | Convert PNG/JPG → WebP on commit |
19+
20+
---
21+
22+
## Setup
23+
24+
```bash
25+
# 1. Clone
26+
git clone https://github.com/ValienteTechnologies/ValienteTechnologies.github.io
27+
cd ValienteTechnologies.github.io
28+
29+
# 2. Ruby deps
30+
bundle install
31+
32+
# 3. Python deps (for pre-commit WebP hook)
33+
pip install pillow
34+
35+
# 4. JS minifier
36+
npm install -g terser
37+
38+
# 5. Install git hooks
39+
cp scripts/pre-commit .git/hooks/pre-commit
40+
chmod +x .git/hooks/pre-commit
41+
```
42+
43+
---
44+
45+
## Running locally
46+
47+
```bash
48+
bundle exec jekyll serve --livereload
49+
# → http://localhost:4000
50+
```
51+
52+
---
53+
54+
## Project structure
55+
56+
```
57+
_data/ # All site content (YAML). Edit here, not in templates.
58+
i18n.yml # UI strings (breadcrumbs, title suffixes)
59+
header.yml # Hero section text
60+
services.yml # Services section
61+
testimonials.yml
62+
footer.yml
63+
navigation.yml
64+
style.yml # Highlight color, fonts_urls
65+
...
66+
67+
_includes/
68+
layout/ # nav.html, nav-header.html, head.html, footer.html
69+
sections/ # services.html, testimonials.html, contact_form.html, ...
70+
71+
_layouts/
72+
default.html # Base layout (scripts, footer)
73+
home.html # Home page (nav+header, sections, page-specific JS)
74+
subpage.html # Inner pages
75+
error.html # 404
76+
77+
_pages/ # Page definitions (mostly include composition)
78+
_sass/
79+
base/ # _variables.scss, _mixins.scss, _page.scss
80+
components/ # _navbar.scss, _buttons.scss, _utilities.scss, ...
81+
layout/ # Per-section SCSS (_masthead, _services, _footer, ...)
82+
83+
assets/
84+
css/ # agency.css (Jekyll-compiled), bootstrap.min.css, all.min.css
85+
js/ # Minified JS (do not edit directly)
86+
js/src/ # JS source files (edit here, pre-commit auto-minifies)
87+
img/ # WebP images (PNG/JPG source → pre-commit auto-converts)
88+
89+
scripts/
90+
pre-commit # Git hook: WebP conversion + JS minification
91+
minify-js.sh # Manual: ./scripts/minify-js.sh [filename]
92+
to_webp.py # Image converter used by pre-commit hook
93+
```
94+
95+
---
96+
97+
## i18n (bilingual TR/EN)
98+
99+
The site uses [jekyll-polyglot](https://github.com/untra/polyglot). All content lives in `_data/*.yml` with this pattern:
100+
101+
```yaml
102+
tr: &DEFAULT
103+
title: "Türkçe başlık"
104+
105+
tr-TR:
106+
<<: *DEFAULT # inherits TR
107+
108+
en:
109+
title: "English title"
110+
```
111+
112+
UI strings (breadcrumbs, title suffixes, etc.) live in `_data/i18n.yml`.
113+
114+
---
115+
116+
## JS workflow
117+
118+
Source files live in `assets/js/src/`. **Never edit the minified files in `assets/js/` directly.**
119+
120+
```bash
121+
# Edit source
122+
vim assets/js/src/mesh-network.js
123+
124+
# Minify one file
125+
./scripts/minify-js.sh mesh-network.js
126+
127+
# Or minify all
128+
./scripts/minify-js.sh
129+
```
130+
131+
The pre-commit hook does this automatically when you stage `assets/js/src/*.js`.
132+
133+
---
134+
135+
## Images
136+
137+
Stage a PNG/JPG and the pre-commit hook converts it to WebP automatically. Use `<picture>` elements in templates for WebP + PNG/JPG fallback.
138+
139+
---
140+
141+
## Deployment
142+
143+
Push to `main` → GitHub Pages builds automatically. Cloudflare proxies the result.
144+
145+
**Cloudflare notes:**
146+
- Email obfuscation: disable in Scrape Shield → Cloudflare Email Obfuscation to remove `email-decode.min.js`
147+
- Cache TTLs for `/assets/*`: set via Cloudflare Cache Rules
148+
- `robots.txt` is managed by Cloudflare AI scraping protection (Content-Signal directive is harmless)
149+
- Analytics: GA4 tag `G-FF9YHPMVJL`

_config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,6 @@ exclude:
5353

5454
markdown: kramdown
5555

56+
strict_front_matter: true
57+
5658
formspree_form_path: "f/xwpbqjer"

_data/i18n.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
tr: &DEFAULT
2+
home: "Ana Sayfa"
3+
site_title_suffix: "Sızma Testi ve Siber Güvenlik"
4+
language_select: "Dil seçin"
5+
6+
tr-TR:
7+
<<: *DEFAULT
8+
9+
en:
10+
home: "Home"
11+
site_title_suffix: "Penetration Testing & Cybersecurity"
12+
language_select: "Select language"

_includes/layout/footer.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!-- Footer -->
22
{% assign footer = site.data.footer[site.active_lang] | default: site.data.footer.tr %}
3-
<footer class="footer" id="footer" style="background-color: white">
3+
<footer class="footer" id="footer">
44
<div class="container">
55
<div class="row align-items-center">
66
<div class="col-md-4">

_includes/layout/head.html

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,33 @@
44
{%- assign _page_description = page.description | default: site.description -%}
55
{%- if _data_section.title -%}{%- assign _page_title = _data_section.title -%}{%- endif -%}
66
{%- if _data_section.description -%}{%- assign _page_description = _data_section.description -%}{%- endif -%}
7+
{%- assign _i18n = site.data.i18n[site.active_lang] | default: site.data.i18n.tr -%}
78
{%- if page.url == "/" or page.url == "/index.html" -%}
8-
{%- assign _page_full_title = site.title | append: " | Sızma Testi ve Siber Güvenlik" -%}
9+
{%- assign _page_full_title = site.title | append: " | " | append: _i18n.site_title_suffix -%}
910
{%- elsif _page_title -%}
1011
{%- assign _page_full_title = _page_title | append: " | " | append: site.title -%}
1112
{%- else -%}
1213
{%- assign _page_full_title = site.title -%}
1314
{%- endif -%}
1415

15-
<!-- Critical CSS: single stylesheet (bootstrap bundled in) -->
16-
<link rel="preload" href="/assets/css/agency.css" as="style">
16+
<!-- CSS: base (bootstrap + global) + page-specific sheet -->
17+
{%- if page.layout == "home" -%}
18+
{%- assign _page_css = "valiente-home.css" -%}
19+
{%- elsif page.body_class == "corporate-page" -%}
20+
{%- assign _page_css = "valiente-corporate.css" -%}
21+
{%- elsif page.body_class == "contact-page" -%}
22+
{%- assign _page_css = "valiente-contact.css" -%}
23+
{%- elsif page.body_class == "legal-layout" -%}
24+
{%- assign _page_css = "valiente-legal.css" -%}
25+
{%- elsif page.layout == "error" -%}
26+
{%- assign _page_css = "valiente-error.css" -%}
27+
{%- else -%}
28+
{%- assign _page_css = "" -%}
29+
{%- endif -%}
30+
<link rel="preload" href="/assets/css/valiente-base.css" as="style">
31+
{%- if _page_css != "" -%}
32+
<link rel="preload" href="/assets/css/{{ _page_css }}" as="style">
33+
{%- endif -%}
1734

1835
{% if site.analytics.google %}
1936
<!-- Google Analytics: deferred until after load to avoid forced reflow on LCP -->
@@ -42,7 +59,7 @@
4259
<link rel="icon" type="image/x-icon" href="/assets/img/valiente/favicon.ico">
4360
<link rel="sitemap" type="application/xml" href="/sitemap.xml">
4461
<link rel="apple-touch-icon" href="/assets/img/valiente/valiente1024.webp">
45-
<meta name="theme-color" content="#e22388">
62+
<meta name="theme-color" content="{{ site.data.style.highlight | default: '#e22388' }}">
4663

4764
<!-- JSON-LD: LocalBusiness structured data -->
4865
<script type="application/ld+json">
@@ -79,7 +96,7 @@
7996
"itemListElement": [{
8097
"@type": "ListItem",
8198
"position": 1,
82-
"name": "{% if site.active_lang == 'tr' %}Ana Sayfa{% else %}Home{% endif %}",
99+
"name": "{{ _i18n.home }}",
83100
"item": "{{ site.url }}"
84101
},{
85102
"@type": "ListItem",
@@ -143,9 +160,9 @@
143160
<link rel="preconnect" href="https://fonts.googleapis.com">
144161
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
145162

146-
<!-- FontAwesome: non-render-blocking -->
147-
<link rel="preload" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
148-
<noscript><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css"></noscript>
163+
<!-- FontAwesome: local subsetted build (font-display:swap, ~3KB) -->
164+
<link rel="preload" href="/assets/css/all.min.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
165+
<noscript><link rel="stylesheet" href="/assets/css/all.min.css"></noscript>
149166
<!-- Custom fonts: high-priority non-render-blocking with display=swap -->
150167
{% if site.data.style.fonts_urls %}
151168
{% for font_url in site.data.style.fonts_urls %}
@@ -157,8 +174,10 @@
157174
<noscript><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&family=Droid+Serif:ital,wght@0,400;0,700;1,400;1,700&family=Roboto+Slab:wght@100;300;400;700&display=swap"></noscript>
158175
{% endif %}
159176
<!-- Custom styles for this theme -->
160-
<!--<link href="/assets/css/agency.min.css" rel="stylesheet">-->
161-
<link href="/assets/css/agency.css" rel="stylesheet" />
177+
<link href="/assets/css/valiente-base.css" rel="stylesheet" />
178+
{%- if _page_css != "" -%}
179+
<link href="/assets/css/{{ _page_css }}" rel="stylesheet" />
180+
{%- endif -%}
162181

163182
<!-- Page container change top padding when nav shrinks -->
164183
{% if page.body_class == "page-layout" %}

_includes/layout/nav-header.html

Lines changed: 3 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1,101 +1,20 @@
1-
{% assign header = site.data.header[site.active_lang] | default: site.data.header.tr %}
2-
3-
<!-- Navigation -->
4-
<nav class="navbar navbar-expand-lg navbar-dark fixed-top" id="mainNav">
5-
<div class="container">
6-
<a class="navbar-brand js-scroll-trigger" href="#page-top">
7-
{%- if site.logo -%}
8-
<img width="{{ site.logo.width | default: 208 }}" height="{{ site.logo.height | default: 52 }}" src="{{ site.logo.path }}" alt="{{ site.title }}"/>
9-
{%- else -%}
10-
{{ site.title }}
11-
{%- endif -%}
12-
</a>
13-
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
14-
Menu
15-
<i class="fas fa-bars"></i>
16-
</button>
17-
<div class="collapse navbar-collapse" id="navbarResponsive">
18-
<ul class="navbar-nav text-uppercase ml-auto">
19-
{% assign nav = site.data.navigation[site.active_lang] | default: site.data.navigation.tr %}
20-
{% for link in nav.nav %}
21-
{% if link.children %}
22-
<li class="nav-item dropdown">
23-
{%- if link.url -%}
24-
{%- if link.static or site.active_lang == site.default_lang -%}
25-
{%- assign parent_url = link.url -%}
26-
{%- else -%}
27-
{%- assign parent_url = '/' | append: site.active_lang | append: link.url -%}
28-
{%- endif -%}
29-
<a class="nav-link dropdown-toggle" href="{{ parent_url }}" id="navDrop{{ forloop.index }}" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
30-
{{ link.title }}
31-
</a>
32-
{%- else -%}
33-
<a class="nav-link dropdown-toggle" href="#" id="navDrop{{ forloop.index }}" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
34-
{{ link.title }}
35-
</a>
36-
{%- endif -%}
37-
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navDrop{{ forloop.index }}">
38-
{%- for child in link.children -%}
39-
{%- if child.url -%}
40-
{%- if child.static or site.active_lang == site.default_lang -%}
41-
{%- assign child_url = child.url -%}
42-
{%- else -%}
43-
{%- assign child_url = '/' | append: site.active_lang | append: child.url -%}
44-
{%- endif -%}
45-
<a class="dropdown-item" href="{{ child_url }}">{{ child.title }}</a>
46-
{%- elsif child.section -%}
47-
<a class="dropdown-item" href="{{ site.baseurl | append: '/#' | append: child.section }}">{{ child.title }}</a>
48-
{%- endif -%}
49-
{%- endfor -%}
50-
</div>
51-
</li>
52-
{% else %}
53-
<li class="nav-item">
54-
{%- if link.url -%}
55-
{%- if link.static or site.active_lang == site.default_lang -%}
56-
{%- assign nav_url = link.url -%}
57-
{%- else -%}
58-
{%- assign nav_url = '/' | append: site.active_lang | append: link.url -%}
59-
{%- endif -%}
60-
<a class="nav-link js-scroll-trigger" href="{{ nav_url }}">{{ link.title }}</a>
61-
{%- elsif link.section -%}
62-
<a class="nav-link js-scroll-trigger" href="#{{ link.section }}">{{ link.title }}</a>
63-
{%- else -%}
64-
<a class="nav-link js-scroll-trigger" href="#">{{ link.title }}</a>
65-
{%- endif -%}
66-
</li>
67-
{% endif %}
68-
{% endfor %}
69-
<!-- Language switcher -->
70-
<li class="nav-item dropdown">
71-
<a class="nav-link dropdown-toggle" href="#" id="languageDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
72-
<i class="fas fa-globe"></i>
73-
</a>
74-
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="languageDropdown">
75-
<a class="dropdown-item" {% static_href %}href="{{ page.url }}"{% endstatic_href %}>TR</a>
76-
<a class="dropdown-item" {% static_href %}href="/en{{ page.url }}"{% endstatic_href %}>EN</a>
77-
</div>
78-
</li>
79-
</ul>
80-
</div>
81-
</div>
82-
</nav>
83-
<!-- End Navigation -->
1+
{% include layout/nav.html %}
842

853
<!-- Header -->
864
<header class="masthead">
875
<div class="masthead-bg" aria-hidden="true"></div>
886
<canvas id="meshNetwork" class="mesh-network-canvas"></canvas>
897
<div class="container">
908
<div class="intro-text">
9+
{%- assign header = site.data.header[site.active_lang] | default: site.data.header.tr -%}
9110
{%- if header.title -%}
9211
<div class="intro-lead-in">{{ header.title }}</div>
9312
{%- endif -%}
9413
{%- if header.text -%}
9514
<h1 class="intro-heading text-uppercase">{{ header.text }}</h1>
9615
{%- endif -%}
9716
{%- if header.button -%}
98-
<a class="btn btn-primary btn-xl text-uppercase js-scroll-trigger" href="{{ header.buttonlink }}">{{ header.button }}</a>
17+
<a class="btn btn-primary btn-xl text-uppercase" href="{{ header.buttonlink }}">{{ header.button }}</a>
9918
{%- endif -%}
10019
</div>
10120
</div>

0 commit comments

Comments
 (0)