-
Notifications
You must be signed in to change notification settings - Fork 1
docs: Add GitHub Pages documentation site #57
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| # Deploy Jekyll documentation to GitHub Pages | ||
| name: Deploy Documentation | ||
|
|
||
| on: | ||
| push: | ||
| branches: ["main"] | ||
| paths: | ||
| - 'docs/**' | ||
| - '.github/workflows/pages.yml' | ||
| 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: ./docs | ||
| 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 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| source "https://rubygems.org" | ||
|
|
||
| gem "jekyll", "~> 4.3" | ||
| gem "just-the-docs", "~> 0.10" | ||
| gem "jekyll-seo-tag" | ||
| gem "jekyll-sitemap" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| # Site settings | ||
| title: StringManipulation | ||
| description: High-performance PHP 8.3+ string manipulation library featuring O(n) algorithms with up to 5x speed improvements | ||
| baseurl: "/StringManipulation" | ||
| url: "https://marjovanlier.github.io" | ||
|
|
||
| # Theme | ||
| remote_theme: just-the-docs/just-the-docs@v0.10.1 | ||
|
|
||
| # Colour scheme | ||
| color_scheme: light | ||
|
|
||
| # Logo | ||
| logo: "/assets/images/logo.svg" | ||
|
|
||
| # Aux links | ||
| aux_links: | ||
| "GitHub": | ||
| - "https://github.com/MarjovanLier/StringManipulation" | ||
| "Packagist": | ||
| - "https://packagist.org/packages/marjovanlier/stringmanipulation" | ||
|
|
||
| aux_links_new_tab: true | ||
|
|
||
| # Footer | ||
| footer_content: "Copyright © 2024 Marjo Wenzel van Lier. Distributed under the MIT License." | ||
|
|
||
| # Back to top link | ||
| back_to_top: true | ||
| back_to_top_text: "Back to top" | ||
|
|
||
| # Heading anchor links | ||
| heading_anchors: true | ||
|
|
||
| # Search | ||
| search_enabled: true | ||
| search: | ||
| heading_level: 2 | ||
| previews: 3 | ||
| preview_words_before: 5 | ||
| preview_words_after: 10 | ||
| tokenizer_separator: /[\s/]+/ | ||
| rel_url: true | ||
| button: false | ||
|
|
||
| # Navigation | ||
| nav_sort: case_insensitive | ||
|
|
||
| # Collections for pages | ||
| collections: | ||
| api: | ||
| permalink: "/:collection/:path/" | ||
| output: true | ||
|
|
||
| # Default front matter | ||
| defaults: | ||
| - scope: | ||
| path: "" | ||
| type: "api" | ||
| values: | ||
| layout: "default" | ||
| parent: "API Reference" | ||
|
|
||
| # Plugins | ||
| plugins: | ||
| - jekyll-seo-tag | ||
| - jekyll-sitemap | ||
|
|
||
| # Exclude from processing | ||
| exclude: | ||
| - Gemfile | ||
| - Gemfile.lock | ||
| - node_modules | ||
| - vendor |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,66 @@ | ||||||||||||||||||||||
| --- | ||||||||||||||||||||||
| layout: default | ||||||||||||||||||||||
| title: API Reference | ||||||||||||||||||||||
| nav_order: 3 | ||||||||||||||||||||||
| has_children: true | ||||||||||||||||||||||
| --- | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| # API Reference | ||||||||||||||||||||||
| {: .no_toc } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| Complete documentation for all public methods in the StringManipulation library. | ||||||||||||||||||||||
| {: .fs-6 .fw-300 } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| --- | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ## Overview | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| The `StringManipulation` class provides static methods for high-performance string operations. All methods are designed with O(n) complexity for predictable, scalable performance. | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ```php | ||||||||||||||||||||||
| use MarjovanLier\StringManipulation\StringManipulation; | ||||||||||||||||||||||
| ``` | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| --- | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ## Methods at a Glance | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| | Method | Description | Performance | | ||||||||||||||||||||||
| |:----------------------------------------------------------------------|:---------------------------------------------|:-----------------| | ||||||||||||||||||||||
| | [`removeAccents()`]({{ site.baseurl }}/api-reference/remove-accents/) | Strip accents and diacritics from text | ~450,000 ops/sec | | ||||||||||||||||||||||
| | [`searchWords()`]({{ site.baseurl }}/api-reference/search-words/) | Transform text for search optimisation | ~195,000 ops/sec | | ||||||||||||||||||||||
|
||||||||||||||||||||||
| | [`searchWords()`]({{ site.baseurl }}/api-reference/search-words/) | Transform text for search optimisation | ~195,000 ops/sec | | |
| | [`searchWords()`]({{ site.baseurl }}/api-reference/search-words/) | Transform text for search optimization | ~195,000 ops/sec | |
Copilot
AI
Dec 8, 2025
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.
Spelling error: "Optimisation" should be "Optimization" for consistency with American English spelling.
| | [`searchWords()`]({{ site.baseurl }}/api-reference/search-words/) | Transform text for search optimisation | ~195,000 ops/sec | | |
| | [`nameFix()`]({{ site.baseurl }}/api-reference/name-fix/) | Standardise names with proper capitalisation | ~130,000 ops/sec | | |
| | [`utf8Ansi()`]({{ site.baseurl }}/api-reference/utf8-ansi/) | Convert UTF-8 to ANSI encoding | - | | |
| | [`isValidDate()`]({{ site.baseurl }}/api-reference/is-valid-date/) | Validate date strings with format checking | - | | |
| | [`strReplace()`]({{ site.baseurl }}/api-reference/str-replace/) | Optimised string replacement | - | | |
| | [`searchWords()`]({{ site.baseurl }}/api-reference/search-words/) | Transform text for search optimization | ~195,000 ops/sec | | |
| | [`nameFix()`]({{ site.baseurl }}/api-reference/name-fix/) | Standardise names with proper capitalisation | ~130,000 ops/sec | | |
| | [`utf8Ansi()`]({{ site.baseurl }}/api-reference/utf8-ansi/) | Convert UTF-8 to ANSI encoding | - | | |
| | [`isValidDate()`]({{ site.baseurl }}/api-reference/is-valid-date/) | Validate date strings with format checking | - | | |
| | [`strReplace()`]({{ site.baseurl }}/api-reference/str-replace/) | Optimized string replacement | - | |
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 performance for utf8Ansi(), isValidDate(), strReplace(), and trim() is marked as -. While their performance is indeed input-dependent, it would be beneficial to provide some context or a typical performance range if possible, similar to the other methods. If not, it might be worth adding a footnote explaining why these are not benchmarked (e.g., "Performance is highly dependent on input size and complexity"). This would provide more clarity to the users.
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.
Great work on setting up the
Gemfile! I have a couple of suggestions to improve consistency between your local development environment and the GitHub Pages build environment:rubyversion declaration. This ensures all developers and the CI environment use the same Ruby version, preventing potential dependency mismatches._config.ymlpins thejust-the-docstheme to versionv0.10.1. To ensure local builds are identical to the deployed site, it's best to pin the gem to the same version here.