The original project maintained by Jason here is no longer under active development. However, since I do actively use this theme for my personal website and have contributed a couple additions to the original webfolio theme, I'm still maintaining my fork. I've done my best to edit the original readme to better include the features that I have added, and removed parts that are not relevant to my fork of Webfolio.
I'm not a web developer though, so expect minimal changes (other than occasional bug fixes to keep it working with Grav). Obviously if Jason ever updates his version, I will try to integrate those changes into my fork.
Here are some of the main differences, off the top of my head:
- Changed the title font to Ubuntu and changed font weights and sizes all over the theme
- Slightly changed the way (and where) theme colours are used in the theme
- Removed all instances of drop shadow for a more animated curved look (I just dont like drop shadows)
- Added a way to have two different versions of the logo for when you scroll down and when you're at the top of the page
- Added support for the JSComments plugin for adding custom commenting on the
blog-posttemplate - Added support for the Archives plugin in the form of a simple sidebar on the
blog-posttemplate
The Webfolio Theme is a configurable theme for creating an online portfolio and blog with Grav CMS. It is partially based on the Quark Theme.
- From the root of your Grav installation, run
bin/gpm install webfolio.- Alternatively, download this repository, unzip it, rename the folder to
webfolio, and place it in theuser/themes/directory of your Grav install
- Alternatively, download this repository, unzip it, rename the folder to
- Edit
user/config/system.yamlto contain the following:pages: theme: webfolio
Alternatively, you can install Webfolio via the Grav Admin interface.
Webfolio offers several templates for your site's pages. Here's a brief overview of each one.
The default template is a simple template that just renders your content as-is.
The modular template is used to create modular pages made up of several sub-pages. The actual modular.md file typically only contains YAML FrontMatter; any Markdown content will not be rendered.
Custom FrontMatter Fields
modules_in_menu- If set to true, each of the modular page's modules will appear in the navigation menu as children of the page. (Note that on the modular page itself, the modules may appear as top-level menu items depending on howsingle_page_menuis set.)single_page_menu- If set to true, each of the modular page's modules will appear in the page's navigation menu as top-level items, and sibling or parent pages of the modular page will not appear in the modular page's menu.onpage_menu(DEPRECATED) - Same behavior assingle_page_menu. If eithermodules_in_menuorsingle_page_menuis set, this setting will be ignored.
The following pages (Intro, About, Projects, Contact, and Plain) all must be created as sub-pages of a page using the modular template. See the Grav documentation on modular pages and adding modular pages from the admin panel for more information.
The intro template is used to create an introduction section within a modular page. It can display an image and icon links in addition to the Markdown content. The first image file within this page's directory, if there is one, will be used as the image.
Custom FrontMatter Fields
use_footer_links- Whether thefooter_linksfrom the site-wide customization should also appear in this section. See the Customization section below for more information aboutfooter_links.links- A list of icon links to be displayed. Each link needs to specify alink(the URL to which it points) and anicon(Font-Awesome CSS classes, such asfas fa-code). These links will be displayed after thefooter_linksifuse_footer_linksis true.img_alt- The alt text to be used for the image in this section.center_content- If true, the content (not the Custom Intro Image) will be centered instead of left-aligned.
The about template is used to display a section containing some Markdown content and a few details.
Custom FrontMatter Fields
details- A list of details to be shown in this section. Each detail can have atitle,icon(Font Awesome CSS classes, such asfas fa-code), andcontent. Three details looks the best on the page.
The projects template shows a section containing a grid of project tiles.
Custom FrontMatter Fields
projects- A list of projects to be shown in this section. Each project can have atitle,image(name of an image file stored in the page's directory),description, andlink(URL).projects_per_page- Number of projects to show initially and each time the "Show more" button is pressed. Leave empty to show all projects.show_more_txt- Text for button to show more projects.
The contact template is used to create a section containing a contact form, a contact button, or both. Note that the contact form should be set up in the header of the modular.md file as indicated here.
Custom FrontMatter Fields
button- If this field is present, a button will appear in this section with the following properties:link- The URL that the button will load when clicked.text- The text to be displayed on the button.icon- Font Awesome CSS classes, such asfas fa-envelope.
show_form- Whether or not the contact form should be shown in this section.
The plain template is like the default template, but for creating a section in a modular page.
The blog template displays a list of blog posts (organized as sub-pages of the blog page).
You can define which posts to display on the blog page by defining a page collection using the
contentFrontMatter field. If nocontentfield is defined, the blog page's children are displayed.
The blog-post template is used to render a blog post. You'll want to set the title and date FrontMatter fields.
If both
publish_dateanddateare set,publish_dateis interpreted as the date of original publication, whiledateis the date the post was last updated.
The following customizations are available by editing user/config/themes/webfolio.yaml (see the repo for my personal site for an example file) or via the Grav Admin interface.
- Custom Logo (
custom_logo) - A logo image to be placed on the left side of the header throughout the site. - Mobile Cusom Logo (
custom_logo_mobile) - A logo image to be placed at the top left of the navigation overlay on smaller screens. Note that this logo will appear on a dark background. - Favicon (
favicon) - A small image to be used as the icon for your site in the browser. - Extra Navigation Links (
external_links) - A list of links to be shown on the navigation menu after page and site navigation links. Can be toggled on or off by setting the value forshow_external_linksastrueorfalse. - Show Credit in Footer (
footer_credit) - Whether or not to display a sentence in your site footer giving credit to this theme and to Grav. - Footer Links (
footer_links) - A list of links to be shown in the footer of every page. Each link has alink(URL) property and aicon(Font Awesome icon classes, such asfas fa-envelope) property. - Copyright - Include any of these fields to show a copyright notice in your site's footer.
- Year (
copyright.year) - The year to be displayed next to the copyright symbol. - Copyright-Holder's Name (
copyright.name) - The name of the person holding the copyright for the site. - Link Target URL (
copyright.link) - A URL to which users will be directed when clicking on the copyright-holder's name.
- Year (
- Style (
style) - This field has several sub-fields that allow you to change the theme's color scheme. Seeblueprints.yamlfor documentation on all of the available fields.
Each page can have a bit of extra customization. These properties are set within the YAML header of the Markdown file for the page.
body_classes(all pages) - A space-separated list of CSS classes to be applied to the body of the page.class(all modules) - A space-separated list of CSS classes to be applied to the modular section.
More stylistic elements of the site (e.g., colors, fonts, etc.) can be customized by adding a css/webfolio.css file inside your user/ directory or using the css/custom.css file within the theme itself. Alternatively, you can edit scss/variables.scss and then recompile scss/theme.scss into css-compiled/theme.min.scss using Sass.
Webfolio provides several CSS classes and variables for you to use. Take a look inside
scss/util.scssto see what they are.
Don't hesitate to create an issue or reach out to me at [email protected] if you're having trouble using Webfolio. I'm happy to help!
Feel free to submit an issue or merge request if you see a way to make this theme better! I'm very thankful for the following people for their contributions: