New post in drafts and almost ready. Also on a new computer, so had to re-download all the theme and submodules. Thinking of just converting the box submodule to be native to my blog for easier maintenence. Need to proof this last post on google sheets and publish tomorrow morning.

This commit is contained in:
Norm Rasmussen
2024-02-26 16:42:10 -05:00
parent b55aa03260
commit 37e4a34de7
14418 changed files with 60935 additions and 1182 deletions

79
READ_FIRST.md Normal file
View File

@ -0,0 +1,79 @@
# Build Notes for Hugo
## _ALL OF THESE COMMANDS SHOULD BE RUN FROM YOUR MAIN FOLDER - THE SAME ONE THAT CONTAINS THE HUGO.YAML_
TODO: Create script that loads submodules and theme after downloading git repo for first time.
Upon first git clone AND if you want to build the submodules from scratch:
```bash
git rm -rf --caches themes/
git submodule add https://gitlab.com/Roneo/hugo-shortcode-roneo-collection.git themes/hugo-shortcode-roneo-collection
git submodule add --depth=1 https://github.com/adityatelange/hugo-PaperMod.git themes/PaperMod
```
You can also try to run the git submodule update command, but this hasn't worked for me in the past.
```bash
git submodule update --init --recursive # needed when you reclone your repo (submodules may not get cloned automatically)
```
For some Macs (for instance the 8GB M1), you have to run this to prevent the "too many open files" error:
```bash
hugo check ulimit
sudo sysctl -w kern.maxfiles=65536
sudo sysctl -w kern.maxfilesperproc=65536
ulimit -n 65536 65536
```
Run local:
```bash
hugo server --baseURL 'localhost' --bind 'localhost'
```
And run local with drafts:
```bash
hugo server --buildDrafts --baseURL 'localhost' --bind 'localhost'
```
Build to public folder ready for git push:
```bash
hugo -s ./ -d ./public/
```
## CONTENT
Create content with the most used settings
FEAT: Shouldn't this just become the default one instead of having a more specific command?
```bash
hugo new content --kind page posts/name_of_post.md
```
## DESIGN
When using the shortcodes from Roneo for Box and/or the detail (drop down/accordion style menu), the formatting can clash
with the theme. So you'll want to remove box shadow, border, background, padding, etc. Here's the basic setup I insert at the
end of each MD post that needs these changes.
```html
<style>
.box-shortcode {
color: #e8e8e8;
border: none;
}
.post-content img {
margin: auto
}
details {
margin: 0;
padding: 0;
border: none;
background: transparent;
box-shadow: none;
}
</style>
```