← Back to Project mksite

Portfolio mode

Projects, research with a PDF reader, articles, search and a timeline.

Portfolio mode turns the theme into a personal site. The demo shows all of it.

Set it up#

  1. In content/_index.md, add portfolio: true, name, role, intro and optionally art, buttons and now.
  2. Make three folders in content/: projects, research and articles, each with an _index.md holding a title and a one-line description.
  3. Add home = ["HTML", "JSON"] under [outputs] in hugo.toml, and search = true under [params]. This turns on search.

Projects#

A project is a folder with an index.md and an image called cover.svg, cover.png or cover.jpg.

FieldWhat it does
descriptionThe line on the card and under the title
year, status, role, stackShown in the facts row
tagsChips on the card and the page
featured: truePuts it on the home page
linksA list of label and url pairs
relatedPages this one connects to

Research#

A paper is a folder with an index.md and a PDF. Name the PDF anything ending in .pdf.

FieldWhat it does
authorsA list of full names
year, kind, venue, doiUsed in the facts row, the citation and the Google Scholar tags
abstractShown on the page and in the search
codeA link to the repository

The page gets four things for free: the PDF reader, a Cite this paper box with BibTeX and plain text, Google Scholar tags in the page head, and a ScholarlyArticle record for search engines.

For Google Scholar Scholar needs the abstract on the page, searchable text in the PDF, and each paper reachable from the home page in a few links. The theme does the first and last. Check that your PDF’s text can be selected.

The PDF reader#

To put a PDF in any page, use the shortcode with the file name of a file in the same folder, or a full address:

{{< pdf src="paper.pdf" title="The paper" >}}

The reader loads pdf.js from your own site, only on pages that have a PDF. It shows pages as you scroll to them, lets you select text, zoom and jump to a page, and always leaves a download button.

Articles#

An article is a Markdown file in articles/ with a title, a description, a date and optional tags. The page shows the reading time and a thin progress bar.

Connected work#

List other pages in related, like research/my-paper or projects/my-project. Each page shows the pages it points to and the pages that point back at it, under Connected work.

SettingWhat it does
params.palettejade, clay, ink or sea
params.paletteSwitcherShows colour squares in the footer so visitors can pick
params.footerA headline, a line of text, a button and columns of links
params.searchAdds a search button and the / shortcut

Dark mode follows the visitor’s device. Printing a page hides the menus and buttons and shows each link’s address.