Skip to content

Commit dcf3ee8

Browse files
authored
Merge pull request #74717 from bergerhoffer/updating-symlink-guidance
Updating symlink and directory creation guidance
2 parents 608b682 + f0c34dc commit dcf3ee8

File tree

1 file changed

+25
-14
lines changed

1 file changed

+25
-14
lines changed

contributing_to_docs/doc_guidelines.adoc

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ link:https://redhat-documentation.github.io/modular-docs/[_Red Hat modular docs
99

1010
[NOTE]
1111
====
12-
These _Documentation guidelines_ are primarily concerned with the modular structure and AsciiDoc / AsciiBinder requirements for building OpenShift documention. For general style guidelines in OpenShift docs, see the following:
12+
These _Documentation guidelines_ are primarily concerned with the modular structure and AsciiDoc / AsciiBinder requirements for building OpenShift documentation. For general style guidelines in OpenShift docs, see the following:
1313
1414
* Primary source: link:https://www.ibm.com/docs/en/ibm-style[_IBM Style_]
1515
* Supplementary source: link:https://redhat-documentation.github.io/supplementary-style-guide/[_Red Hat supplementary style guide for product documentation_]
@@ -207,23 +207,29 @@ Try to shorten the file name as much as possible _without_ abbreviating importan
207207

208208
== Directory names
209209

210-
If you create a directory with a multiple-word name, separate each word with an underscore, for example `backup_and_restore`.
210+
When creating a new directory, follow these guidelines:
211211

212-
Do not create or rename a top-level directory in the repository and topic map without checking with the docs program manager first.
212+
* Use underscores to separate multiple-word directory names, for example, `backup_and_restore`.
213+
* Create the symbolic links for the `images`, `modules`, `snippets` and `_attributes` directories. See xref:symbolic-links[Symbolic links] for instructions.
214+
* Use the CLI (`mkdir <directory_name>`) instead of an editor, to avoid potential syncing issues.
215+
* Do not copy another directory or its symbolic links when creating the new directory, to avoid issues with the symbolic links.
216+
* Do not create or rename a top-level directory in the repository and topic map without checking with the docs program manager first. If a book is being created or modified, there are changes on the Customer Portal that must also be made.
213217

214-
Avoid creating two levels of subdirectories because the link:https://github.com/openshift/openshift-docs/issues/52149[breadcrumb bar on docs.openshift.com breaks]. If you have a valid use case for two levels of subdirectories, talk with your DPM/CS (and, for aligned teams, the OpenShift DPM) for approval before creating it.
218+
[[symbolic-links]]
219+
=== Symbolic links
215220

216-
When creating a new directory or subdirectory, you must create four symbolic links in it:
221+
When creating a new directory or subdirectory, you must create these four symbolic links in it:
217222

218223
* An `images` symbolic link to the top-level `images/` directory
219224
* A `modules` symbolic link to the top-level `modules/` directory
220225
* A `snippets` symbolic link to the top-level `snippets/` directory
221226
* An `_attributes` symbolic link to the top-level `_attributes/` directory
222227

223-
If the directory that contains an assembly does not have the `images` symbolic link, any images in that assembly or its modules will not be included properly when building the docs.
224-
225-
[TIP]
228+
[IMPORTANT]
226229
====
230+
If these symbolic links aren't included in an assembly's directory, any images in that assembly or its modules are not included properly when building the docs.
231+
====
232+
227233
To create the symbolic links:
228234

229235
. Navigate to the directory that you need to add the links in.
@@ -236,16 +242,21 @@ $ ln -s <target_directory> <link_name>
236242
For example, if you are creating the links in a directory that is two levels deep, such as `cli_reference/openshift_cli`, use the following commands:
237243
+
238244
----
239-
$ ln -s ../../images/ images
240-
$ ln -s ../../modules/ modules
241-
$ ln -s ../../snippets/ snippets
242-
$ ln -s ../../_attributes/ _attributes
245+
[openshift-docs ~]$ cd cli_reference/openshift_cli
246+
[openshift_cli ~]$ ln -s ../../images/ images
247+
[openshift_cli ~]$ ln -s ../../modules/ modules
248+
[openshift_cli ~]$ ln -s ../../snippets/ snippets
249+
[openshift_cli ~]$ ln -s ../../_attributes/ _attributes
243250
----
244251
+
245252
Be sure to adjust the number of levels to back up (`../`) depending on how deep your directory is.
246253

247-
If you accidentally create an incorrect link, you can remove that link by using `unlink <link_name>`.
248-
====
254+
If you accidentally create an incorrect symbolic link, you can remove that link by using `unlink <link_name>`. For example, the following commands unlink an incorrect `images` symbolic link in the `cli_reference/openshift_cli` directory:
255+
256+
----
257+
[openshift-docs ~]$ cd cli_reference/openshift_cli
258+
[openshift_cli ~]$ unlink images
259+
----
249260

250261
== Assembly/Module titles and section headings
251262

0 commit comments

Comments
 (0)