Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
38faac6
docs: init djangocms-rest documentation
metaforx Oct 19, 2025
e4e8d87
docs: Update static file handling in Sphinx configuration
metaforx Oct 19, 2025
e64c0f7
Merge branch 'main' into docs/init
metaforx Oct 19, 2025
192d674
Update docs/tutorial/02-installation.rst
metaforx Oct 19, 2025
9a0c2eb
Update docs/tutorial/02-installation.rst
metaforx Oct 19, 2025
577008c
Update docs/how-to/01-use-multi-site.rst
metaforx Oct 19, 2025
4214fcf
Update docs/how-to/index.rst
metaforx Oct 19, 2025
985eafb
Update docs/tutorial/02-installation.rst
metaforx Oct 19, 2025
359876f
Update docs/tutorial/02-installation.rst
metaforx Oct 19, 2025
278c082
Update reference to Plugin Creation & Serialization in plugins.rst
metaforx Oct 19, 2025
47a995d
Update repository references in README and installation documentation
metaforx Oct 19, 2025
206af69
Update installation documentation with additional references to Djang…
metaforx Oct 19, 2025
c572f54
fixes openapi benefits listing
metaforx Oct 19, 2025
4a24114
Clarify note on retrieving page and placeholder objects in plugin cre…
metaforx Oct 19, 2025
9eeec88
Add basic auto-serialization example
metaforx Oct 19, 2025
5eb4c45
Add hint for generating frontend URLs in plugin creation documentation
metaforx Oct 19, 2025
8787265
Update link_text in plugin creation documentation for clarity
metaforx Oct 19, 2025
5a50a45
Merge branch 'main' into docs/init
metaforx Oct 22, 2025
d510601
Merge branch 'main' into docs/init
fsbraun Oct 26, 2025
46b7dbc
Merge branch 'main' into docs/init
fsbraun Oct 29, 2025
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -411,4 +411,4 @@ like to change.

## License

[BSD-3](https://github.com/fsbraun/djangocms-rest/blob/main/LICENSE)
[BSD-3](https://github.com/django-cms/djangocms-rest/blob/main/LICENSE)
15 changes: 15 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Sphinx build directory
_build/

# Python cache
__pycache__/
*.pyc
*.pyo

# IDE files
.vscode/
.idea/

# OS files
.DS_Store
Thumbs.db
50 changes: 50 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# 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 clean serve open dev watch live

# Custom targets for convenience
clean:
rm -rf $(BUILDDIR)/*

serve:
@echo "Starting documentation server at http://localhost:8000"
@python -m http.server 8000 --directory $(BUILDDIR)/html

open:
@echo "Opening documentation in browser..."
@open $(BUILDDIR)/html/index.html

# Development targets
dev:
@echo "Building documentation in development mode..."
@$(SPHINXBUILD) -b html "$(SOURCEDIR)" "$(BUILDDIR)/html" $(SPHINXOPTS) -W --keep-going

watch:
@echo "Watching for changes and rebuilding..."
@while true; do \
inotifywait -r -e modify,create,delete .; \
$(SPHINXBUILD) -b html "$(SOURCEDIR)" "$(BUILDDIR)/html" $(SPHINXOPTS); \
done

live:
@echo "Starting live documentation server with auto-reload..."
@echo "Server will be available at http://localhost:8000"
@echo "Press Ctrl+C to stop"
@sphinx-autobuild "$(SOURCEDIR)" "$(BUILDDIR)/html" --port 8000 --host 0.0.0.0 --open-browser

# 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)
149 changes: 149 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
# djangocms-rest Documentation

This directory contains the documentation for djangocms-rest, built with Sphinx.

## Setup

### Using Poetry (Recommended)

```bash
# From project root, install all dependencies including docs
poetry install --with dev

# Navigate to the docs directory
cd docs

# Build the documentation
make html
```

### Alternative: Using pip

```bash
# From project root, install development dependencies
pip install -e ".[dev]"

# Navigate to the docs directory
cd docs

# Build the documentation
make html
```

## Building Documentation

### Build HTML Documentation

```bash
# Build the documentation
make html

# Or use sphinx-build directly
sphinx-build -b html . _build/html
```

### View Documentation Locally

```bash
# Build and serve documentation
make serve

# Or build and open in browser
make html
make open
```

### Development Mode with Live Reload

```bash
# Start live documentation server with auto-reload (recommended)
sh live.sh

# Or run sphinx-autobuild directly
poetry run sphinx-autobuild . _build/html --port 8000 --host 0.0.0.0 --open-browser

# Build with warnings treated as errors
make dev

# Watch for changes and rebuild automatically
make watch
```

## Available Make Targets

- `make html` - Build HTML documentation
- `make clean` - Clean build directory
- `make serve` - Serve documentation on http://localhost:8000
- `make open` - Open documentation in browser
- `make live` - Start live server with auto-reload (recommended for development)
- `make dev` - Build in development mode with warnings
- `make watch` - Watch for changes and rebuild automatically
- `make help` - Show all available targets

## Documentation Structure

The documentation is organized into logical sections:

### Tutorial
- `tutorial/01-quickstart.rst` - Quick start guide
- `tutorial/02-installation.rst` - Installation guide
- `tutorial/03-openapi-documentation.rst` - OpenAPI documentation guide

### How-to Guides
- `how-to/01-use-multi-site.rst` - Multi-site configuration guide
- `how-to/02-plugin-creation.rst` - Plugin creation guide

### Reference
- `reference/index.rst` - API overview
- `reference/pages.rst` - Pages API reference
- `reference/languages.rst` - Languages API reference
- `reference/placeholders.rst` - Placeholders API reference
- `reference/plugins.rst` - Plugins API reference
- `reference/menu.rst` - Menu API reference
- `reference/breadcrumbs.rst` - Breadcrumbs API reference
- `reference/submenu.rst` - Submenu API reference

### Additional
- `contributing.rst` - Contributing guide
- `changelog.rst` - Version history

## Configuration

The documentation is configured in `conf.py`. Key settings include:

- **Theme**: Furo theme (modern, clean design with sidebar navigation)
- **Extensions**: autodoc, intersphinx, napoleon, sphinx-tabs, sphinx-copybutton, etc.
- **Intersphinx**: Links to Python, Django, DRF, and django CMS documentation
- **Mock imports**: Django and django CMS modules are mocked for autodoc
- **GitHub Integration**: Source repository links and GitHub icon in footer

## Contributing to Documentation

1. Make changes to the `.rst` files
2. Build the documentation to check for errors: `make html`
3. Test locally: `make serve`
4. Submit a pull request

## Troubleshooting

### Common Issues

**ImportError: No module named 'django'**
- This is expected when building documentation without Django installed
- The `conf.py` file includes mock imports for Django modules

**Sphinx build errors**
- Check that all dependencies are installed: `poetry install --with dev` or `pip install -e ".[dev]"`
- Ensure you're in the `docs` directory when running commands
- Check the build output for specific error messages

**Missing intersphinx links**
- The documentation links to external documentation (Python, Django, etc.)
- These links may not work offline
- This is normal behavior

### Getting Help

- Check the [Sphinx documentation](https://www.sphinx-doc.org/)
- Review the [Read the Docs theme documentation](https://sphinx-rtd-theme.readthedocs.io/)
- Open an issue on the project repository
2 changes: 2 additions & 0 deletions docs/_static/.gitkeep
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# This file ensures the _static directory is tracked by git
# Sphinx will populate this directory with static assets during build
145 changes: 145 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
=========
Changelog
=========

.. changelog::
:towncrier: ../

0.8.1 (2025-08-29)
==================

Bugfixes
--------

* fix: Package data not included in wheel (#48)

0.8.0 (2025-08-28)
==================

Features
--------

* feat: Add comprehensive documentation for django CMS REST
* feat: Add menu endpoints (#49)
* feat: Add RESTRenderer (#42)
* feat: frontend URL handling with absolute URL generation. (#36)
* feat: extend page serializer with additional page fields (#35)
* feat: add public language support (#27)
* feat: update code to support Django CMS 5 (#29)
* feat: Refactoring for improved Open API & typing support (allows: automatic schema generation) (#20)

Bugfixes
--------

* fix: Enable caching for placeholder serialization and rendering. (#31)
* fix: open api schema validation (#34)
* fix: Update test requirements (#25)
* fix: Update github actions and readme (#12)

Documentation
-------------

* docs: Update documentation references from "django CMS REST" to "djangocms-rest"
* docs: Update readme (#39)
* docs: update docs (#26)
* docs: initial project outline

0.1.0 (2024-05-24)
==================

Features
--------

* Initial commit with basic functionality for placeholders
* Restructure api
* Optionally include HTML in placeholder responses
* Respect page viewing permissions
* Add first test
* Code refactoring
* Fix: page detail by path
* View naming convention cms-model-list/detail
* Update language list url name
* Update rendering test

Bugfixes
--------

* Fix: Language endpoint offers pages list
* Fix test actions
* Fix ruff issues
* Update action to upload codecov
* Update .coveragerc

Documentation
-------------

* Docs
* Update readme
* Update README.md

Development
-----------

* Bump codecov/codecov-action from 4.0.1 to 4.4.1
* Bump codecov/codecov-action from 4.4.1 to 4.5.0
* Bump codecov/codecov-action from 4.5.0 to 4.6.0
* Bump codecov/codecov-action from 4.6.0 to 5.0.2
* Bump codecov/codecov-action from 5.0.2 to 5.3.1
* Bump codecov/codecov-action from 5.3.1 to 5.4.0
* Bump codecov/codecov-action from 5.4.0 to 5.4.2
* Bump codecov/codecov-action from 5.4.2 to 5.4.3
* Bump codecov/codecov-action from 5.4.3 to 5.5.0
* Bump codecov/codecov-action from 5.5.0 to 5.5.1
* change supported version of `django-cms` (#22)
* fix: remove Node.js setup and frontend build from workflow (#28)
* chore: Add django CMS 4.1 support, simplify preview views/ruff format (#40)
* chore(deps): bump actions/checkout from 4 to 5 (#43)
* chore(deps): bump actions/setup-python from 5 to 6 (#52)
* chore(deps): bump codecov/codecov-action from 5.5.0 to 5.5.1 (#51)
* chore: Update documentation configuration and checks
* chore: Bump version from 0.1.0a to 0.8.0 (#46)
* chore: Update readme (#47)
* fix: pyproject.toml
* update pyproj.toml
* Upodate version number
* Update test.yml

Recent Development (2025-10-18)
==============================

Documentation
-------------

* docs: revise contributing guidelines to emphasize community involvement and streamline setup instructions
* docs: refine multi-site guide and installation documentation, enhance language endpoint descriptions, and add planned guides section
* docs: enhance multi-site and quickstart guides with CORS clarification and updated API testing instructions
* docs: update endpoint headings for consistency and enhance multi-site installation instructions
* docs: standardize API section headings and update endpoint descriptions for clarity
* docs: update API documentation to reflect port change to 8080 for local testing
* docs: update documentation structure and content, including new quick start guide and plugin creation instructions
* docs: update multi-site guide with detailed setup instructions and Vue.js example
* docs: enhance multi-site usage guide with Vue.js example and additional resources
* docs: update API endpoint URLs in documentation to use port 8080
* docs: imrove api references
* docs: fix typo in installation instructions
* docs: simplify installation instructions
* docs: improved installation instructions, and minor doc fixes
* docs: Enhance index documentation with motivation and key features
* docs: Update and expand API documentation for various endpoints
* docs: Add `preview` query parameter to API documentation for pages and languages
* docs: Refactor API documentation for languages and pages endpoints

Features
--------

* feat: add OpenAPI support for "preview" query parameter (#53)
* feat: add OpenAPI schema decorator for `MenuView` and include `namespace` in `NavigationNodeSerializer`
* feat: add site middleware (#50)

Bugfixes
--------

* fix: update `child` field in `NavigationNodeListSerializer` to accept multiple instances
* fix: wrap menu serializer data with return_key in `MenuView` response
* fix: exclude method_schema_decorator from test coverage
* fix: mark method_schema_decorator and related lines as uncovered
Loading