Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
45 changes: 39 additions & 6 deletions .github/workflows/hugo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Deploy Hugo site to Pages

on:
push:
branches: ["master", "design"]
branches: ["master", "multilingual"]
workflow_dispatch:

permissions:
Expand All @@ -19,7 +19,7 @@ defaults:
shell: bash

jobs:
build:
build-en:
runs-on: ubuntu-latest
steps:
- name: Setup Hugo
Expand All @@ -32,27 +32,60 @@ jobs:
- name: Setup Pages
id: pages
uses: actions/configure-pages@v5
- name: Build with Hugo
- name: Build EN site
env:
HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache
HUGO_ENVIRONMENT: production
TZ: America/New_York
run: |
hugo --minify --baseURL "${{ steps.pages.outputs.base_url }}/"
hugo --minify \
--config hugo.toml,hugo-en.toml \
--baseURL "${{ steps.pages.outputs.base_url }}/" \
--destination public
# Preserve /rss URL (without .xml extension)
cp public/rss.xml public/rss
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./public

deploy:
deploy-en:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
needs: build-en
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

build-and-deploy-ru:
runs-on: ubuntu-latest
steps:
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: '0.160.1'
extended: true
- name: Checkout
uses: actions/checkout@v6
- name: Build RU site
env:
HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache
HUGO_ENVIRONMENT: production
TZ: America/New_York
run: |
hugo --minify \
--config hugo.toml,hugo-ru.toml \
--destination public-ru
# Preserve /rss URL (without .xml extension)
cp public-ru/rss.xml public-ru/rss
- name: Deploy to ru.selenide.org
uses: peaceiris/actions-gh-pages@v4
with:
personal_token: ${{ secrets.RU_SELENIDE_ORG_DEPLOY_TOKEN }}
external_repository: selenide/selenide-ru
publish_branch: gh-pages
publish_dir: ./public-ru
cname: ru.selenide.org
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Hugo build output
public/*
!public/javadoc
public-en/
public-ru/
resources/_gen/

# OS files
Expand Down
108 changes: 49 additions & 59 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@

## Project overview

Official website for **Selenide** (selenide.org) — a Java UI test automation framework built on Selenium WebDriver. This is a Hugo static site hosted on GitHub Pages from the `selenide/selenide.github.io` repository.
Official website for **Selenide** — a Java UI test automation framework built on Selenium WebDriver.
This single multilingual Hugo project powers both:
- `selenide.org` (English) — hosted on `selenide/selenide.github.io`
- `ru.selenide.org` (Russian) — hosted on `selenide/selenide-ru` (gh-pages branch)

## Tech stack

- **Hugo** static site generator
- **Hugo** static site generator (multilingual)
- **Goldmark** for Markdown rendering (with `unsafe: true` for raw HTML in content)
- **Go templates** for layouts
- **jQuery 3.6.0** + jQuery UI 1.13.1 (from CDN)
Expand All @@ -15,59 +18,57 @@ Official website for **Selenide** (selenide.org) — a Java UI test automation f
## Directory structure

```
hugo.toml Main Hugo config
hugo.toml Main Hugo config (both languages)
hugo-en.toml Override for EN-only production build
hugo-ru.toml Override for RU-only production build
i18n/
en.toml English UI strings
ru.toml Russian UI strings
content/
_index.md Homepage (content in layouts/index.html)
blog/ Blog posts (185+ files), _index.md is the blog list
documentation/ _index.md + sub-pages (page-objects, screenshots, reports, clouds, selenide-vs-selenium)
quick-start.md, faq.md, users.md, quotes.md, contacts.md, javadoc.md, thanks.md
en/ English content (homepage, blog, docs, etc.)
ru/ Russian content
layouts/
_default/ baseof.html, single.html, list.html, users.html
blog/ single.html (post), list.html (blog index with year/month grouping)
partials/ donate.html, main-menu.html, documentation-menu.html, quicklinks.html, title.html, analytics.html
blog/ single.html (post), list.html (blog index)
partials/ donate.html, main-menu.html, quicklinks.html, title.html, analytics.html
shortcodes/ selenide-version.html, selenium-changelog.html, documentation-menu.html
index.html Homepage template
index.html Homepage template (uses i18n)
404.html Custom 404
assets/
themes/ingmar/css/ CSS files (processed via Hugo Pipes for fingerprinting)
static/
images/ Logos, screenshots — year-based subdirs (images/2024/, etc.)
assets/themes/ingmar/js/ JavaScript files
test-page/ HTML test pages for Selenide demos
images/ Logos, screenshots — year-based subdirs
assets/themes/ingmar/js/ JavaScript
CNAME, favicon.ico, robots.txt
data/
users.json Companies using Selenide
user_tags.json Tags for filtering users page
user_tags.json Tags for users page
```

## Key config (hugo.toml)

- `params.selenideVersion = "7.16.0"` — used via `{{</* selenide-version */>}}` shortcode in content
- `params.seleniumChangelog` — Selenium changelog URL, used via `{{</* selenium-changelog */>}}` shortcode
- Blog permalinks: `/:year/:month/:day/:title/`
- Pages use `url:` in front matter for explicit URLs (e.g., `/quick-start.html`)
- `buildFuture = true` — builds future-dated posts
- `markup.goldmark.renderer.unsafe = true` — allows raw HTML in Markdown

## Local development

```bash
# Install Hugo (macOS)
brew install hugo
./start.sh # serves both languages: EN at /, RU at /ru/
```

## Production builds (each language at root)

```bash
# EN site (selenide.org)
hugo --config hugo.toml,hugo-en.toml --destination public-en

