From 767dbf96e1d08c777b3bc5096debf0ed01430381 Mon Sep 17 00:00:00 2001 From: Archmonger <16909269+Archmonger@users.noreply.github.com> Date: Fri, 20 Sep 2024 18:08:10 -0700 Subject: [PATCH] docs changes --- CHANGELOG.md | 4 ++-- docs/mkdocs.yml | 4 ++-- docs/src/django-settings.md | 2 +- docs/src/django.md | 9 ++++----- docs/src/quick-start.md | 1 - 5 files changed, 9 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 350aa31f..f2987832 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,13 +40,13 @@ Using the following categories, list your changes in this order: ### Fixed -- Fix crash when running `manage.py collectstatic` if Django's `settings.py:STATIC_ROOT` is a `Path` object. +- Fix crash when running `manage.py collectstatic` when Django's `settings.py:STATIC_ROOT` is a `Path` object. ## [2.0.0](https://github.com/Archmonger/ServeStatic/compare/1.2.0...2.0.0) - 2024-09-12 ### Added -- Django `settings.py:SERVESTATIC_USE_MANIFEST` utilize the Django manifest rather than scanning the filesystem. +- Django `settings.py:SERVESTATIC_USE_MANIFEST` will allow ServeStatic to use the Django manifest rather than scanning the filesystem. - When also using ServeStatic's `CompressedManifestStaticFilesStorage` backend, ServeStatic will no longer need to call `os.stat`. ### Changed diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index 49ea5488..737aed7f 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -98,9 +98,9 @@ watch: - ../LICENSE.md site_name: ServeStatic -site_author: Archmonger +site_author: Mark Bakhit (Archmonger) site_description: Production-grade static file server for Python web apps. -copyright: '©
Archmonger' +copyright: '©
Mark Bakhit (Archmonger)' repo_url: https://github.com/Archmonger/ServeStatic site_url: https://archmonger.github.io/ServeStatic/ repo_name: ServeStatic (GitHub) diff --git a/docs/src/django-settings.md b/docs/src/django-settings.md index 8efbf6ce..c2d02db9 100644 --- a/docs/src/django-settings.md +++ b/docs/src/django-settings.md @@ -30,7 +30,7 @@ Find and serve files using Django's manifest file. This is the most efficient way to determine what files are available, but it requires that you are using a [manifest-compatible](https://docs.djangoproject.com/en/stable/ref/contrib/staticfiles/#manifeststaticfilesstorage) storage backend. -When using ServeStatic's [`CompressedManifestStaticFilesStorage`](./django.md#step-2-add-compression-and-caching-support) storage backend, ServeStatic will no longer need to call `os.stat` on each file during startup which improves startup speeds. +When using ServeStatic's [`CompressedManifestStaticFilesStorage`](./django.md#step-2-add-compression-and-caching-support) storage backend, ServeStatic will no longer need to call `os.stat` on each file during startup. --- diff --git a/docs/src/django.md b/docs/src/django.md index 7d52344a..2dc4a3ee 100644 --- a/docs/src/django.md +++ b/docs/src/django.md @@ -10,10 +10,9 @@ Edit your `settings.py` file and add ServeStatic to the `MIDDLEWARE` list. The S ```python linenums="0" MIDDLEWARE = [ - ..., "django.middleware.security.SecurityMiddleware", "servestatic.middleware.ServeStaticMiddleware", - ..., + # ... ] ``` @@ -29,7 +28,7 @@ ServeStatic comes with a storage backend which compresses your files and hashes ```python linenums="0" STORAGES = { - ..., + # ... "staticfiles": { "BACKEND": "servestatic.storage.CompressedManifestStaticFilesStorage", }, @@ -146,9 +145,9 @@ You can disable Django's static file handling and allow ServeStatic to take over ```python linenums="0" INSTALLED_APPS = [ - ..., + # ... "servestatic.runserver_nostatic", "django.contrib.staticfiles", - ..., + # ... ] ``` diff --git a/docs/src/quick-start.md b/docs/src/quick-start.md index a896290a..1bc374af 100644 --- a/docs/src/quick-start.md +++ b/docs/src/quick-start.md @@ -16,7 +16,6 @@ Edit your `settings.py` file and add `ServeStatic` to the `MIDDLEWARE` list, abo ```python linenums="0" MIDDLEWARE = [ - # ... "django.middleware.security.SecurityMiddleware", "servestatic.middleware.ServeStaticMiddleware", # ...