Skip to content

Commit 093f7a5

Browse files
Copilotbytestream
andauthored
Add Jekyll layouts and update configuration
Agent-Logs-Url: https://github.com/jquery-validation/validation-content/sessions/56c60609-42d5-4470-b53a-8ba170e29227 Co-authored-by: bytestream <1788397+bytestream@users.noreply.github.com>
1 parent 29f85e4 commit 093f7a5

5 files changed

Lines changed: 153 additions & 47 deletions

File tree

.github/workflows/deploy-pages.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,6 @@ jobs:
2929
- name: Setup Pages
3030
uses: actions/configure-pages@v5
3131

32-
- name: Setup Ruby
33-
uses: ruby/setup-ruby@v1
34-
with:
35-
ruby-version: '3.1'
36-
bundler-cache: true
37-
3832
- name: Build with Jekyll
3933
uses: actions/jekyll-build-pages@v1
4034
with:

Gemfile

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,7 @@
11
source "https://rubygems.org"
22

3-
gem "jekyll", "~> 4.3"
4-
gem "minima", "~> 2.5"
3+
gem "jekyll", "~> 3.9"
54

65
group :jekyll_plugins do
76
gem "jekyll-feed", "~> 0.12"
87
end
9-
10-
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
11-
# and associated library.
12-
platforms :mingw, :x64_mingw, :mswin, :jruby do
13-
gem "tzinfo", ">= 1", "< 3"
14-
gem "tzinfo-data"
15-
end
16-
17-
# Performance-booster for watching directories on Windows
18-
gem "wdm", "~> 0.1", :platforms => [:mingw, :x64_mingw, :mswin]
19-
20-
# Lock `http_parser.rb` gem to `v0.6.x` on JRuby builds since newer versions of the gem
21-
# do not have a Java counterpart.
22-
gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby]

README.md

Lines changed: 54 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,65 @@
1-
jqueryvalidation-content
2-
========================
1+
# jQuery Validation Plugin - Content Repository
32

