-
Notifications
You must be signed in to change notification settings - Fork 29
Convert XML API entries to Markdown for Jekyll #62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
Copilot
wants to merge
22
commits into
master
Choose a base branch
from
copilot/convert-repo-to-github-pages
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
29f85e4
Add GitHub Pages configuration with Jekyll
Copilot 093f7a5
Add Jekyll layouts and update configuration
Copilot 85582b0
Add setup documentation and finalize configuration
Copilot 9e0ae64
Convert XML entries to Markdown format
Copilot a0ffcfc
Improve XML to Markdown conversion formatting
Copilot 8519817
Add conversion documentation and finalize configuration
Copilot 285f503
Make conversion script paths relative for portability
Copilot 0bfb7b9
Remove old unused files and clean up repository structure
Copilot fca72e8
Update conversion notes with cleanup details
Copilot 0d6d791
Update to Jekyll 4.x
Copilot c368205
Add Jekyll 4 upgrade documentation
Copilot ef930dd
fix yaml error
bytestream b631414
update .gitignore
bytestream 36ceeb4
update base url
bytestream 8cb9141
update .gitignore
bytestream 1def325
remove copilot generated pages
bytestream c9d479f
update exclude list
bytestream 76ffa0f
add logo and update colour scheme
bytestream df11c99
remove useless h1
bytestream 409216a
Fix type annotations in validate.md - replace Any with specific types
Copilot fad78dc
Fix typos and formatting issues in documentation
Copilot 0eaf33a
Fix validate.md formatting: add line breaks, code blocks, and fix syn…
Copilot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| name: Deploy to GitHub Pages | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| - master | ||
| workflow_dispatch: | ||
|
|
||
| # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
| permissions: | ||
| contents: read | ||
| pages: write | ||
| id-token: write | ||
|
|
||
| # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
| # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
| concurrency: | ||
| group: "pages" | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Pages | ||
| uses: actions/configure-pages@v5 | ||
|
|
||
| - name: Build with Jekyll | ||
| uses: actions/jekyll-build-pages@v1 | ||
| with: | ||
| source: ./ | ||
| destination: ./_site | ||
|
|
||
| - name: Upload artifact | ||
| uses: actions/upload-pages-artifact@v3 | ||
|
|
||
| deploy: | ||
| environment: | ||
| name: github-pages | ||
| url: ${{ steps.deployment.outputs.page_url }} | ||
| runs-on: ubuntu-latest | ||
| needs: build | ||
| steps: | ||
| - name: Deploy to GitHub Pages | ||
| id: deployment | ||
| uses: actions/deploy-pages@v4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| dist | ||
| node_modules | ||
| config.json | ||
| /.jekyll-cache/ | ||
| /_site/ | ||
| /Gemfile.lock |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| source "https://rubygems.org" | ||
|
|
||
| gem "jekyll", "~> 4.3" | ||
| gem "webrick", "~> 1.8" # Required for Jekyll 4 on Ruby 3.0+ | ||
|
|
||
| group :jekyll_plugins do | ||
| gem "jekyll-feed", "~> 0.17" | ||
| end |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,35 +1,67 @@ | ||
| jqueryvalidation-content | ||
| ======================== | ||
| # jQuery Validation Plugin - Content Repository | ||
|
|
||
| ## Building | ||
| This repository contains the documentation and content for the [jQuery Validation Plugin](https://github.com/jquery-validation/jquery-validation) website. | ||
|
|
||
| ### Requirements | ||
| ## GitHub Pages Deployment | ||
|
|
||
| * <a href="http://www.xmlsoft.org/">libxml2</a> | ||
| * <a href="http://xmlsoft.org/XSLT/">libxslt</a> | ||
| This site is automatically deployed to GitHub Pages using Jekyll. | ||
|
|
||
| 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>. | ||
| ### How it Works | ||
|
|
||
| * Install [WordPress](http://wordpress.org/download/) | ||
| * Install [jqueryvalidation-theme](https://github.com/jzaefferer/validation-theme) - clone that repo, then symlink it into your `wp-content/themes` folder | ||
| * Install [gilded-wordpress plugin](https://raw.githubusercontent.com/scottgonzalez/gilded-wordpress/v1.0.0/gilded-wordpress.php) | ||
| * Install [jquery-static-index plugin](https://raw.githubusercontent.com/jquery/jquery-wp-content/v4.0.1/plugins/jquery-static-index.php) | ||
| - Content is written in Markdown with Jekyll front matter | ||
| - The site is built using Jekyll (configured in `_config.yml`) | ||
| - GitHub Actions automatically builds and deploys the site when changes are pushed to the `main` or `master` branch | ||
| - The workflow is defined in `.github/workflows/deploy-pages.yml` | ||
|
|
||
| ### Installation | ||
| ### Local Development | ||
|
|
||
| In this repo: | ||
| * Make sure nodejs (with npm) is installed, otherwise install from nodejs.org | ||
| * `cp config-sample.json config.json`, edit config.json to match login for local WordPress | ||
| * run `npm install -g grunt-cli` | ||
| * run `npm install` | ||
| To test the site locally: | ||
|
|
||
| ### Hacks | ||
| 1. Install Ruby 2.7 or higher and Bundler: | ||
| ```bash | ||
| gem install bundler | ||
| ``` | ||
|
|
||
| * Make sure your local `wordpress` nodejs module contains [this commit](https://github.com/scottgonzalez/node-wordpress/commit/2b19238cf8064dafb66b9db09d0adcc9eac7f724) | ||
| * Make sure your local config contains | ||
| * rpc-auth and basic-auth credentials | ||
| * a https jqueryvalidation url | ||
| 2. Install dependencies: | ||
| ```bash | ||
| bundle install | ||
| ``` | ||
|
|
||
| ### Deploy | ||
| 3. Run Jekyll locally: | ||
| ```bash | ||
| bundle exec jekyll serve | ||
| ``` | ||
|
|
||
| `grunt deploy` | ||
| 4. Open your browser to `http://localhost:4000/validation-content/` | ||
|
|
||
| **Note:** This site uses Jekyll 4.x. If you encounter issues, ensure you have Ruby 2.7 or higher installed. | ||
|
|
||
| ### Making Changes | ||
|
|
||
| 1. Edit or create Markdown files (`.md`) in the root directory | ||
| 2. Each file should have Jekyll front matter at the top: | ||
| ```yaml | ||
| --- | ||
| layout: default | ||
| title: Your Page Title | ||
| --- | ||
| ``` | ||
| 3. Commit and push your changes | ||
| 4. GitHub Actions will automatically build and deploy the site | ||
|
|
||
| ### Content Structure | ||
|
|
||
| - `index.md` - Home page | ||
| - `documentation.md` - API documentation | ||
| - `contribute.md` - Contribution guide | ||
| - `reference.md` - General guidelines and reference | ||
| - `_entries/` - Markdown documentation entries (for API methods, converted from XML) | ||
| - `_layouts/` - Jekyll layout templates | ||
|
|
||
| ### Deployment | ||
|
|
||
| The site is automatically deployed via GitHub Actions when: | ||
| - Changes are pushed to `main` or `master` branch | ||
| - The workflow can also be triggered manually from the Actions tab | ||
|
|
||
| No manual deployment is required! | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| title: jQuery Validation Plugin | ||
| description: Site content for the jQuery Validation Plugin | ||
| url: https://jquery-validation.github.io | ||
| baseurl: "" | ||
|
bytestream marked this conversation as resolved.
|
||
|
|
||
| # Build settings | ||
| markdown: kramdown | ||
| kramdown: | ||
| input: GFM | ||
| syntax_highlighter: rouge | ||
|
|
||
| # Exclude from processing | ||
| exclude: | ||
| - README.md | ||
| - LICENSE-MIT.txt | ||
| - .gitignore | ||
| - .gitattributes | ||
| - Gemfile | ||
| - Gemfile.lock | ||
|
|
||
| # Collections | ||
| collections: | ||
| entries: | ||
| output: true | ||
| permalink: /:name/ | ||
|
|
||
| defaults: | ||
| - scope: | ||
| path: "" | ||
| type: "entries" | ||
| values: | ||
| layout: "default" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| --- | ||
| title: Validator.destroy() | ||
| entry_name: Validator.destroy | ||
| entry_type: method | ||
| category: validator | ||
| layout: default | ||
| --- | ||
|
|
||
| # Validator.destroy() | ||
|
|
||
| Destroys this instance of validator freeing up resources and unregistering events. | ||
|
|
||
| ## Description | ||
|
|
||
| This is only useful, when you need to clean up after the validator in a Single Page Application. | ||
|
|
||
| ## Usage | ||
|
|
||
|
|
||
| ## Examples | ||
|
|
||
| Destroying an instance of validator. | ||
|
|
||
| ```javascript | ||
| /* | ||
| * On SPA page start. | ||
| */ | ||
| var validator = $( "#myform" ).validate(); | ||
|
|
||
| /* | ||
| * Just before SPA page's navigation away. | ||
| */ | ||
| validator.destroy(); | ||
|
|
||
| /* | ||
| * After this point the #myForm form is back to its original boring state. | ||
| */ | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| --- | ||
| title: Validator.element() | ||
| entry_name: Validator.element | ||
| entry_type: method | ||
| category: validator | ||
| layout: default | ||
| --- | ||
|
|
||
| # Validator.element() | ||
|
|
||
| Validates a single element, returns true if it is valid, false otherwise. | ||
|
|
||
| ## Description | ||
|
|
||
| This behaves as validation on blur or keyup, but returns the result. | ||
|
|
||
| ## Usage | ||
|
|
||
| **element** *(Selector)* | ||
|
|
||
| An element to validate, must be inside the validated form. | ||
|
|
||
| ## Examples | ||
|
|
||
| Triggers element validation programmatically. | ||
|
|
||
| ```javascript | ||
| var validator = $( "#myform" ).validate(); | ||
| validator.element( "#myselect" ); | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| --- | ||
| title: Validator.form() | ||
| entry_name: Validator.form | ||
| entry_type: method | ||
| category: validator | ||
| layout: default | ||
| --- | ||
|
|
||
| # Validator.form() | ||
|
|
||
| Validates the form, returns true if it is valid, false otherwise. | ||
|
|
||
| ## Description | ||
|
|
||
| This behaves as a normal submit event, but returns the result. | ||
|
|
||
| ## Usage | ||
|
|
||
|
|
||
| ## Examples | ||
|
|
||
| Triggers form validation programmatically. | ||
|
|
||
| ```javascript | ||
| var validator = $( "#myform" ).validate(); | ||
| validator.form(); | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| --- | ||
| title: Validator.numberOfInvalids() | ||
| entry_name: Validator.numberOfInvalids | ||
| entry_type: method | ||
| category: validator | ||
| layout: default | ||
| --- | ||
|
|
||
| # Validator.numberOfInvalids() | ||
|
|
||
| Returns the number of invalid fields. | ||
|
|
||
| ## Description | ||
|
|
||
| This depends on the internal validator state. It covers all fields only after validating the complete form (on submit or via $("form").valid()). After validating a single element, only that element is counted. Most useful in combination with the invalidHandler-option. | ||
|
|
||
| ## Usage | ||
|
|
||
| **errors** *(Object)* | ||
|
|
||
| One or more key/value pairs of input names and messages. | ||
|
|
||
| ## Examples | ||
|
|
||
| Displays a summary of invalid fields after an invalid submit. | ||
|
|
||
| ```javascript | ||
| var validator = $( "#myform" ).validate({ | ||
| invalidHandler: function() { | ||
| $( "#summary" ).text( validator.numberOfInvalids() + " field(s) are invalid" ); | ||
| } | ||
| }); | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| --- | ||
| title: Validator.resetForm() | ||
| entry_name: Validator.resetForm | ||
| entry_type: method | ||
| category: validator | ||
| layout: default | ||
| --- | ||
|
|
||
| # Validator.resetForm() | ||
|
|
||
| Resets the controlled form. | ||
|
|
||
| ## Description | ||
|
|
||
| Resets input fields to their original value (requires form plugin), removes classes indicating invalid elements and hides error messages. | ||
|
|
||
| ## Usage | ||
|
|
||
|
|
||
| ## Examples | ||
|
|
||
| Reset the form controlled by this validator. | ||
|
|
||
| ```javascript | ||
| var validator = $( "#myform" ).validate(); | ||
| validator.resetForm(); | ||
| ``` |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The local dev URL includes
/validation-content/, but_config.ymlcurrently setsbaseurl: "". Either update this URL tohttp://localhost:4000/(or whatever matchesbaseurl) or adjustbaseurlso the served path matches the docs.