Skip to content

Commit

Permalink
Add some posts about bugs (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
NickFoden authored Feb 12, 2025
1 parent 15976da commit b14dc88
Show file tree
Hide file tree
Showing 5 changed files with 78 additions and 1 deletion.
10 changes: 10 additions & 0 deletions internal/content/posts.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ var posts = []models.Post{
ContentPreview: "A \"simple\" web log built with Go and html + htmx.",
CreatedAt: time.Date(2025, 1, 3, 0, 0, 0, 0, time.UTC),
Slug: "1"},
{Title: "No Bugs Here",
Content: "",
ContentPreview: "C'mon just use a proper tsconfig",
CreatedAt: time.Date(2025, 1, 15, 0, 0, 0, 0, time.UTC),
Slug: "no-bugs"},
{Title: "Ruby for React Native",
Content: "",
ContentPreview: "RN setup issues? Ensure Ruby is current",
CreatedAt: time.Date(2025, 1, 16, 0, 0, 0, 0, time.UTC),
Slug: "react-native-requires-current-ruby"},
}

func GetAllPosts() []models.Post {
Expand Down
8 changes: 8 additions & 0 deletions internal/content/posts/no-bugs.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<p class="font_roboto-condensed post_p">In the current times, we have incredible tooling. And yet over and over for
example, I see Typescript apps kicked off without a proper tsconfig, (allowing implicit any,etc) and/or without
having git hooks with basic checks in pre-push and cicd/github actions.
</p>
<p class="font_roboto-condensed post_p">These days it's critical to not skip this and to use all the tooling and
configurations available to us. Especially as devs now spin the wheel with ai generated code day in and day out.
Gotta have a solid foundation in place with smart defaults to avoid surprises.
</p>
43 changes: 43 additions & 0 deletions internal/content/posts/react-native-requires-current-ruby.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<p>
Hitting issues with React Native setup or errors when running the out of the box starters? You may need to update or
check your ruby version. This caught me up the other day on a new machine.
</p>

<ol>
<li>
Install Ruby:
<div class="code-block">
<code>brew install ruby</code>
</div>
</li>
<li>
Get the prefix path for Ruby:
<div class="code-block">
<code>brew --prefix ruby</code>
</div>
</li>
<li>
Add Ruby to your PATH:
<div class="code-block">
<code>echo 'export PATH="$(brew --prefix ruby)/bin:$PATH"' >> ~/.zshrc</code>
</div>
</li>
<li>
Source your updated .zshrc file:
<div class="code-block">
<code>source ~/.zshrc</code>
</div>
</li>
<li>
Verify Ruby installation:
<div class="code-block">
<code>ruby -v</code>
</div>
</li>
<li>
Install CocoaPods:
<div class="code-block">
<code>gem install cocoapods</code>
</div>
</li>
</ol>
2 changes: 1 addition & 1 deletion internal/templates/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{template "base.html" .}} {{ define "content" }}
<ul class="index_posts_ul">
{{ range .Posts }}
<li>
<li class="index_post_li">
<div class="row">
<a class="font_roboto-condensed index_post_link" href="/posts/{{ .Slug }}"
>{{ .Title }}</a
Expand Down
16 changes: 16 additions & 0 deletions static/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,19 @@ main {
overflow-x: hidden;
}

.code-block {
background-color: #f4f4f4;
border: 1px solid #ddd;
padding: 10px;
margin: 10px 0;
overflow-x: auto;
}

.code-block code {
display: block;
white-space: pre;
}

.font_sixtyfour {
font-family: "Sixtyfour", serif;
font-optical-sizing: auto;
Expand Down Expand Up @@ -68,6 +81,9 @@ main {
font-size: 14px;
}
}
.index_post_li {
margin: 0 0 24px 0;
}

.index_post_link {
font-size: 24px;
Expand Down

0 comments on commit b14dc88

Please sign in to comment.