-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add documentation for media storage filesystem
- Loading branch information
George Babarus
committed
May 22, 2020
0 parents
commit 431bc24
Showing
26 changed files
with
742 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
venv | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 = source | ||
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
.. role:: raw-html-m2r(raw) | ||
:format: html | ||
|
||
Introduction | ||
============ | ||
|
||
Storing media files involve some work when you decide to scale horizontally. | ||
Also having to care about disk space and disk mounting may be useless when you are already using cloud infrastructure. | ||
|
||
Using cloud storage like Amazon S3 Storage, Azure Blob Storage, or Google Cloud Storage should be easy to configure and use. | ||
|
||
See bellow some of the key advantages of using this Magento 2 extension to integrate with various cloud file storage systems in a platform agnostic manner. | ||
|
||
Author | ||
====== | ||
|
||
`George Babarus <https://github.com/georgebabarus>`_ | ||
|
||
|
||
Useful links | ||
============ | ||
|
||
* https://aws.amazon.com/s3/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
@ECHO OFF | ||
|
||
pushd %~dp0 | ||
|
||
REM Command file for Sphinx documentation | ||
|
||
if "%SPHINXBUILD%" == "" ( | ||
set SPHINXBUILD=sphinx-build | ||
) | ||
set SOURCEDIR=source | ||
set BUILDDIR=build | ||
|
||
if "%1" == "" goto help | ||
|
||
%SPHINXBUILD% >NUL 2>NUL | ||
if errorlevel 9009 ( | ||
echo. | ||
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx | ||
echo.installed, then set the SPHINXBUILD environment variable to point | ||
echo.to the full path of the 'sphinx-build' executable. Alternatively you | ||
echo.may add the Sphinx directory to PATH. | ||
echo. | ||
echo.If you don't have Sphinx installed, grab it from | ||
echo.http://sphinx-doc.org/ | ||
exit /b 1 | ||
) | ||
|
||
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% | ||
goto end | ||
|
||
:help | ||
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% | ||
|
||
:end | ||
popd |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
SPHINXOPTS = | ||
SPHINXBUILD = sphinx-build | ||
SPHINXPROJ = ReadtheDocsSphinxTheme | ||
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) |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<!-- Global site tag (gtag.js) - Google Analytics --> | ||
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-54395432-3"></script> | ||
<script> | ||
window.dataLayer = window.dataLayer || []; | ||
function gtag(){dataLayer.push(arguments);} | ||
gtag('js', new Date()); | ||
|
||
gtag('config', 'UA-54395432-3'); | ||
</script> |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
|
||
******************************************* | ||
Architecture | ||
******************************************* | ||
|
||
.. contents:: Table of Contents | ||
|
||
Extension architecture | ||
================================ | ||
|
||
.. image:: static/upload-image.png | ||
:alt: Upload image for product or CMS blocks | ||
|
||
|
||
.. thumbnail:: static/upload-image.png | ||
|
||
|
||
.. raw:: html | ||
:file: ./../_static/analytics.html |
134 changes: 134 additions & 0 deletions
134
docs/source/architecture/static/logo-wordmark-light.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
********* | ||
Changelog | ||
********* | ||
|
||
master | ||
====== | ||
|
||
New Features | ||
------------- | ||
|
||
Fixes | ||
----- | ||
|
||
Other Changes | ||
-------------- | ||
|
||
v0.0.1 | ||
====== | ||
* This version contain only minimum code base to prove that Cloud storage service could easily and fully integrate in Magento 2 without any need for disk storage on application server. | ||
|
||
New Features | ||
------------- | ||
* Media storage driver for Amazon S3 | ||
* Magento core changes to improve filesystem abstraction | ||
|
||
Other Changes | ||
-------------- | ||
* Documentation created | ||
|
||
|
||
.. raw:: html | ||
:file: _static/analytics.html | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
import sys | ||
import os | ||
import re | ||
|
||
if not 'READTHEDOCS' in os.environ: | ||
sys.path.insert(0, os.path.abspath('..')) | ||
sys.path.append(os.path.abspath('./customization/')) | ||
|
||
from sphinx.locale import _ | ||
from sphinx_rtd_theme import __version__ | ||
import recommonmark | ||
from recommonmark.transform import AutoStructify | ||
|
||
project = u'Magento 2 Filesystem Storage' | ||
slug = re.sub(r'\W+', '-', project.lower()) | ||
version = __version__ | ||
release = __version__ | ||
author = u'George Babarus' | ||
copyright = author | ||
language = 'en' | ||
|
||
extensions = [ | ||
'sphinx.ext.intersphinx', | ||
'sphinx.ext.autodoc', | ||
'sphinx.ext.mathjax', | ||
'sphinx.ext.viewcode', | ||
'sphinxcontrib.httpdomain', | ||
'sphinx_rtd_theme', | ||
'recommonmark', | ||
'sphinxcontrib-images' | ||
] | ||
|
||
autosectionlabel_prefix_document = True | ||
|
||
templates_path = ['_templates'] | ||
html_static_path = ['_static'] | ||
|
||
source_suffix = { | ||
'.rst': 'restructuredtext', | ||
'.txt': 'markdown', | ||
'.md': 'markdown', | ||
} | ||
|
||
source_parsers = { | ||
} | ||
|
||
exclude_patterns = [ | ||
'requirements.txt' | ||
] | ||
locale_dirs = ['locale/'] | ||
gettext_compact = False | ||
|
||
master_doc = 'index' | ||
suppress_warnings = ['image.nonlocal_uri'] | ||
pygments_style = 'default' | ||
|
||
intersphinx_mapping = { | ||
'rtd': ('https://docs.readthedocs.io/en/latest/', None), | ||
'sphinx': ('http://www.sphinx-doc.org/en/stable/', None), | ||
} | ||
|
||
html_theme = 'sphinx_rtd_theme' | ||
html_theme_options = { | ||
'logo_only': True, | ||
'navigation_depth': 5, | ||
'analytics_id': 'UA-54395432-3' | ||
} | ||
html_theme_path = ["../.."] | ||
html_logo = "customization/static/logo-wordmark-light.svg" | ||
html_show_sourcelink = True | ||
|
||
htmlhelp_basename = slug | ||
|
||
|
||
latex_documents = [ | ||
('index', '{0}.tex'.format(slug), project, author, 'manual'), | ||
] | ||
|
||
man_pages = [ | ||
('index', slug, project, [author], 1) | ||
] | ||
|
||
texinfo_documents = [ | ||
('index', slug, project, author, slug, project, 'Miscellaneous'), | ||
] | ||
|
||
|
||
# Extensions to theme docs | ||
def setup(app): | ||
from sphinx.domains.python import PyField | ||
from sphinx.util.docfields import Field | ||
|
||
app.add_object_type( | ||
'confval', | ||
'confval', | ||
objname='configuration value', | ||
indextemplate='pair: %s; configuration value', | ||
doc_field_types=[ | ||
PyField( | ||
'type', | ||
label=_('Type'), | ||
has_arg=False, | ||
names=('type',), | ||
bodyrolename='class' | ||
), | ||
Field( | ||
'default', | ||
label=_('Default'), | ||
has_arg=False, | ||
names=('default',), | ||
), | ||
] | ||
) | ||
app.add_config_value('recommonmark_config', { | ||
# 'url_resolver': lambda url: github_doc_root + url, | ||
'auto_toc_tree_section': 'Contents', | ||
'enable_math': False, | ||
'enable_inline_math': False, | ||
'enable_eval_rst': True, | ||
}, True) | ||
app.add_transform(AutoStructify) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
************* | ||
Configuration | ||
************* | ||
|
||
.. contents:: Table of Contents | ||
|
||
|
||
Configuration files | ||
=================== | ||
|
||
.. raw:: html | ||
:file: _static/analytics.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
|
||
******************************************* | ||
Extend filesystem to achieve more from shop | ||
******************************************* | ||
|
||
.. contents:: Table of Contents | ||
|
||
Built with extensibility in mind | ||
================================ | ||
|
||
|
||
.. raw:: html | ||
:file: ./../_static/analytics.html |
Oops, something went wrong.