Create a list of all files in a directory

These are the directions on how to create a manual sitemap for submission to google (for indexing in their search engine) from a list of markdown files in your pubwriter directory. If you are on a PC and need directions on how to do it on a PC, click here.

Mac

To Save a List of Files from Finder

  1. Open the folder you want to get a content listing of and hit Command+A (Select All) followed by Command+C (Copy)

  2. Launch TextEdit and pull down the “Edit” menu and select “Paste and Match Style”, or hit Command+Option+Shift+V.

  3. You should now see the entire list of all your files. Select all and copy.

  4. Open Google Sheets or Excel

  5. Create a new sheet and paste the list in column B

  6. Create a link to the URL for your site (i.e. http://sandbox.selfpublish.org/) and copy it in to column A

  7. Copy that URL on every of column A. Use the 'Fill Down' function. CMD-D.

  8. Copy the 2 columns in your sheet and paste them into a new file in atom.

  9. Select the space between the URL and filename.

  10. Run a find and replace (Cmd-F) to remove the space between the URL and the page.

  11. Remove any references to files that are not pages (in the event you copied a directory name instead of a filename).

At this point, you can save it as a .txt file and you have a file suitable to upload as a sitemap to Search Console

Here's a direct link to the page from the screenshot: https://search.google.com/search-console/sitemaps

To create a clickable index in markdown:

  1. Paste the list into the AuthorDock.

  2. Copy the HTML, paste it in to a new md file and save. When you visit the page, you will see all of your pages listed and linked.