wordPress software documentation - raeker/ARC-Wiki-Test GitHub Wiki
See below for sections on Regular pages and on Pages with menus. See the section Editing top menu on the page about Editing the ARC-TS website for how to change what appears under the Software item on the main Systems and services menu.
These are instructions for creating a new page for generic software usage documentation. Those page live at https://arc-ts.umich.edu/software/<pkg_name> and they should deal with the use of the package and not how to run it on any specific cluster. That is, only things that go after the last scheduler directive should be included in any examples. Each cluster has its own place for documentation that is specific to that cluster.
Most package pages will be independent of other package pages. There are some notable exceptions, however: R, Python, and Matlab being the most commonly used. This page will outline first how to make a stand-alone page for, say, a package like SAS. We'll then add separate sections about how to create pages for the menu of subtopics that appear on the R, Python, and Matlab pages.
To get into the editing mode, you should go to https://arc-ts.umich.edu/wp-admin/. That will take you to the Dashboard page. On the left-side, you will find an item labeled Pages, and hovering your mouse over it will display its menu items. If you are adding a new page, there is an Add New item, which you should click. Clicking on the Pages menu will take you to the main Pages dashboard, and the left-side menu will expand to show the same items as are on the hover menu.
For these instructions to work, you should be using the Gutenberg Classic editor. I believe that you click the button on the new page screen labeled Gutenberg Editor, then there may be an option to use the Classic Editor or Classic mode. It should display some menus, and at the top of the text box on the right side, will be two tabs, Visual and Text. You may not want to, but you will use Text for this part. It will be good for your soul.
The page name should usually be just the package name; e.g., sas.
Before you save, though, go you need to add this to the Software section. Do this by scrolling down and looking on the right side for Page Attributes. Click the triangle to open those options, if they aren't. For the Parent, choose Software -- be careful not to choose a Software that is under one of the cluster names unless you mean for it to be there.
(MOVE ME) After you save the first draft, the name can be changed, but WordPress uses this to create the page URL, and it will be better for you and everyone if we keep those to package name (with some modifications for pages to which submenus point).
You need to put the following text at the top of the Text editing mode page text box so that the theme scheme matches the rest of the site.
[vc_row type="in_container" scene_position="center" text_color="dark" text_align="left" top_padding="40"][vc_column column_padding="no-extra-padding" column_padding_position="all" background_color_opacity="1" background_hover_color_opacity="1" width="3/4"][vc_column_text]
Then you need to put the following text at the bottom of the Text editing mode page text box.
[/vc_column_text][/vc_column][vc_column column_padding="no-extra-padding" column_padding_position="all" background_color_opacity="1" background_hover_color_opacity="1" width="1/4"][vc_widget_sidebar sidebar_id="page-sidebar"][/vc_column][/vc_row]
Then you need to make some other settings using check boxes, menus, and selectors that appear below the page text box or in the menu to the right.
In the section below the editor, you want to go to the section Page Header Settings and click on the Image Background button in the Background Type. In the box below that labeled Page Header Image, click the Upload button. You won't upload; it will show you all the pictures ever uploaded. Put the word 'brain' in the search box, and select the header image you've seen on other pages, then the Select File button in the lower-left of the screen.
Set the Page Header Height to 100.
Now you need to set the Page Header Title. This is the text that will be overlaid on the brain image at the top of the page. It is best if it closely matches the page name (URL), but it does not have to match exactly.
Set the Header Content Alignment, Horizontal Alignment to Centered and the Vertical Alignment to Middle.
Now turn your attention to the menus on the right side of the screen, and scroll back to the top. Do NOT put anything in Categories or Service Categories. To get the page to appear in the right place in the site and URL hierarchy, you need to set the Parent in the Page Attributes box. That is a pull-down menu, and some care needs to be taken to make sure you pick the right Software parent. The one you want is not indented and under any cluster name, it should appear as the item after the Search item, or very close to it. Selecting this sets the initial URL generated correctly.
You should now scroll back up and click the Save Draft button in the Publish box. Once the draft has been saved and the Permalink generated, you can change the title of the page to something else safely
Preview the page to make sure that it looks OK in Preview, then publish it.
We have yet to decide on whether or how we will provide a catalog of packages for which we have documentation pages. When we do, that will need to be updated and/or whoever does that will need to be notified.
My gracious, the editor in Confluence bites stale dog bisquits!
Some pages use submenus on the right side because there are many subtopics. The main examples of these are Matlab, Python, and R.
A minimum of two pages will need to be created before you start. The first page will be the main page for the topic or package, e.g., Matlab. The submenu will consist of links to other pages that have more narrowly defined topics, and so, the second page will be one of those subtopics. You can, of course have more, but two are required to demonstrate the process well. Those pages should probably be general topic pages, and so rooted under https://arc-ts.umich.edu/software/\<pkg_name>. I'll use Whizzer as the example package.
Once you have two pages, which we'll refer to as main and sub pages in what follows, and the main page will be https://arc-ts.umich.edu/software/whizzer/ and the sub page will be https://arc-ts.umich.edu/software/whizzer/sub/.
You must log into the WordPress administrative dashboard at https://arc-ts.umich.edu/wp-admin/, then from the menu on the left side, find the Appearance item, hover over it, then choose Menus. There should be two tabs on the resulting page, and you want Edit Menus. There will be a box to select a menu; check that the name you want is not taken by looking for it under Select a menu to edit. If it is not found, then choose the link to create a new menu, which may be on the same line or it might have wrapped.
Enter the name of your new menu. If your new page is at arc-ts/software, then it should probably be something like arcts whizzer to indicate quickly in the lists what it is for. I (bennet) think we should probably stay away from submenus in cluster-specific pages, but if it comes up, I suggest we prefix with the two-letter abbreviation of the cluster (a2, gl, or lh), e.g., a2 whizzer. After filling in the name, click the Create Menu button, which will then change to the Save Menu button.
Note that there is a column (Add menu items) of thingies on the left (NOT the main menu), one of which is Pages, which is what we use submenus for. Click the inverted triangle to open the selector box which should have three tabs: Most Recent, View All, and Search. You might get lucky and your page will display in the Most Recent tab. If it does, then check its box (you can click both the main page and the sub page to add both at once, but then you need to move the main page to the top of the menu). Otherwise, you should click the Search tab, then start typing the real name of your sub page. Once you find the page, check its box. Once you have a menu with a checked box, click the Add to Menu button to create an entry under the menu to the right.
Once there is a menu item in the Menu structure list column on the right, click the inverted triangle next to "Page" to expose its properties. Move the top page to the top of the menu. The Navigation Label is what will show on web pages where this menu is displayed.
The Menu Item Style seems to be Standard everywhere.
You do NOT want to click the item under the (second) box labeled Menu Item Style, on the Move line that says Under Whizzer, where Whizzer will be the name of the menu item above your submenu. The formatting of the items goes bad if you do.
If items need to be reordered, there are links to move the item, up, to top, etc. Finally, click the Save Menu button.
Now we have a menu, it needs to be assigned to the pages on which it should appear.
Go back to the Appearance menu on the main left-side menu, this time choose Widgets.
There will be some columns, and depending on the width of your browser window, one or more of Available Widgets will be on the left and one with the various Sidebars that can be configured will be on the right. Select the Page Sidebar to see the list of defined Page Sidebars.
To add a new menu to a page or pages, find the item under Available Widgets for Navigation Menu, click it. From the consequent list, select Page Sidebar, then click the Add Widget button.
That will create a new Navigation Menu. Fill in the Title box. Titles are, at least so far cluster name, then menu name; e.g., arcts matlab (for directly under /software), armis2 bowtie (for under armis2/software), where if the menu is for a page about the software's general use, it goes under arcts, whereas if it is about its idiosyncracies on a particular cluster, it goes under cluster name.
Use Select Menu to select from the list of available menus.
From the list under Widget Context, select Show widget on selected. We select by entering the URL (permalink) of the page on which it should appear in the Target by URL box, which you will have to scroll down past Custom Post Types and Taxonomies and Global Sections boxes.
Application pages need to be organized so that the main page is at
/whizzer and subpages are at /whizzer/sub1, /whizzer/sub2, etc.
Then we can use these patterns in the Target by URL
/software/whizzer/
/software/whizzer/*
Click the Save button.
Now, in a separate window, check your work.