Below you’ll find step-by-step instructions for executing the exercise part of the workshop Creating a Tech Writing Portfolio with Docs as Code Tooling by Svetoslav Pandeliev.
Open a command prompt on Windows (or terminal on macOS) and run the following command:
jekyll -v
You should see a version number in response.
In case you don’t have Jekyll installed, check Creating a Tech Writing Portfolio with Docs as Code Tooling - Preliminary Setup.
Go to github.com and search for WhatATheme
. Choose the thedevslot/WhatATheme repository from the list of results.
Choose the Fork button on the right. This will create your own copy of the theme repository. Name your theme repository my-portfolio.
Run the following command in command prompt (terminal):
git clone <url of your theme repository>
This will copy the contents of your theme repository in a folder my-portfolio
on your computer.
In the command prompt (terminal), navigate to the theme repository folder my-portfolio
.
Run bundle install
and wait for all dependencies to be installed.
Run bundle exec jekyll serve
. When the build process is complete, you’ll see a URL in the command prompt (terminal) output: http://127.0.0.1:4000
. If you paste this in a browser, you’ll see a local preview of your portfolio site.
_config.yml
and update the following fields. Leave all other fields unchanged.Field Name | Value | Info |
---|---|---|
title | <site title> | Title of your site |
description | <desc> | Desc or subtitle |
email | <your email> | Contact email |
twitter-username | <your twitter user> | No url, just the user name |
linkedin-username | <your linkedin user> | No url, just the user name |
github-username | <your github user> | No url, just the user name |
author-name | <your name> | Your name |
author-about | <your desc> | Short desc about you |
Open the navbar.html
file in the _includes
folder.
Find the section marked with a comment <!-- navbar items | right side -->
.
Delete not needed sections, leave only HOME, ABOUT, CONTACT.
Add a new line for PROJECTS in the same section: <a class="navbar-item" href="{{site.url}}{{site.baseurl}}/#project">PROJECTS</a>
.
You can copy the HTML code from the CONTACT line and adjust the values as needed.
Open project.html
in the _layouts
folder.
Copy the main section marked with a comment <!--Main Section-->
.
Create a new file project.html
in the _includes
folder.
Paste the main section from the _layouts/project.html
file in the _includes/project.html
file.
Open the default.html
file in the _layouts
directory and add {% include project.html %}
under { % include contact.html % }
.
This will add the Projects section just after the Contact section in the scrolling home page.
Open the about.html
file in the _includes
folder.
Find the HTML code for the Blog button (lines 20-24) and delete it.
Open the contact.html
file in the _includes
folder.
Find the HTML code for the Tweet me on Twitter button (lines 18-24) and delete it because it has an icon already underneath.
Open the footer.html
file in the _includes
folder.
Find the section marked with a comment <!--Footer Main Section-->
(lines 6-53) and delete it.
Update copyright statement to include site owner name.
Through the Source Control pane if using VS Code.
Via command prompt (terminal), note the git commands below:
git status
shows which files are new, changed, tracked, etc.git stage
stages your changes, you can choose if you want to stage all or only some of them.git commit -m "commit msg"
creates a commit with staged changes and a commit message as specified in "commit msg"
.git push
pushes commits to your repository.Enable via the Settings tab of your theme repository my-portfolio.
Check the result of the published website on the Internet.
Go back locally.
Create the needed setting for the linter action. It’ll check spelling and style of your content against a style guide:
.github/workflows
in your project (create if it doesn’t exist) and create a new file lint.yml
..vale.ini
in the my-portfolio
folder.Create the needed setting for the link validation action:
.github/workflows
in your project and create a new file links.yml
.lychee.toml
in the my-portfolio
folder. Add the directories where links should be skipped from the spellcheck with the following line: exclude_path = ["./_includes", "./_layouts", "./_posts"].
Push to GitHub again and verify the two actions are working properly in the Actions tab of your theme repository my-portfolio.
Move social icons to the hero
section and remove the contact
section altogether.
Move the social icons from the Contact section to the hero section, under the title and description of the site, replacing buttons that are there by default - need to copy the
html
code for the social icons from thecontact.html
file to theshowcase.html
file, add another row in the beginning for the envelope icon and mail, and adjust their class fromhas-text-black
tohas-text-white
so they are visible on the black background. At the same time, need to remove all unnecesaryhtml
parts from theshowcase.html
file.
Fix formatting of the project pages - text alignment, etc.
Remove opacity setting of the hero image.
Custom 404 page, unify background image with the homepage.
Update photo styling in the About, remove dotted line frame.
Update credits to include credits for images, graphics, etc.
Change the default Twitter icon to the new X icon.
Need to find the Font Awesome shorthand of the new X icon (for example,
fa-x-twitter
) and replace this in all files where the Font Awesome shorthand of the default twitter icon appears. Also need to update the Font Awesome version that is used by the site. Open thehead.html
file in the_includes
folder and replace line 5 with<link rel="stylesheet" href="https://use.fontawesome.com/releases/v6.4.2/css/all.css">
.