Create a new static page using a blog with the same hugo theme as the main site

I am using the R package blogdown

to build a hugo-powered site. In particular, I am using gcushen / hugo-academic theme.

The tutorials from @xieyihui and @apreshill were wonderfully helpful to get you started and adding new posts is clear, but what about a new static page using the same theme as the shared site?

I understand that it can be as simple as creating a new .md file with

+++
date = "2017-08-01"
title = "new_page_test"
type = "pages"
+++

## new page test

stuff

      

My questions

  • Where can I save this file so that it gets copied correctly to the shared folder?
  • how can I link to this new page from another page? I don't quite understand the organization of the final file structure that is published.
+3


source to share


1 answer


I do this for my classes. You can see the end result here , click "training". You can see the source files in the GitHub repository . In particular, take a look at the content / classes folder.



  • Create a folder under the content. I called it classes, but it could be called anything. Add the file _index.md

    to this folder. I edited _index.md

    from the posts folder so that it automatically creates a content / classes list.

  • It's easy to fall! The relative link to a page, for example content/yourstuff/yourpage.html

    , waiting for her yourstuff/yourpage.html

    . With an index file to a yourstuff

    relative link, it's easy yourstuff/

    . Follow the same structure to add subdirectories. I was shocked.

+1


source







All Articles