`` with your github username to get your
repo.
Now go to the *settings* for this repo and go to the *Pages* settings
and enable github pages for ``main`` in the ``/docs`` directory. And
click *save*.
.. figure:: github-pages.png
:align: center
:width: 90%
Creating our page
=================
Now in our cloned repository, we need to create the ``docs/`` directory
and put our initial page there. In your ``cxx-array/`` create the ``docs/``
directory:
.. prompt:: bash
mkdir docs/
Now let's add the following ``index.html`` there:
.. code:: html
Hello
C++ Array Class
Array.H provides a simple C++ multi-dimensional array class.
and finally add it. From within ``cxx-array/docs``:
.. prompt:: bash
git add index.html
git commit -m "first webpage"
There is one more thing we need to do. By default, Github Pages looks for
a website in `Jekyll format `_. We can
disable this by adding a ``.nojekyll`` file in our top level directory (``cxx-array/``):
.. prompt:: bash
touch .nojekyll
git add .nojekyll
git commit -m "add nojekyll"
Now we can push to github:
.. prompt:: bash
git push
After a minute or two, we can view our page at:
``https://.github.io/cxx-array/``, where you replace
```` with your github username.
.. tip::
Our page has an error---there are 2 ```` tags---the last should be ````.
We can use a tool to catch errors like this:
.. prompt:: bash
pip3 install html5validator --user
html5validator index.html