Finishing Up

Now that we have a set of sample posts to work with there are only a few more things to do before we have a properly functional blog.

Organization

By default Grav sorts all the blog posts alphabetically. With only eleven posts this is not too bad, but it could easily become very annoying to navigate as we create more and more posts.

Expanding blog from the admin panel shows a list of pages in alphabetical order, starting with Configuring Quark all the way to Telescopes.

To view a list of all your pages, go to the Pages tab in the admin panel and click on the plus icon next to Blog. This is your current folder structure.

Because we are writing a blog, it would make sense to have our most recent posts at the top of the list, as they are the most likely ones we would want to edit. Fortunately, the admin panel provides a straightforward way to do this.

  1. From Pages, go to the Blog folder and click on the Advanced tab.
  2. Find Children Display Order. It is the only option under the very last section called Admin Specific Overrids.
  3. The dropdown menu has two options. Choose Ordered by Collection definition.

Children Display Order set to Ordered by Collection definition

The blog displays all of our posts by making a collection, which we can customize from the Blog Config tab. Because we already have that collection, choosing the above option will work for us. When we go back to the Pages tab we will see that all of our pages are now ordered based on the dates we provided earlier.

Expanding blog now shows a list of pages starting with Requesting Books (our most recent post) and ending with Grav (our first post).

This ordering only occurs within the admin panel. It will not affect the way your pages are ordered when you view them with the File Manager, Finder, File Explorer, etc.

Sidebar Text

There is a lot going on in the left sidebar, but we can add our own custom text to it as well. This is a good place for an about the author blurb, or anything else you might want to put.

  1. Start by adding a new page called modules to the root directory. Make sure it uses the Default template and is set to not be visible.

Add Page dialog box. Page Title: modules. Folder Name: modules. Parent Page: /(root). Page Template: Default. Visible: No.

  1. Save this page without adding any content.
  2. Add another page. This time call it sidebar and set its parent as the modules page. This one should also use the Default template and be set to not be visible.
  3. Add whatever text you want displayed to the sidebar page's content. You will want to start your content with a header 4 (four hashtags). This will match the headers of the other sections on the sidebar.

Example:

#### Blog Info

This is a sample blog following the [Grav tutorial](https://www.ds-tutorials.oucreate.com/grav) maintained by [Digital Scholarship @ OU Libraries](https://libraries.ou.edu/content/digital-scholarship-ou-libraries).

This section will be inserted between Random Article and Popular Tags in the sidebar.

Next Steps

This marks the end of the base Grav tutorial. You should now be able to run your own blog. The mini tutorials, as they are created, will provide information for further customization and content creation. You can also check out the various documentation resources listed in the introduction as well as the READMEs for any plugins or themes you are curious about.