Skip to content

Commit

Permalink
Add installation docs
Browse files Browse the repository at this point in the history
  • Loading branch information
hypeJunction committed Jun 29, 2018
1 parent b8fe139 commit 83beccd
Show file tree
Hide file tree
Showing 8 changed files with 90 additions and 104 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@
/mod

/vendor
/docs/_build

27 changes: 1 addition & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,4 @@
hypeJunctionPro Starter Project
===============================

This is a quickstart skeleton for building a site based on Elgg 3.x and hypeJunction Pro plugins


## Installation

```sh
## Add your Private Packagist credentials to global config
## You can find your username and token by logging into https://packagist.com/

composer config --global --auth http-basic.repo.packagist.com <username> <token>
```

```sh
## Create a new Elgg project with hypeJunction Pro plugins pre-installed

cd /path/to/root/

composer self-update

composer global require fxp/composer-asset-plugin

composer create-project hypejunction/hypejunction:dev-master ./project-name

composer install
composer install # 2nd call is currently required
```
Read the docs at https://hypejunction.readthedocs.io/
35 changes: 10 additions & 25 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = build
BUILDDIR = _build

# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
Expand All @@ -15,11 +15,11 @@ endif
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .

.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest coverage gettext
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext

help:
@echo "Please use \`make <target>' where <target> is one of"
Expand All @@ -30,7 +30,6 @@ help:
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " qthelp to make HTML files and a qthelp project"
@echo " applehelp to make an Apple Help Book"
@echo " devhelp to make HTML files and a Devhelp project"
@echo " epub to make an epub"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
Expand All @@ -46,7 +45,6 @@ help:
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
@echo " coverage to run coverage check of the documentation (if enabled)"