4-
## Building
3+
This repository contains the documentation and content for the [jQuery Validation Plugin](https://github.com/jquery-validation/jquery-validation) website.
54

6-
### Requirements
5+
## GitHub Pages Deployment
76

8-
* <a href="http://www.xmlsoft.org/">libxml2</a>
9-
* <a href="http://xmlsoft.org/XSLT/">libxslt</a>
7+
This site is automatically deployed to GitHub Pages using Jekyll.
108

11-
The `xmllint` and `xsltproc` utilities need to be in your path. If you are on Windows, you can get libxml2 and libxslt from <a href="http://www.zlatkovic.com/libxml.en.html">GnuWin32</a>.
9+
### How it Works
1210

13-
* Install [WordPress](http://wordpress.org/download/)
14-
* Install [jqueryvalidation-theme](https://github.com/jzaefferer/validation-theme) - clone that repo, then symlink it into your `wp-content/themes` folder
15-
* Install [gilded-wordpress plugin](https://raw.githubusercontent.com/scottgonzalez/gilded-wordpress/v1.0.0/gilded-wordpress.php)
16-
* Install [jquery-static-index plugin](https://raw.githubusercontent.com/jquery/jquery-wp-content/v4.0.1/plugins/jquery-static-index.php)
11+
- Content is written in Markdown with Jekyll front matter
12+
- The site is built using Jekyll (configured in `_config.yml`)
13+
- GitHub Actions automatically builds and deploys the site when changes are pushed to the `main` or `master` branch
14+
- The workflow is defined in `.github/workflows/deploy-pages.yml`
1715

18-
### Installation
16+
### Local Development
1917

20-
In this repo:
21-
* Make sure nodejs (with npm) is installed, otherwise install from nodejs.org
22-
* `cp config-sample.json config.json`, edit config.json to match login for local WordPress
23-
* run `npm install -g grunt-cli`
24-
* run `npm install`
18+
To test the site locally:
2519

26-
### Hacks
20+
1. Install Ruby and Bundler:
21+
```bash
22+
gem install bundler
23+
```
2724

28-
* Make sure your local `wordpress` nodejs module contains [this commit](https://github.com/scottgonzalez/node-wordpress/commit/2b19238cf8064dafb66b9db09d0adcc9eac7f724)
29-
* Make sure your local config contains
30-
* rpc-auth and basic-auth credentials
31-
* a https jqueryvalidation url
25+
2. Install dependencies:
26+
```bash
27+
bundle install
28+
```
3229

33-
### Deploy
30+
3. Run Jekyll locally:
31+
```bash
32+
bundle exec jekyll serve
33+
```
3434

35-
`grunt deploy`
35+
4. Open your browser to `http://localhost:4000`
36+
37+
### Making Changes
38+
39+
1. Edit or create Markdown files (`.md`) in the root directory
40+
2. Each file should have Jekyll front matter at the top:
41+
```yaml
42+
---
43+
layout: default
44+
title: Your Page Title
45+
---
46+
```
47+
3. Commit and push your changes
48+
4. GitHub Actions will automatically build and deploy the site
49+
50+
### Content Structure
51+
52+
- `index.md` - Home page
53+
- `documentation.md` - API documentation
54+
- `contribute.md` - Contribution guide
55+
- `reference.md` - General guidelines and reference
56+
- `entries/` - XML documentation entries (for API methods)
57+
- `pages/` - Original content files (kept for reference)
58+
59+
### Deployment
60+
61+
The site is automatically deployed via GitHub Actions when:
62+
- Changes are pushed to `main` or `master` branch
63+
- The workflow can also be triggered manually from the Actions tab
64+
65+
No manual deployment is required!

_config.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ baseurl: ""
55

66
# Build settings
77
markdown: kramdown
8-
theme: minima
98

109
# Exclude from processing
1110
exclude:
@@ -22,6 +21,8 @@ exclude:
2221
- .gitignore
2322
- .gitattributes
2423
- dist
24+
- Gemfile
25+
- Gemfile.lock
2526

2627
# Collections
2728
collections:

_layouts/default.html

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>{% if page.title %}{{ page.title }} - {% endif %}{{ site.title }}</title>
7+
<meta name="description" content="{{ site.description }}">
8+
<style>
9+
body {
10+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
11+
line-height: 1.6;
12+
max-width: 900px;
13+
margin: 0 auto;
14+
padding: 20px;
15+
color: #333;
16+
}
17+
header {
18+
border-bottom: 2px solid #0066cc;
19+
padding-bottom: 20px;
20+
margin-bottom: 30px;
21+
}
22+
header h1 {
23+
margin: 0;
24+
color: #0066cc;
25+
}
26+
nav {
27+
margin-top: 15px;
28+
}
29+
nav a {
30+
margin-right: 20px;
31+
color: #0066cc;
32+
text-decoration: none;
33+
}
34+
nav a:hover {
35+
text-decoration: underline;
36+
}
37+
h1, h2, h3, h4, h5, h6 {
38+
color: #0066cc;
39+
margin-top: 1.5em;
40+
}
41+
code {
42+
background-color: #f4f4f4;
43+
padding: 2px 6px;
44+
border-radius: 3px;
45+
font-family: 'Courier New', monospace;
46+
}
47+
pre {
48+
background-color: #f4f4f4;
49+
padding: 15px;
50+
border-radius: 5px;
51+
overflow-x: auto;
52+
}
53+
pre code {
54+
background-color: transparent;
55+
padding: 0;
56+
}
57+
a {
58+
color: #0066cc;
59+
}
60+
footer {
61+
margin-top: 50px;
62+
padding-top: 20px;
63+
border-top: 1px solid #ddd;
64+
color: #666;
65+
font-size: 0.9em;
66+
}
67+
iframe {
68+
max-width: 100%;
69+
}
70+
</style>
71+
</head>
72+
<body>
73+
<header>
74+
<h1><a href="/" style="color: #0066cc; text-decoration: none;">{{ site.title }}</a></h1>
75+
<nav>
76+
<a href="/">Home</a>
77+
<a href="/documentation/">Documentation</a>
78+
<a href="/contribute/">Contribute</a>
79+
<a href="/reference/">Reference</a>
80+
<a href="https://github.com/jquery-validation/jquery-validation">GitHub</a>
81+
</nav>
82+
</header>
83+
84+
<main>
85+
{% if page.title and page.url != "/" %}
86+
<h1>{{ page.title }}</h1>
87+
{% endif %}
88+
89+
{{ content }}
90+
</main>
91+
92+
<footer>
93+
<p>&copy; jQuery Validation Plugin | <a href="https://github.com/jquery-validation/validation-content">Content Repository</a> | Licensed under MIT</p>
94+
</footer>
95+
</body>
96+
</html>

0 commit comments

Comments
 (0)