opaque_id 1.1.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.release-please-manifest.json +1 -1
- data/CHANGELOG.md +50 -0
- data/CODE_OF_CONDUCT.md +11 -11
- data/README.md +82 -0
- data/docs/.gitignore +5 -0
- data/docs/404.html +25 -0
- data/docs/Gemfile +31 -0
- data/docs/Gemfile.lock +335 -0
- data/docs/_config.yml +162 -0
- data/docs/_data/navigation.yml +132 -0
- data/docs/_includes/footer_custom.html +8 -0
- data/docs/_includes/head_custom.html +67 -0
- data/docs/algorithms.md +409 -0
- data/docs/alphabets.md +521 -0
- data/docs/api-reference.md +594 -0
- data/docs/assets/css/custom.scss +798 -0
- data/docs/assets/images/favicon.svg +17 -0
- data/docs/assets/images/og-image.svg +65 -0
- data/docs/configuration.md +548 -0
- data/docs/development.md +567 -0
- data/docs/getting-started.md +256 -0
- data/docs/index.md +132 -0
- data/docs/installation.md +377 -0
- data/docs/performance.md +488 -0
- data/docs/robots.txt +11 -0
- data/docs/security.md +598 -0
- data/docs/usage.md +414 -0
- data/docs/use-cases.md +569 -0
- data/lib/generators/opaque_id/install_generator.rb +38 -23
- data/lib/opaque_id/version.rb +1 -1
- data/tasks/0003-prd-documentation-site.md +191 -0
- data/tasks/tasks-0003-prd-documentation-site.md +84 -0
- metadata +27 -2
- data/sig/opaque_id.rbs +0 -4
data/docs/_config.yml
ADDED
@@ -0,0 +1,162 @@
|
|
1
|
+
# Site settings
|
2
|
+
title: OpaqueId Documentation
|
3
|
+
description: Generate cryptographically secure, collision-free opaque IDs for ActiveRecord models
|
4
|
+
url: "https://nyaggah.github.io"
|
5
|
+
baseurl: "/opaque_id"
|
6
|
+
|
7
|
+
# Just the Docs theme (via remote_theme for GitHub Pages compatibility)
|
8
|
+
remote_theme: just-the-docs/just-the-docs
|
9
|
+
|
10
|
+
# GitHub Pages plugins
|
11
|
+
plugins:
|
12
|
+
- jekyll-feed
|
13
|
+
- jekyll-sitemap
|
14
|
+
- jekyll-seo-tag
|
15
|
+
- jekyll-remote-theme
|
16
|
+
|
17
|
+
# Feed configuration
|
18
|
+
feed:
|
19
|
+
posts_limit: 10
|
20
|
+
excerpt_only: true
|
21
|
+
path: "feed.xml"
|
22
|
+
|
23
|
+
# Sitemap configuration
|
24
|
+
sitemap:
|
25
|
+
changefreq: "weekly"
|
26
|
+
priority: 0.5
|
27
|
+
lastmod: true
|
28
|
+
|
29
|
+
# Site metadata
|
30
|
+
author: Joe Nyaggah
|
31
|
+
github_username: nyaggah
|
32
|
+
repository: nyaggah/opaque_id
|
33
|
+
|
34
|
+
# SEO and social metadata
|
35
|
+
lang: en
|
36
|
+
locale: en_US
|
37
|
+
keywords: ruby, rails, activerecord, opaque-id, nanoid, secure-random, documentation, gem, id-generation, cryptography
|
38
|
+
social:
|
39
|
+
name: OpaqueId
|
40
|
+
links:
|
41
|
+
- https://github.com/nyaggah/opaque_id
|
42
|
+
- https://rubygems.org/gems/opaque_id
|
43
|
+
|
44
|
+
# SEO configuration
|
45
|
+
seo:
|
46
|
+
type: "WebSite"
|
47
|
+
name: "OpaqueId Documentation"
|
48
|
+
description: "Generate cryptographically secure, collision-free opaque IDs for ActiveRecord models"
|
49
|
+
url: "https://nyaggah.github.io/opaque_id"
|
50
|
+
image: "https://nyaggah.github.io/opaque_id/assets/images/og-image.png"
|
51
|
+
twitter:
|
52
|
+
card: "summary_large_image"
|
53
|
+
site: "@nyaggah"
|
54
|
+
creator: "@nyaggah"
|
55
|
+
facebook:
|
56
|
+
app_id: ""
|
57
|
+
publisher: ""
|
58
|
+
google:
|
59
|
+
site_verification: ""
|
60
|
+
|
61
|
+
# Permalinks
|
62
|
+
permalink: pretty
|
63
|
+
collections:
|
64
|
+
docs:
|
65
|
+
output: true
|
66
|
+
permalink: /:collection/:name/
|
67
|
+
|
68
|
+
# Just the Docs configuration
|
69
|
+
search_enabled: true
|
70
|
+
search_tokenizer_separator: /[\s/]+/
|
71
|
+
search_placeholder: "Search docs"
|
72
|
+
search_show_title: true
|
73
|
+
|
74
|
+
# Theme customization
|
75
|
+
masthead_title: "OpaqueId"
|
76
|
+
masthead_title_url: "/"
|
77
|
+
masthead_title_image: false
|
78
|
+
|
79
|
+
# Syntax highlighting
|
80
|
+
highlighter: rouge
|
81
|
+
markdown: kramdown
|
82
|
+
kramdown:
|
83
|
+
syntax_highlighter: rouge
|
84
|
+
syntax_highlighter_opts:
|
85
|
+
css_class: "highlight"
|
86
|
+
span:
|
87
|
+
line_numbers: false
|
88
|
+
block:
|
89
|
+
line_numbers: false
|
90
|
+
start_line: 1
|
91
|
+
|
92
|
+
# Custom head includes
|
93
|
+
head_scripts:
|
94
|
+
- |
|
95
|
+
<style>
|
96
|
+
/* Custom favicon */
|
97
|
+
<link rel="icon" type="image/svg+xml" href="/opaque_id/assets/images/favicon.svg">
|
98
|
+
<link rel="icon" type="image/png" href="/opaque_id/assets/images/favicon.png">
|
99
|
+
</style>
|
100
|
+
|
101
|
+
# Navigation
|
102
|
+
nav_external_links: true
|
103
|
+
nav_external_links_new_tab: true
|
104
|
+
nav_footer: true
|
105
|
+
nav_order: 1
|
106
|
+
|
107
|
+
# Header and footer
|
108
|
+
header_links:
|
109
|
+
- title: "GitHub"
|
110
|
+
url: "https://github.com/nyaggah/opaque_id"
|
111
|
+
- title: "RubyGems"
|
112
|
+
url: "https://rubygems.org/gems/opaque_id"
|
113
|
+
|
114
|
+
# Auxiliary links (moved to sidebar top)
|
115
|
+
aux_links:
|
116
|
+
- title: "GitHub"
|
117
|
+
url: "https://github.com/nyaggah/opaque_id"
|
118
|
+
- title: "RubyGems"
|
119
|
+
url: "https://rubygems.org/gems/opaque_id"
|
120
|
+
- title: "Issues"
|
121
|
+
url: "https://github.com/nyaggah/opaque_id/issues"
|
122
|
+
- title: "Releases"
|
123
|
+
url: "https://github.com/nyaggah/opaque_id/releases"
|
124
|
+
|
125
|
+
# Color scheme - use system theme with light fallback
|
126
|
+
color_scheme: light
|
127
|
+
|
128
|
+
# Custom CSS
|
129
|
+
sass:
|
130
|
+
sass_dir: assets/css
|
131
|
+
style: compressed
|
132
|
+
|
133
|
+
# Performance optimizations
|
134
|
+
compress_html:
|
135
|
+
clippings: all
|
136
|
+
comments: all
|
137
|
+
endings: all
|
138
|
+
startings: [html, head, body]
|
139
|
+
blanklines: false
|
140
|
+
profile: false
|
141
|
+
ignore:
|
142
|
+
envs: all
|
143
|
+
|
144
|
+
# Asset optimization
|
145
|
+
keep_files:
|
146
|
+
- assets/images
|
147
|
+
|
148
|
+
# Footer - using custom include for dynamic year
|
149
|
+
footer_content: false
|
150
|
+
|
151
|
+
# Exclude from processing
|
152
|
+
exclude:
|
153
|
+
- .sass-cache/
|
154
|
+
- .jekyll-cache/
|
155
|
+
- gemfiles/
|
156
|
+
- Gemfile
|
157
|
+
- Gemfile.lock
|
158
|
+
- node_modules/
|
159
|
+
- vendor/bundle/
|
160
|
+
- vendor/cache/
|
161
|
+
- vendor/gems/
|
162
|
+
- vendor/ruby/
|
@@ -0,0 +1,132 @@
|
|
1
|
+
# Custom navigation structure for OpaqueId documentation
|
2
|
+
# This file provides additional navigation metadata and organization
|
3
|
+
|
4
|
+
# Main navigation sections
|
5
|
+
main:
|
6
|
+
- title: "Getting Started"
|
7
|
+
url: "/getting-started/"
|
8
|
+
description: "Quick start guide and basic setup"
|
9
|
+
icon: "play"
|
10
|
+
|
11
|
+
- title: "Installation"
|
12
|
+
url: "/installation/"
|
13
|
+
description: "Installation methods and requirements"
|
14
|
+
icon: "download"
|
15
|
+
|
16
|
+
- title: "Usage"
|
17
|
+
url: "/usage/"
|
18
|
+
description: "How to use OpaqueId in your application"
|
19
|
+
icon: "code"
|
20
|
+
|
21
|
+
# Configuration section
|
22
|
+
configuration:
|
23
|
+
- title: "Configuration"
|
24
|
+
url: "/configuration/"
|
25
|
+
description: "Configuration options and examples"
|
26
|
+
icon: "settings"
|
27
|
+
|
28
|
+
- title: "Alphabets"
|
29
|
+
url: "/alphabets/"
|
30
|
+
description: "Built-in alphabets and custom options"
|
31
|
+
icon: "type"
|
32
|
+
|
33
|
+
# Technical section
|
34
|
+
technical:
|
35
|
+
- title: "Algorithms"
|
36
|
+
url: "/algorithms/"
|
37
|
+
description: "Technical details of ID generation algorithms"
|
38
|
+
icon: "cpu"
|
39
|
+
|
40
|
+
- title: "Performance"
|
41
|
+
url: "/performance/"
|
42
|
+
description: "Benchmarks and optimization tips"
|
43
|
+
icon: "zap"
|
44
|
+
|
45
|
+
- title: "Security"
|
46
|
+
url: "/security/"
|
47
|
+
description: "Security considerations and best practices"
|
48
|
+
icon: "shield"
|
49
|
+
|
50
|
+
# Reference section
|
51
|
+
reference:
|
52
|
+
- title: "Use Cases"
|
53
|
+
url: "/use-cases/"
|
54
|
+
description: "Real-world examples and applications"
|
55
|
+
icon: "lightbulb"
|
56
|
+
|
57
|
+
- title: "API Reference"
|
58
|
+
url: "/api-reference/"
|
59
|
+
description: "Complete API documentation"
|
60
|
+
icon: "book"
|
61
|
+
|
62
|
+
- title: "Development"
|
63
|
+
url: "/development/"
|
64
|
+
description: "Contributing and development setup"
|
65
|
+
icon: "tools"
|
66
|
+
|
67
|
+
# External links
|
68
|
+
external:
|
69
|
+
- title: "GitHub Repository"
|
70
|
+
url: "https://github.com/nyaggah/opaque_id"
|
71
|
+
description: "Source code and issue tracking"
|
72
|
+
icon: "github"
|
73
|
+
|
74
|
+
- title: "RubyGems"
|
75
|
+
url: "https://rubygems.org/gems/opaque_id"
|
76
|
+
description: "Install from RubyGems"
|
77
|
+
icon: "package"
|
78
|
+
|
79
|
+
- title: "Report Issue"
|
80
|
+
url: "https://github.com/nyaggah/opaque_id/issues"
|
81
|
+
description: "Report bugs or request features"
|
82
|
+
icon: "bug"
|
83
|
+
|
84
|
+
# Quick links for common tasks
|
85
|
+
quick_links:
|
86
|
+
- title: "Quick Start"
|
87
|
+
url: "/getting-started/"
|
88
|
+
description: "Get up and running in 5 minutes"
|
89
|
+
|
90
|
+
- title: "Installation"
|
91
|
+
url: "/installation/"
|
92
|
+
description: "Install the gem"
|
93
|
+
|
94
|
+
- title: "Basic Usage"
|
95
|
+
url: "/usage/"
|
96
|
+
description: "Generate your first opaque ID"
|
97
|
+
|
98
|
+
- title: "Configuration"
|
99
|
+
url: "/configuration/"
|
100
|
+
description: "Customize ID generation"
|
101
|
+
|
102
|
+
- title: "API Reference"
|
103
|
+
url: "/api-reference/"
|
104
|
+
description: "Complete method documentation"
|
105
|
+
|
106
|
+
# Related projects and resources
|
107
|
+
related:
|
108
|
+
- title: "NanoID (Original)"
|
109
|
+
url: "https://github.com/ai/nanoid"
|
110
|
+
description: "The original NanoID implementation"
|
111
|
+
|
112
|
+
- title: "nanoid.rb"
|
113
|
+
url: "https://github.com/radeno/nanoid.rb"
|
114
|
+
description: "Ruby port of NanoID"
|
115
|
+
|
116
|
+
- title: "PlanetScale Article"
|
117
|
+
url: "https://planetscale.com/blog/why-we-chose-nanoids-for-planetscales-api"
|
118
|
+
description: "Why we chose NanoIDs for PlanetScale's API"
|
119
|
+
|
120
|
+
# Footer links
|
121
|
+
footer:
|
122
|
+
- title: "License"
|
123
|
+
url: "https://github.com/nyaggah/opaque_id/blob/main/LICENSE.txt"
|
124
|
+
description: "MIT License"
|
125
|
+
|
126
|
+
- title: "Code of Conduct"
|
127
|
+
url: "https://github.com/nyaggah/opaque_id/blob/main/CODE_OF_CONDUCT.md"
|
128
|
+
description: "Contributor Covenant"
|
129
|
+
|
130
|
+
- title: "Changelog"
|
131
|
+
url: "https://github.com/nyaggah/opaque_id/blob/main/CHANGELOG.md"
|
132
|
+
description: "Version history"
|
@@ -0,0 +1,67 @@
|
|
1
|
+
<!-- Custom head includes for OpaqueId Documentation -->
|
2
|
+
|
3
|
+
<!-- Favicon -->
|
4
|
+
<link rel="icon" type="image/svg+xml" href="{{ '/assets/images/favicon.svg' | relative_url }}">
|
5
|
+
<link rel="icon" type="image/png" href="{{ '/assets/images/favicon.png' | relative_url }}">
|
6
|
+
<link rel="apple-touch-icon" href="{{ '/assets/images/apple-touch-icon.png' | relative_url }}">
|
7
|
+
|
8
|
+
<!-- Open Graph / Facebook -->
|
9
|
+
<meta property="og:type" content="website">
|
10
|
+
<meta property="og:url" content="{{ site.url }}{{ site.baseurl }}{{ page.url }}">
|
11
|
+
<meta property="og:title" content="{% if page.title %}{{ page.title }} - {% endif %}{{ site.title }}">
|
12
|
+
<meta property="og:description" content="{% if page.description %}{{ page.description }}{% else %}{{ site.description }}{% endif %}">
|
13
|
+
<meta property="og:image" content="{{ site.url }}{{ site.baseurl }}/assets/images/og-image.png">
|
14
|
+
<meta property="og:site_name" content="{{ site.title }}">
|
15
|
+
|
16
|
+
<!-- Twitter -->
|
17
|
+
<meta property="twitter:card" content="summary_large_image">
|
18
|
+
<meta property="twitter:url" content="{{ site.url }}{{ site.baseurl }}{{ page.url }}">
|
19
|
+
<meta property="twitter:title" content="{% if page.title %}{{ page.title }} - {% endif %}{{ site.title }}">
|
20
|
+
<meta property="twitter:description" content="{% if page.description %}{{ page.description }}{% else %}{{ site.description }}{% endif %}">
|
21
|
+
<meta property="twitter:image" content="{{ site.url }}{{ site.baseurl }}/assets/images/og-image.png">
|
22
|
+
<meta property="twitter:site" content="@nyaggah">
|
23
|
+
<meta property="twitter:creator" content="@nyaggah">
|
24
|
+
|
25
|
+
<!-- Additional SEO meta tags -->
|
26
|
+
<meta name="robots" content="index, follow">
|
27
|
+
<meta name="googlebot" content="index, follow">
|
28
|
+
<meta name="author" content="{{ site.author }}">
|
29
|
+
<meta name="generator" content="Jekyll {{ jekyll.version }}">
|
30
|
+
<meta name="theme-color" content="#a855f7">
|
31
|
+
<meta name="msapplication-TileColor" content="#a855f7">
|
32
|
+
<meta name="msapplication-config" content="{{ '/assets/images/browserconfig.xml' | relative_url }}">
|
33
|
+
|
34
|
+
<!-- Canonical URL -->
|
35
|
+
<link rel="canonical" href="{{ site.url }}{{ site.baseurl }}{{ page.url }}">
|
36
|
+
|
37
|
+
<!-- JSON-LD structured data -->
|
38
|
+
<script type="application/ld+json">
|
39
|
+
{
|
40
|
+
"@context": "https://schema.org",
|
41
|
+
"@type": "WebSite",
|
42
|
+
"name": "{{ site.title }}",
|
43
|
+
"description": "{{ site.description }}",
|
44
|
+
"url": "{{ site.url }}{{ site.baseurl }}",
|
45
|
+
"author": {
|
46
|
+
"@type": "Person",
|
47
|
+
"name": "{{ site.author }}",
|
48
|
+
"url": "https://github.com/{{ site.github_username }}"
|
49
|
+
},
|
50
|
+
"publisher": {
|
51
|
+
"@type": "Organization",
|
52
|
+
"name": "{{ site.title }}",
|
53
|
+
"url": "{{ site.url }}{{ site.baseurl }}"
|
54
|
+
},
|
55
|
+
"potentialAction": {
|
56
|
+
"@type": "SearchAction",
|
57
|
+
"target": "{{ site.url }}{{ site.baseurl }}/search/?q={search_term_string}",
|
58
|
+
"query-input": "required name=search_term_string"
|
59
|
+
}
|
60
|
+
}
|
61
|
+
</script>
|
62
|
+
|
63
|
+
<!-- Additional performance optimizations -->
|
64
|
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
65
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
66
|
+
<link rel="dns-prefetch" href="//github.com">
|
67
|
+
<link rel="dns-prefetch" href="//rubygems.org">
|