Blog replacement, running Hugo. https://words.strivinglife.com/
Go to file
James Skemp 9c4346157b Fix a few code formatting issues in posts 2023-07-05 21:35:12 -05:00
archetypes Add standard Hugo directories. 2016-03-21 21:11:51 -05:00
content/post Fix a few code formatting issues in posts 2023-07-05 21:35:12 -05:00
data Add standard Hugo directories. 2016-03-21 21:11:51 -05:00
layouts Update to support latest version of Hugo 2022-11-01 21:14:11 -05:00
public Rename gitkeep to gitignore for public directory 2017-07-04 10:44:43 -05:00
static Move static resources into proper folder 2017-07-04 10:13:28 -05:00
themes/phlat Add analytics 2023-04-19 22:00:18 -05:00
.gitignore Update to support latest version of Hugo 2022-11-01 21:14:11 -05:00
.gitlab-ci.yml Update to support latest version of Hugo 2022-11-01 21:14:11 -05:00
README.md Update README to cover GitLab process 2017-07-30 09:48:42 -05:00
_commit-to-git.ps1 Adding script to push gh-pages branch. 2016-03-02 20:44:16 -06:00
config.toml Update to support latest version of Hugo 2022-11-01 21:14:11 -05:00

README.md

blog

Blog replacement, running Hugo.

Adding a new post

First, start Hugo, if you want to preview the content as you write it.

..\hugo.exe server

If you want to preview drafts pass the --buildDrafts parameter.

Next create a new file in the content\post directory. Use the awesome Dillinger as needed. On Mac I like MacDown.

..\hugo.exe new post/post-name.md

Once you're okay with the content, stop Hugo by pressing Ctrl + C.

Generate the site by running ..\hugo.exe.

Add the new post file to Git, as well as the newly generated/updated files.

If using GitLab

Just push the file and GitLab will trigger a job based upon the CI configuration file.

If using GitHub

Update the gh-pages branch via one of the following.

git subtree push --prefix public https://github.com/JamesSkemp/words.git gh-pages
git subtree push --prefix public git@github.com:JamesSkemp/words.git gh-pages

Image resizing

The following command seems to work rather well at converting phone photos to web-ready images.

convert original.jpg -scale 20% -interpolate catrom -quality 50 new.png

Post title to creation script

Within LINQPad, run the following:

var title = "Post Title Here";

title = title.ToLower().Trim()
	.Replace(" ", "-")
	.Replace(":", "-")
	.Replace(",", "-")
	.Replace("+", "-")
	.Replace("(", "-")
	.Replace(")", "-")
	.Replace("%", "-")
	.Replace("--", "-")
	.Replace("--", "-")
	.Replace("--", "-")
	;

(@"..\hugo.exe new post/" + title + ".md").Dump();