diff --git a/HIG/requirements.txt b/HIG/requirements.txt deleted file mode 100644 index 5def7b8..0000000 --- a/HIG/requirements.txt +++ /dev/null @@ -1,21 +0,0 @@ -alabaster==0.7.10 -Babel==2.5.3 -certifi==2018.1.18 -chardet==3.0.4 -docutils==0.14 -idna==2.6 -imagesize==1.0.0 -Jinja2==2.10 -MarkupSafe==1.0 -packaging==16.8 -Pygments==2.2.0 -pyparsing==2.2.0 -pytz==2018.3 -requests==2.18.4 -six==1.11.0 -snowballstemmer==1.2.1 -Sphinx==1.7.0 -sphinx-rtd-theme==0.2.4 -sphinxcontrib-websupport==1.0.1 -urllib3==1.22 -sphinxcontrib-doxylink==1.6.1 diff --git a/HIG/source/resources/contribute.rst b/HIG/source/resources/contribute.rst index 03abd5b..f8911a4 100644 --- a/HIG/source/resources/contribute.rst +++ b/HIG/source/resources/contribute.rst @@ -1,223 +1,213 @@ Contribute ========== The HIG is written in `reStructuredText `_, a lightweight markup language. For example the chapter heading together with the first paragraph looks like this in reStructuredText .. code-block:: rst Contribute ========== The HIG is written in `reStructuredText `_, a light weight markup language. For example the chapter heading together with the first paragraph looks like this in reStructuredText The restructuredText of the full HIG is organized into several source files. You can view and modify these source files with any text editor. The source files are hosted in a `Git repo `_. `Sphinx `_ is used to generate HTML pages from these source files. Tasks and changes are organized via `https://invent.kde.org `_. .. note:: On every page of the HIG, there is a *View page source* link in the top right corner. For more information and help you can find us on `Matrix `_, `IRC `_ or `Telegram `_ . If you are new to KDE devlopment, make sure to read `how to become a kde developer `_ first. Getting Started --------------- #. Install some tools with your distro's package manager: ================================== ================================ Distribution Command ================================== ================================ -Arch, Manjaro ``sudo pacman -S git make`` -Debian, Ubuntu, KDE Neon ``sudo apt install git make`` -openSUSE ``sudo zypper install git make`` -Fedora ``sudo dnf install git make`` -CentOS/RHEL ``sudo yum install git make`` +Arch, Manjaro ``sudo pacman -S git make python`` +Debian, Ubuntu, KDE Neon ``sudo apt install git make python3`` +openSUSE ``sudo zypper install git make python3`` +Fedora ``sudo dnf install git make python3`` +CentOS/RHEL ``sudo yum install git make python3`` ================================== ================================ #. Clone the HIG source code repository into an empty folder: .. code-block:: sh git clone https://invent.kde.org/websites/hig-kde-org.git cd hig-kde-org - -#. Install some tools with Python's package manager, Pip. Pip should already be - Installed, but if for some reason it is not, here are instructions for - getting it: https://pip.pypa.io/en/stable/installing/ - - You can use Pip to install the required python modules either globally: - - .. code-block:: sh - sudo pip install -r HIG/requirements.txt +#. Create a Python 3 virtual environment, enable it and install the + requirements from ``requirements.lock`` into it: - ...or in your home directory: - - .. code-block:: sh + .. code-block:: sh - pip install -r HIG/requirements.txt --user - - If you install it in you home directory, make sure you have the - installed packages in your path by adding it to your .profile: + python3 -m venv venv + . venv/bin/activate + pip install -r requirements.lock - .. code-block:: sh +Now you are ready to contribute to the HIG! To preview changes on your local +machine, enter the directory of a website (``HIG`` or ``Kirigami``) and use +``make`` to generate the HTML version of the documentation. For example: - echo "PATH=~/.local/lib:\$PATH" >> ~/.profile - source ~/.profile +.. code-block:: sh - -Now you are ready to contribute to the HIG! To preview changes on your local -machine, do the following: + cd HIG + make html + +You will find the documentation inside ``build/html`` within the corresponding +website directory. Open ``build/html/index.html`` in your browser (e.g. run +``xdg-open build/html/index.html``) -#. Enter the HIG directory with ``cd HIG`` -#. Run ``make html`` to create the HTML pages -#. Open ``build/html/index.html`` in your browser (e.g. run - ``firefox build/html/index.html``) Page Structure -------------- This defines the structure that should be used for writing pattern and component pages for the HIG. Pattern ^^^^^^^ :: Pattern name ============== Give a short into into the pattern. Examples -------- Showcase the pattern with videos or images. When to use ----------- Describe when to use this pattern and when not to use it. How to use ---------- Describe how to use this pattern. Pages about patterns should not include any details on implementation, about behavior or appearance, but rather link to the corresponding components needed to implement a pattern. Optional: you can add subsections for desktop and mobile. :: When to use ----------- Desktop ^^^^^^^ Mobile ^^^^^^ Component ^^^^^^^^^ :: Component name ============== Purpose ------- A very short description on why and how to use the component. This should primarily link to the corresponding pattern pages. Example ------- Showcase the component with a video or image. Guidelines ---------- Is this the right control ~~~~~~~~~~~~~~~~~~~~~~~~~ Describe when to use a component and when not. Behavior ~~~~~~~~ Describe the behavior of the component. Appearance ~~~~~~~~~~ Describe the appearance of the component. Code ---- Kirigami ~~~~~~~~ Link to the API and example code how to use the component with QML and Kirigami. Qt Widgets ~~~~~~~~~~ Link to the API and example code how to use the component with Qt Widgets. Optional: you can add subsections for desktop and mobile. :: Behavior ~~~~~~~~ Desktop """"""" Mobile """""" Code Examples ------------- Adding examples to the HIG is very easy. #. Add a file with source code in the ``./examples/`` folder. #. Add the following markup at the point you want to insert the example: .. code-block:: rst .. literalinclude:: /../../examples/kirigami/InlineMessage.qml :language: qml Creating media -------------- See :doc:`media` on how to create media files for the HIG. diff --git a/Kirigami/requirements.txt b/Kirigami/requirements.txt deleted file mode 100644 index 5def7b8..0000000 --- a/Kirigami/requirements.txt +++ /dev/null @@ -1,21 +0,0 @@ -alabaster==0.7.10 -Babel==2.5.3 -certifi==2018.1.18 -chardet==3.0.4 -docutils==0.14 -idna==2.6 -imagesize==1.0.0 -Jinja2==2.10 -MarkupSafe==1.0 -packaging==16.8 -Pygments==2.2.0 -pyparsing==2.2.0 -pytz==2018.3 -requests==2.18.4 -six==1.11.0 -snowballstemmer==1.2.1 -Sphinx==1.7.0 -sphinx-rtd-theme==0.2.4 -sphinxcontrib-websupport==1.0.1 -urllib3==1.22 -sphinxcontrib-doxylink==1.6.1 diff --git a/requirements.lock b/requirements.lock new file mode 100644 index 0000000..022623d --- /dev/null +++ b/requirements.lock @@ -0,0 +1,27 @@ +alabaster==0.7.12 +Babel==2.7.0 +certifi==2019.9.11 +chardet==3.0.4 +docutils==0.15.2 +idna==2.8 +imagesize==1.1.0 +Jinja2==2.10.3 +MarkupSafe==1.1.1 +packaging==19.2 +Pygments==2.4.2 +pyparsing==2.4.2 +pytz==2019.3 +requests==2.22.0 +six==1.12.0 +snowballstemmer==2.0.0 +Sphinx==2.2.0 +sphinx-rtd-theme==0.4.3 +sphinxcontrib-applehelp==1.0.1 +sphinxcontrib-devhelp==1.0.1 +sphinxcontrib-doxylink==1.6.1 +sphinxcontrib-htmlhelp==1.0.2 +sphinxcontrib-jsmath==1.0.1 +sphinxcontrib-qthelp==1.0.2 +sphinxcontrib-serializinghtml==1.1.3 +sphinxcontrib-websupport==1.1.2 +urllib3==1.25.6 diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..854feaa --- /dev/null +++ b/requirements.txt @@ -0,0 +1,4 @@ +Sphinx +sphinx-rtd-theme +sphinxcontrib-doxylink +sphinxcontrib-websupport