Skip to content

Commit

Permalink
Fix broken links
Browse files Browse the repository at this point in the history
  • Loading branch information
fraya committed Dec 8, 2024
1 parent 79cd981 commit 2704097
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
12 changes: 6 additions & 6 deletions documentation/source/server/quickstart/dynamic-content.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Serving Dynamic Content
=======================

`Previous: Serving Static Content <static-content.html>`_
:doc:`Previous: Serving Static Content <static-content>`

`Back to top <index.html>`_
:doc:`Back to top <index>`

This example will show how to dynamically generate the contents of a web page.

Expand Down Expand Up @@ -53,7 +53,7 @@ To make our resource do something we define a method on :func:`respond`. (If we
add-resource(server, "/", make(<clock-page>));
start-server(server);
In the `previous example <static-content.html>`_ we already saw how to create and start a server, so the new bit here is using :func:`add-resource` to map a URL to a :class:`<resource>`. The first argument to :func:`add-resource` is the URL router. (In `Routes <http://routes.groovie.org>`_ terminology it would be a "mapper".) For convenience, an :class:`<http-server>` is a kind of router so we can add resources directly to the server. In a future example, I will show how to do more complex URL routing, which will explain the reason for the mysterious ``#key`` in the ``respond`` definition above.
In the :doc:`previous example <static-content>` we already saw how to create and start a server, so the new bit here is using :func:`add-resource` to map a URL to a :class:`<resource>`. The first argument to :func:`add-resource` is the URL router. (In `Routes <https://routes.readthedocs.io/en/latest/>`_ terminology it would be a "mapper".) For convenience, an :class:`<http-server>` is a kind of router so we can add resources directly to the server. In a future example, I will show how to do more complex URL routing, which will explain the reason for the mysterious ``#key`` in the ``respond`` definition above.

Here's the complete code:

Expand Down Expand Up @@ -97,7 +97,7 @@ Here's the complete code:
start-server(server);
| `Previous: Serving Static Content <static-content.html>`_
| `Next: Static URL Routing <static-routing.html>`_
| :doc:`Previous: Serving Static Content <static-content>`
| :doc:`Next: Static URL Routing <static-routing>`
`Back to top <index.html>`_
:doc:`Back to top <index>`
4 changes: 2 additions & 2 deletions documentation/source/server/quickstart/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ Dylan Web in 60 Seconds
=======================

This is a series of examples showing how to do web programming in
`Dylan <http://www.opendylan.org/about-dylan.phtml>`_. It was inspired
`Dylan <https://opendylan.org>`_. It was inspired
by a version of `the same thing written for Twisted Python
<http://twistedmatrix.com/documents/current/web/howto/web-in-60/index.html>`_. In
<https://docs.twistedmatrix.com/en/stable/web/howto/web-in-60>`_. In
Twisted, it is often the case that very little code is required to get
something basic running, which has also been an inspiration to create
similarly simple APIs for the Dylan web infrastructure.
Expand Down
8 changes: 4 additions & 4 deletions documentation/source/server/quickstart/static-content.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Serving Static Content
======================

`Next: Serving Dynamic Content <dynamic-content.html>`_
:doc:`Next: Serving Dynamic Content <dynamic-content>`

`Back to top <index.html>`_
:doc:`Back to top <index>`

This example will show you how to use the Dylan web server (http-server) to
serve static content from the file-system. First I'll go through the
Expand Down Expand Up @@ -107,6 +107,6 @@ accomplish the same thing::

http-server --listen 0.0.0.0:8888 --directory /tmp

`Next: Serving Dynamic Content <dynamic-content.html>`_
:doc:`Next: Serving Dynamic Content <dynamic-content>`

`Back to top <index.html>`_
:doc:`Back to top <index>`
12 changes: 6 additions & 6 deletions documentation/source/server/quickstart/static-routing.rst
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
Static URL Routing
==================

`Previous: Serving Dynamic Content <dynamic-content.html>`_
:doc:`Previous: Serving Dynamic Content <dynamic-content>`

`Back to top <index.html>`_
:doc:`Back to top <index>`

This example will show how URL routing works in the Dylan web server, and how
to handle optional URL elements for your resources.

I will skip the library and module definitions since they're essentially the
same as in `the previous examples <dynamic-content.html>`_, but they are
same as in :doc:`the previous examples <dynamic-content>`, but they are
included in the full code listing at the end.

In the Dylan web server, :func:`add-resource` maps a URL to a resource. The
default implementation of :func:`add-resource` builds up a tree structure whose
paths are defined by URL path elements and whose leaves are :class:`<resource>`
objects. (`Idea stolen from twisted.web
<http://twistedmatrix.com/documents/current/web/howto/web-in-60/static-dispatch.html>`_.
<https://docs.twistedmatrix.com/en/stable/web/howto/web-in-60/static-dispatch.html>`_.
I hope to add a simple regular expression based router in the future, for
comparison.)

Expand Down Expand Up @@ -134,6 +134,6 @@ Here's the full code listing:
start-server($server);
`Previous: Serving Dynamic Content <dynamic-content.html>`_
:doc:`Previous: Serving Dynamic Content <dynamic-content>`

`Back to top <index.html>`_
:doc:`Back to top <index>`

0 comments on commit 2704097

Please sign in to comment.