clean:
rm -rf $(BUILDDIR)/*
Expand Down Expand Up @@ -87,25 +85,17 @@ qthelp:
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/hypeJunction.qhcp"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Elgg.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/hypeJunction.qhc"

applehelp:
$(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
@echo
@echo "Build finished. The help book is in $(BUILDDIR)/applehelp."
@echo "N.B. You won't be able to view it unless you put it in" \
"~/Library/Documentation/Help or install it in your application" \
"bundle."
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Elgg.qhc"

devhelp:
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/hypeJunction"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/hypeJunction"
@echo "# mkdir -p $$HOME/.local/share/devhelp/Elgg"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Elgg"
@echo "# devhelp"

epub:
Expand Down Expand Up @@ -156,9 +146,9 @@ info:
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."

gettext:
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) locale/pot
@echo
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
@echo "Build finished. The message catalogs are in locale/pot."

changes:
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
Expand All @@ -176,11 +166,6 @@ doctest:
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."

coverage:
$(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage
@echo "Testing of coverage in the sources finished, look at the " \
"results in $(BUILDDIR)/coverage/python.txt."

xml:
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
@echo
Expand Down
15 changes: 12 additions & 3 deletions docs/source/conf.py → docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
import sys
import os
import shlex
from sphinx.highlighting import lexers
from pygments.lexers.web import PhpLexer

# 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
Expand Down Expand Up @@ -75,7 +77,7 @@

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = []
exclude_patterns = ['_build']

# The reST default role (used for this markup: `text`) to use for all
# documents.
Expand All @@ -102,14 +104,21 @@
#keep_warnings = False

# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False
#todo_include_todos = False

# Support parsing PHP out of <?php ?> by default
lexers['php'] = PhpLexer(startinline=True)
lexers['php-annotations'] = PhpLexer(startinline=True)
lexers['php-standalone'] = PhpLexer(startinline=True)

# use PHP as the primary domain
primary_domain = 'php'

# -- 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 = 'bootstrap'
#html_theme = 'default'

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
Expand Down
9 changes: 9 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
hypeJunction
============

Build modern social media applications with an ever-growing collection of high-quality plugins for Elgg 3+

.. toctree::
:maxdepth: 2

install
49 changes: 49 additions & 0 deletions docs/install.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
Installation
============

Using Composer
~~~~~~~~~~~~~~

To use composer, you need to have an active subscription that gives you access to Private Packagist, where hypeJunction plugins are hosted.

.. code::
## Add your Private Packagist credentials to global config
## You can find your username and token by logging into https://packagist.com/
composer config --global --auth http-basic.repo.packagist.com <username> <token>
New Project
~~~~~~~~~~~

The easiest way to create an Elgg project with hypeJunction plugins installed is by running the following commands.

.. code::
## Create a new Elgg project with hypeJunction Pro plugins pre-installed
composer create-project hypejunction/hypejunction:dev-master ./project-name
cd ./project-name
composer install
composer install # 2nd call is currently required
Existing Project
~~~~~~~~~~~~~~~~

You can add plugins to an existing project, using

.. code::
composer install hypejunction/<plugin_name>
Additional Info
~~~~~~~~~~~~~~~

Learn about installation in `Elgg docs`_.

.. _Elgg docs: https://learn.elgg.org/
35 changes: 7 additions & 28 deletions docs/make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set BUILDDIR=build
set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% source
set I18NSPHINXOPTS=%SPHINXOPTS% source
set BUILDDIR=_build
set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
set I18NSPHINXOPTS=%SPHINXOPTS% .
if NOT "%PAPER%" == "" (
set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
Expand Down Expand Up @@ -37,7 +37,6 @@ if "%1" == "help" (
echo. pseudoxml to make pseudoxml-XML files for display purposes
echo. linkcheck to check all external links for integrity
echo. doctest to run all doctests embedded in the documentation if enabled
echo. coverage to run coverage check of the documentation if enabled
goto end
)

Expand All @@ -48,14 +47,6 @@ if "%1" == "clean" (
)


REM Check if sphinx-build is available and fallback to Python version if any
%SPHINXBUILD% 2> nul
if errorlevel 9009 goto sphinx_python
goto sphinx_ok

:sphinx_python

set SPHINXBUILD=python -m sphinx.__init__
%SPHINXBUILD% 2> nul
if errorlevel 9009 (
echo.
Expand All @@ -69,9 +60,6 @@ if errorlevel 9009 (
exit /b 1
)

:sphinx_ok


if "%1" == "html" (
%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
if errorlevel 1 exit /b 1
Expand Down Expand Up @@ -127,9 +115,9 @@ if "%1" == "qthelp" (
echo.
echo.Build finished; now you can run "qcollectiongenerator" with the ^
.qhcp project file in %BUILDDIR%/qthelp, like this:
echo.^> qcollectiongenerator %BUILDDIR%\qthelp\hypeJunction.qhcp
echo.^> qcollectiongenerator %BUILDDIR%\qthelp\Elgg.qhcp
echo.To view the help file:
echo.^> assistant -collectionFile %BUILDDIR%\qthelp\hypeJunction.ghc
echo.^> assistant -collectionFile %BUILDDIR%\qthelp\Elgg.ghc
goto end
)

Expand Down Expand Up @@ -161,7 +149,7 @@ if "%1" == "latexpdf" (
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
cd %BUILDDIR%/latex
make all-pdf
cd %~dp0
cd %BUILDDIR%/..
echo.
echo.Build finished; the PDF files are in %BUILDDIR%/latex.
goto end
Expand All @@ -171,7 +159,7 @@ if "%1" == "latexpdfja" (
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
cd %BUILDDIR%/latex
make all-pdf-ja
cd %~dp0
cd %BUILDDIR%/..
echo.
echo.Build finished; the PDF files are in %BUILDDIR%/latex.
goto end
Expand Down Expand Up @@ -235,15 +223,6 @@ results in %BUILDDIR%/doctest/output.txt.
goto end
)

if "%1" == "coverage" (
%SPHINXBUILD% -b coverage %ALLSPHINXOPTS% %BUILDDIR%/coverage
if errorlevel 1 exit /b 1
echo.
echo.Testing of coverage in the sources finished, look at the ^
results in %BUILDDIR%/coverage/python.txt.
goto end
)

if "%1" == "xml" (
%SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml
if errorlevel 1 exit /b 1
Expand Down
22 changes: 0 additions & 22 deletions docs/source/index.rst

This file was deleted.

0 comments on commit 83beccd

Please sign in to comment.