Skip to content
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

Add docs #90

Merged
merged 2 commits into from
Jun 19, 2024
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: documentation

on:
push:
branches: [master]

permissions:
contents: write

jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Install dependencies
run: |
pip install sphinx sphinx-book-theme
- name: Sphinx build
run: |
cd docs/
make html
- name: Deploy to Github Pages
uses: peaceiris/actions-gh-pages@v4
with:
public_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_build/
force_orphan: true

1 change: 1 addition & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_build
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
11 changes: 11 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
CouchbaseOrm Documentation
=================================

This subdirectory contains the high-level driver documentation, including
tutorials and the reference.

To build the documentation locally for review, install `sphinx` and
`sphinx-book-theme`, then execute `make html` in this directory:

pip install 'sphinx' sphinx-book-theme
make html
57 changes: 57 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Path setup --------------------------------------------------------------

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))


# -- Project information -----------------------------------------------------

project = 'CouchbaseOrm'
copyright = '2024, Woop'


# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']


# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'alabaster'

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']

source_suffix = {
'.txt': 'restructuredtext',
}

html_theme = 'sphinx_book_theme'
1 change: 1 addition & 0 deletions docs/includes/unicode-ballot-x.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.. |x| unicode:: U+2717
1 change: 1 addition & 0 deletions docs/includes/unicode-checkmark.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.. |checkmark| unicode:: U+2713
17 changes: 17 additions & 0 deletions docs/index.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.. _couchbaseorm:

************
CouchbaseOrm
************

.. default-domain:: woop

CouchbaseOrm is the non-official supported object-document record (ORM) for Couchbase in
Ruby.

.. toctree::
:titlesonly:

installation-configuration
schema-configuration
working-with-data
25 changes: 25 additions & 0 deletions docs/installation-configuration.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
.. _installation-configuration:

****************************
Installation & Configuration
****************************

.. default-domain:: woop

.. toctree::
:titlesonly:

installations
reference/compatibility
reference/configuration
reference/rails-integration

Overview
--------

Learn how to install and configure CouchbaseOrm in the following sections:

- :ref:`Installation <installation>`
- :ref:`Compatibility <compatibility>`
- :ref:`Configuration <configuration>`
- :ref:`Rails Integration <rails-integration>`
31 changes: 31 additions & 0 deletions docs/installations.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
.. _installation:

************
Installation
************

.. default-domain:: woop

.. contents:: On this page
:local:
:backlinks: none
:depth: 2
:class: singlecol

Install the Gem
===============

CouchbaseOrm is hosted on github https://github.com/Mapotempo/couchbase-orm.
It can be installed manually or with bundler.

To install the gem with bundler, include the following in your ``Gemfile``:

.. code-block:: ruby

git_source(:github) do |repo_name|
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?('/')
"https://github.com/#{repo_name}.git"
end

gem 'couchbase-orm', github: 'Mapotempo/couchbase-orm'
gem 'couchbase', '~> 3.3.0'
Loading
Loading