Skip to content

Commit

Permalink
Add links from other related pages, and examples
Browse files Browse the repository at this point in the history
  • Loading branch information
anvit committed Jul 17, 2023
1 parent 69d0231 commit 7041c2a
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 5 deletions.
28 changes: 23 additions & 5 deletions admin-manual/maintenance/cli-tools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1090,6 +1090,12 @@ task described above.

* :ref:`rename-title-slug`

Users can also use the CLI rename-slug tool if they want to update one or
more slugs via the command line. For more infomation, see:

* :ref:`cli-rename-slugs`


Finally, :term:`static pages <static page>`, or permanent links, include a
slug :term:`field` option, but only slugs for new static pages can be edited
by users; the slugs for the default :term:`Home page` and :term:`About page`
Expand All @@ -1116,16 +1122,16 @@ AtoM, see: :ref:`manage-static-pages`.

.. _cli-rename-slugs:

Rename slugs
============
Rename slugs via command line
=============================

This command line tool can be used to rename existing slugs in AtoM. It offers
the ability to either rename a single slug, or to run a batch rename using a
csv file.

.. code:: bash
php symfony tools:rename [<old-slug> <new-slug>] [--csv=<path-to-file.csv>]
php symfony tools:rename-slug [<old-slug> <new-slug>] [--csv=<path-to-file.csv>]
**Task options**

Expand All @@ -1142,17 +1148,29 @@ used** - AtoM requires the uses of the pre-set defaults for symfony to be
able to execute the task.

When used without any other options, the rename slugs task expects two
arguments: an existing slug, and a new name for the existing slug.
arguments: an existing slug, and a new name for the existing slug. For example,
to rename my-example-slug to new-slug, the following command should be run:
``php symfony tools:rename-slug my-example-slug new-slug``.

The ``--csv`` option can be used to provide a CSV file to use for a batch
import. The supplied CSV file only needs two columns: an oldSlug column
(containing the existing slugs), and a newSlug column. Here is an example:
(containing the existing slugs), and a newSlug column. Here is an example CSV:

.. image:: images/cli-rename-example.*
:align: center
:width: 70%
:alt: An image of an example CSV file used for a rename-slug command

For example, to use a CSV file to batch update slugs, this command can be run:
``php symfony tools:rename-slug --csv="path/to/my/slug-file.csv"``

.. SEEALSO::

* :ref:`rename-title-slug`
* :ref:`slugs-in-atom`
* :ref:`description-permalinks`
* :ref:`cli-generate-slugs`

.. _cli-normalize-taxonomy:

Taxonomy normalization
Expand Down
8 changes: 8 additions & 0 deletions user-manual/add-edit-content/archival-descriptions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1435,6 +1435,14 @@ the filename of a linked digital object will be covered on the
specific description on an external website, they may break after changing
the slug.

.. SEEALSO::

Users can also update slug(s) via a command line tool. For more information,
see:

* :ref:`cli-rename-slugs`


:ref:`Back to top <archival-descriptions>`

.. _view-modification-history:
Expand Down
7 changes: 7 additions & 0 deletions user-manual/administer/settings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,13 @@ For further context on slugs in AtoM, see: :ref:`slugs-in-atom`

* :ref:`rename-title-slug`

.. SEEALSO::

Users can also update slug(s) via a command line tool. For more information,
see:

* :ref:`cli-rename-slugs`

.. _permissive-slugs:

Use any valid URI path segment and uppercase character in slugs
Expand Down

0 comments on commit 7041c2a

Please sign in to comment.