# Serve locally
./start.sh
# or manually:
hugo server --buildFuture --port 4001
# RU site (ru.selenide.org)
hugo --config hugo.toml,hugo-ru.toml --destination public-ru
```

Output goes to `public/` directory.
Each override toml sets `disableLanguages` and `defaultContentLanguage` so the chosen language sits at the site root.

## Creating content

### New blog post

Create `content/blog/YYYY-MM-DD-slug-name.md`:
Create under `content/en/blog/` or `content/ru/blog/` as `YYYY-MM-DD-slug.md`:

```yaml
---
Expand All @@ -78,53 +79,42 @@ category:
headerText: "Short tagline"
tags: []
---

Content here...
```

### New page

Create in `content/` with `url:` for the desired path:
Create under `content/en/` or `content/ru/` with `url:` for the path:

```yaml
---
title: "Page Title"
header: "Display Header"
cssClass: my-class
url: /page-name.html
headerText: "Subtitle"
---
```

## Shortcodes

- `{{</* selenide-version */>}}` — outputs current Selenide version from `hugo.toml`
- `{{</* selenium-changelog */>}}` — outputs Selenium changelog URL
- `{{</* documentation-menu */>}}` — renders docs sidebar menu
- `{{</* selenide-version */>}}` — current Selenide version from `hugo.toml`
- `{{</* selenium-changelog */>}}` — Selenium changelog URL
- `{{</* documentation-menu */>}}` — renders docs sidebar menu (localized)

## Conventions
## Internationalization

- Blog posts are mostly Selenide release announcements, following the pattern "Released Selenide X.Y.Z"
- Posts use anchor-linked table of contents at the top for sections
- Images go in `static/images/` — use year-based subdirectories (e.g., `images/2026/`)
- Company logos for the users page go in `static/images/`
- Pages that use `layout: users` get the custom users template with data-driven content
- When releasing a new Selenide version: update `params.selenideVersion` in `hugo.toml`, create a release blog post
- UI strings live in `i18n/en.toml` and `i18n/ru.toml`, accessed via `{{ T "key" }}`
- Page content lives in language-specific `content/en/` and `content/ru/` trees
- Layouts branch on `.Site.Language.Lang` only when the structure itself differs (e.g. docs menu has extra links in RU)

## Layout hierarchy
## Conventions

```
baseof.html (HTML shell, head, header, footer)
└── block "main" filled by:
├── index.html (homepage)
├── blog/single.html (blog posts)
├── blog/list.html (blog index)
├── _default/single.html (regular pages)
├── _default/users.html (users page)
└── 404.html
```
- Blog posts are mostly release announcements: "Released Selenide X.Y.Z" / "Вышла Selenide X.Y.Z"
- Release posts should be added in BOTH `content/en/blog/` and `content/ru/blog/`
- Images go in `static/images/` — use year-based subdirectories
- When releasing a new Selenide version: update `params.selenideVersion` in `hugo.toml`, create release blog posts in both languages

## Deployment

The site deploys to GitHub Pages. The `static/CNAME` file sets the custom domain `selenide.org`.
A GitHub Actions workflow runs `hugo` and deploys the `public/` directory.
GitHub Actions (`.github/workflows/hugo.yml`):
1. **EN job** — builds EN site and deploys via `actions/deploy-pages` to this repo's Pages (selenide.org)
2. **RU job** — builds RU site and pushes via `peaceiris/actions-gh-pages` to `selenide/selenide-ru` repo's `gh-pages` branch (ru.selenide.org)

The RU cross-repo push requires a `RU_SELENIDE_ORG_DEPLOY_TOKEN` secret (PAT with push access to `selenide/selenide-ru`).
File renamed without changes.
2 changes: 1 addition & 1 deletion content/archive.md → content/en/archive.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Selenide blog"
url: /archive.html
url: archive.html
---

<script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ See [commit](https://github.com/selenide/selenide/commit/9b4723d090442c).

# Fixed Selenide own tests on non-EN machines

Selenide user [@vrossellotravelc]((https://github.com/vrossellotravelc)) tried to build selenide project on a
Selenide user [@vrossellotravelc](https://github.com/vrossellotravelc) tried to build selenide project on a
machine which has a default language other than English (was it French or Spanish?)

We found that a couple of Selenide own tests contained hard-coded formatting of `Duration`, which can differ
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion content/contacts.md → content/en/contacts.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Feedback"
header: "Contacts"
url: /contacts.html
url: contacts.html
---

<script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Documentation"
header: "Documentation"
cssClass: docs
url: /documentation.html
url: documentation.html
headerText: >
<h4>Poor software <span class="bold">doesn't have</span> documentation.
Brilliant software <span class="bold">doesn't need</span> documentation.</h4>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
url: /documentation/clouds.html
url: documentation/clouds.html

title :
header : Clouds
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
url: /documentation/page-objects.html
url: documentation/page-objects.html

title :
header : Page Objects
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
url: /documentation/reports.html
url: documentation/reports.html

title :
header : Reports
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
url: /documentation/screenshots.html
url: documentation/screenshots.html

title :
header : Screenshots
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
url: /documentation/selenide-vs-selenium.html
url: documentation/selenide-vs-selenium.html

title :
header :
Expand Down
2 changes: 1 addition & 1 deletion content/faq.md → content/en/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "FAQ"
header: "Frequently Asked Questions"
cssClass: faq
url: /faq.html
url: faq.html
headerText: "Frequently Asked Questions"
---

Expand Down
2 changes: 1 addition & 1 deletion content/javadoc.md → content/en/javadoc.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "javadoc"
header: "javadoc"
url: /javadoc.html
url: javadoc.html
layout: javadoc
---

Expand Down
2 changes: 1 addition & 1 deletion content/quick-start.md → content/en/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Quick Start"
header: "Quick Start"
cssClass: howto
url: /quick-start.html
url: quick-start.html
headerText: >
<h4>It's extremely easy to start using Selenide. Definitely not a rocket science.</h4>
Just add Selenide dependency to your project, and you are done.<br/>
Expand Down
2 changes: 1 addition & 1 deletion content/quotes.md → content/en/quotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "What users say"
header: "What users say"
cssClass: quotes
url: /quotes.html
url: quotes.html
headerText: ""
---

Expand Down
2 changes: 1 addition & 1 deletion content/thanks.md → content/en/thanks.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "We say THANKS to"
header: "Thanks"
cssClass: testimonials
url: /thanks.html
url: thanks.html
headerText: ""
---

Expand Down
2 changes: 1 addition & 1 deletion content/users.md → content/en/users.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Selenide users"
header: "Who uses Selenide"
cssClass: testimonials
url: /users.html
url: users.html
layout: users
headerText: ""
---
4 changes: 4 additions & 0 deletions content/ru/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: "Selenide: лаконичные и стабильные UI тесты на Java"
show_news: true
---
Loading
Loading