Skip to content

Commit

Permalink
Fix broken links, SEO svg2png, and fix code highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
OttoWinter committed Nov 19, 2018
1 parent d31f08a commit b5ffffe
Show file tree
Hide file tree
Showing 156 changed files with 569 additions and 529 deletions.
15 changes: 3 additions & 12 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,4 @@
---
build:
tags:
- esphomedocs
script:
- make ../esphomelib
- make html
except:
- current
- rc

.deploy: &deploy
tags:
- esphomedocs
Expand All @@ -26,12 +16,13 @@ build:
- git fetch --force [email protected]:${TARGET_REPO}.git gh-pages:gh-pages
- git worktree add _build/html gh-pages
- make ../esphomelib
- touch _build/html/.nojekyll
- echo ${CNAME} >_build/html/CNAME
- make html
- git -C _build/html add --all
- git -C _build/html commit -m "Deploy to gh-pages"
- git -C _build/html push -f [email protected]:${TARGET_REPO}.git gh-pages
cache:
paths:
- _build/doctrees

deploy-release:
<<: *deploy
Expand Down
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
make \
doxygen \
openssh-client \
software-properties-common \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/*

RUN apt-add-repository ppa:inkscape.dev/stable && \
apt-get update && apt-get install -y --no-install-recommends \
inkscape \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/*

RUN pip3 install --no-cache-dir --no-binary :all: \
Expand Down
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ $(ESPHOMELIB_PATH):
git clone --branch $(ESPHOMELIB_TAG) https://github.com/OttoWinter/esphomelib.git $(ESPHOMELIB_PATH); \
fi

deploy: cleanhtml doxyg html $(ESPHOMELIB_PATH)
touch "$(BUILDDIR)/html/.nojekyll"
echo "$(CNAME)" >"$(BUILDDIR)/html/CNAME"
convertimages:
python3 svg2png.py

deploy: cleanhtml doxyg html $(ESPHOMELIB_PATH) convertimages
git -C "$(BUILDDIR)/html" add --all && git -C "$(BUILDDIR)/html" commit -m "Deploy to gh-pages"
@printf "Run \033[0;36mcd $(BUILDDIR)/html && git push origin gh-pages\033[0m to deploy\n"

Expand Down
7 changes: 5 additions & 2 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
'disqus',
'github',
'seo',
'githubpages',
'sitemap',
]

Expand All @@ -67,6 +68,7 @@
# General information about the project.
project = 'esphomelib'
copyright = '2018, Otto Winter'
html_show_copyright = False
author = 'Otto Winter'

# The version info for the project you're documenting, acts as replacement for
Expand Down Expand Up @@ -94,9 +96,9 @@
# default_role = 'cpp:any'

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
pygments_style = 'xcode'

# highlight_language = 'yaml'
highlight_language = 'yaml'

primary_domain = None

Expand Down Expand Up @@ -210,3 +212,4 @@
'Miscellaneous'),
]
html_baseurl = os.getenv('BASE_URL', 'https://esphomelib.com')
linkcheck_ignore = [r'https://github.com/.*', r'https://discord.gg/.*']
2 changes: 1 addition & 1 deletion esphomeyaml/changelog/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ New Features
- The current esphomelib version and compilation time are now printed on each boot
(:libpr:`189`, :yamlpr:`159`):

.. code:: bash
.. code-block:: text
[13:57:33][I][application:092]: You're running esphomelib v1.9.0 compiled on Nov 3 2018, 13:55:11
Expand Down
4 changes: 2 additions & 2 deletions esphomeyaml/changelog/v1.7.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ Breaking Changes
parameter. The accuracy now defaults to ``HIGH``.
- The ``inverted`` option of binary sensors has been moved into the ``filters:`` section. So instead of

.. code:: yaml
.. code-block:: yaml
binary_sensor:
- platform: ...
Expand All @@ -103,7 +103,7 @@ Breaking Changes
you would now write:

.. code:: yaml
.. code-block:: yaml
binary_sensor:
- platform: ...
Expand Down
6 changes: 3 additions & 3 deletions esphomeyaml/changelog/v1.8.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ Other notable changes

- In actions, instead of

.. code:: yaml
.. code-block:: yaml
on_...:
then:
Expand All @@ -130,15 +130,15 @@ Other notable changes

You can now write:

.. code:: yaml
.. code-block:: yaml
on_...:
then:
- switch.turn_on: my_switch

Or even shorter:

.. code:: yaml
.. code-block:: yaml
on_...:
- switch.turn_on: my_switch
Expand Down
2 changes: 1 addition & 1 deletion esphomeyaml/components/ads1115.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ To use this hub, first setup the :ref:`I²C Bus <i2c>` and connect the sensor to

.. _Adafruit: https://www.adafruit.com/product/1085

.. code:: yaml
.. code-block:: yaml
ads1115:
- address: 0x48
Expand Down
6 changes: 3 additions & 3 deletions esphomeyaml/components/binary_sensor/esp32_ble_tracker.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ESP32 Bluetooth Low Energy Device

.. seo::
:description: Instructions for setting up BLE binary sensors for the ESP32.
:image: bluetooth.svg
:image: bluetooth.png

The ``esp32_ble_tracker`` binary sensor platform lets you track the presence of a
bluetooth low energy device.
Expand All @@ -12,7 +12,7 @@ bluetooth low energy device.
:align: center
:width: 80.0%

.. code:: yaml
.. code-block:: yaml
# Example configuration entry
esp32_ble_tracker:
Expand Down Expand Up @@ -44,7 +44,7 @@ to track. Most devices show this screen in some setting menu. If you don't know
however, you can use the ``esp32_ble_tracker`` hub without any binary sensors attached and read through
the logs to see discovered Bluetooth Low Energy devices.

.. code:: yaml
.. code-block:: yaml
# Example configuration entry for finding MAC addresses
esp32_ble_tracker:
Expand Down
6 changes: 3 additions & 3 deletions esphomeyaml/components/binary_sensor/esp32_touch.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ESP32 Touch Pad Binary Sensor

.. seo::
:description: Instructions for setting up the touch pad on the ESP32.
:image: touch.svg
:image: touch.png

The ``esp32_touch`` binary sensor platform lets you use the touch peripheral of the
ESP32 to detect if a certain pin is being "touched".
Expand All @@ -17,7 +17,7 @@ an ``OFF`` state.
:align: center
:width: 80.0%

.. code:: yaml
.. code-block:: yaml
# Example configuration entry
esp32_touch:
Expand Down Expand Up @@ -72,7 +72,7 @@ to output measured values using the ``setup_mode:`` configuration option. Next,
for the touch pads you want to observe. Also put some threshold in the configuration as seen below
to make the validator happy, we are going to find good thresholds in a moment anyway.

.. code:: yaml
.. code-block:: yaml
# Example configuration entry for finding threshold values
esp32_touch:
Expand Down
12 changes: 6 additions & 6 deletions esphomeyaml/components/binary_sensor/gpio.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ GPIO Binary Sensor

.. seo::
:description: Instructions for setting up GPIO binary sensors with esphomelib.
:image: pin.svg
:image: pin.png

The GPIO Binary Sensor platform allows you to use any input pin on your
device as a binary sensor.
Expand All @@ -12,7 +12,7 @@ device as a binary sensor.
:align: center
:width: 80.0%

.. code:: yaml
.. code-block:: yaml
# Example configuration entry
binary_sensor:
Expand All @@ -35,7 +35,7 @@ Configuration variables:
For some applications such as reed switches you need to set the pin mode to ``INPUT_PULLUP``
like this:

.. code:: yaml
.. code-block:: yaml
binary_sensor:
- platform: gpio
Expand All @@ -50,7 +50,7 @@ Inverting Values
Use the ``inverted`` property of the :ref:`Pin Schema <config-pin_schema>` to invert the binary
sensor:

.. code:: yaml
.. code-block:: yaml
# Example configuration entry
binary_sensor:
Expand All @@ -66,7 +66,7 @@ Debouncing Values
Some binary sensors are a bit unstable and quickly transition between the ON and OFF state while
they're pressed. To fix this and debounce the signal, use the :ref:`binary sensor filters <binary_sensor-filters>`:

.. code:: yaml
.. code-block:: yaml
# Example configuration entry
binary_sensor:
Expand All @@ -80,7 +80,7 @@ Above example will only make the signal go high if the button has stayed high fo
Alternatively, below configuration will make the binary sensor publish an ON value immediately, but
will wait 10ms before publishing an OFF value:

.. code:: yaml
.. code-block:: yaml
# Example configuration entry
binary_sensor:
Expand Down
22 changes: 11 additions & 11 deletions esphomeyaml/components/binary_sensor/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Binary Sensor Component

.. seo::
:description: Information about the base representation of all binary sensors.
:image: folder-open.svg
:image: folder-open.png

With esphomelib you can use different types of binary sensors. They will
automatically appear in the Home Assistant front-end and have several
Expand All @@ -19,7 +19,7 @@ All binary sensors have a platform and an optional device class. By
default, the binary will chose the appropriate device class itself, but
you can always override it.

.. code:: yaml
.. code-block:: yaml
binary_sensor:
- platform: ...
Expand Down Expand Up @@ -58,7 +58,7 @@ Binary Sensor Filters
With binary sensor filters you can customize how esphomelib handles your binary sensor values even more.
They are similar to :ref:`Sensor Filters <sensor-filters>`.

.. code:: yaml
.. code-block:: yaml
binary_sensor:
- platform: ...
Expand Down Expand Up @@ -110,7 +110,7 @@ You can access the current state of the binary sensor in :ref:`lambdas <config-l
This automation will be triggered when the button is first pressed down, or in other words on the leading
edge of the signal.

.. code:: yaml
.. code-block:: yaml
binary_sensor:
- platform: gpio
Expand All @@ -129,7 +129,7 @@ Configuration variables: See :ref:`Automation <automation>`.
This automation will be triggered when a button press ends, or in other words on the falling
edge of the signal.

.. code:: yaml
.. code-block:: yaml
binary_sensor:
- platform: gpio
Expand All @@ -149,7 +149,7 @@ This automation will be triggered when a button is pressed down for a time perio
``min_length`` to ``max_length``. Any click longer or shorter than this will not trigger the automation.
The automation is therefore also triggered on the falling edge of the signal.

.. code:: yaml
.. code-block:: yaml
binary_sensor:
- platform: gpio
Expand All @@ -175,7 +175,7 @@ This automation will be triggered when a button is pressed down twice, with the
``min_length`` and ``max_length``. When a second leading edge then happens within ``min_length`` and
``max_length``, the automation is triggered.

.. code:: yaml
.. code-block:: yaml
binary_sensor:
- platform: gpio
Expand All @@ -200,7 +200,7 @@ Configuration variables:
This automation will be triggered when a button is pressed in a user-specified sequence.


.. code:: yaml
.. code-block:: yaml
binary_sensor:
- platform: gpio
Expand Down Expand Up @@ -238,7 +238,7 @@ You can use an ``OFF`` timing at the end of the timing sequence to differentiate
kinds of presses. For example the configuration below will differentiate between double, long and short
presses.

.. code:: yaml
.. code-block:: yaml
on_multi_click:
- timing:
Expand Down Expand Up @@ -269,7 +269,7 @@ advanced stuff (see the full :doc:`API Reference </api/binary_sensor/index>` for
- ``publish_state()``: Manually cause the binary sensor to publish and store a state from anywhere
in the program.

.. code:: yaml
.. code-block:: yaml
// Within lambda, publish an OFF state.
id(my_binary_sensor).publish_state(false);
Expand All @@ -279,7 +279,7 @@ advanced stuff (see the full :doc:`API Reference </api/binary_sensor/index>` for
- ``.state``: Retrieve the current state of the binary sensor.

.. code:: yaml
.. code-block:: yaml
// Within lambda, get the binary sensor state and conditionally do something
if (id(my_binary_sensor).state) {
Expand Down
2 changes: 1 addition & 1 deletion esphomeyaml/components/binary_sensor/nextion.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pressed on, and will turn off as soon as the finger is released.

See :doc:`/esphomeyaml/components/display/nextion` for setting up the display

.. code:: yaml
.. code-block:: yaml
# Example configuration entry
display:
Expand Down
2 changes: 1 addition & 1 deletion esphomeyaml/components/binary_sensor/pn532.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ unique id (``uid``) is currently being detected by the PN532 or not.

See :doc:`/esphomeyaml/components/pn532` for instructions for setting up the connection to the PN532.

.. code:: yaml
.. code-block:: yaml
# Example configuration entry
spi:
Expand Down
2 changes: 1 addition & 1 deletion esphomeyaml/components/binary_sensor/rdm6300.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ unique id (``uid``) is currently being detected by the RDM6300 or not.

See :doc:`/esphomeyaml/components/rdm6300` for instructions for setting up the connection to the RDM6300.

.. code:: yaml
.. code-block:: yaml
# Example configuration entry
uart:
Expand Down
Loading

0 comments on commit b5ffffe

Please sign in to comment.