Skip to content

Commit

Permalink
feat: v1.0.0 gpt-4-0613, USE_FULL_PROJECT_PROMPT=False
Browse files Browse the repository at this point in the history
smol-ai/developer#105
DEFAULT_MAX_TOKENS=0
  • Loading branch information
Alexander Gusman committed Jun 22, 2023
1 parent 0a337a2 commit 6053084
Show file tree
Hide file tree
Showing 15 changed files with 240 additions and 315 deletions.
9 changes: 7 additions & 2 deletions versions/latest/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
HUGO_VERSION := 0.111.3
DOCKER_IMAGE := klakegg/hugo:$(HUGO_VERSION)

.PHONY: serve
serve:
docker run --rm -it -v $(PWD):/src -v $(PWD)/../../content:/src/content -v $(PWD)/../../static:/src/static -p 1313:1313 klakegg/hugo:0.111.3 server
docker run --rm -it -v $(PWD):/src -v $(PWD)/../../content:/src/content -v $(PWD)/../../static:/src/static -p 1313:1313 $(DOCKER_IMAGE) server --bind 0.0.0.0 --disableFastRender

.PHONY: build
build:
docker run --rm -it -v $(PWD):/src -v $(PWD)/../../content:/src/content -v $(PWD)/../../static:/src/static klakegg/hugo:0.111.3
docker run --rm -it -v $(PWD):/src -v $(PWD)/../../content:/src/content -v $(PWD)/../../static:/src/static $(DOCKER_IMAGE)
22 changes: 11 additions & 11 deletions versions/latest/config.yaml
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
baseURL: "https://devsparks.goooseman.dev"
languageCode: "en-us"
title: "DevSparks Blog"
title: "DevSparks"
theme: "devsparks"
relativeUrls: true

module:
mounts:
- source: "../../content"
target: "content"
- source: "../../static"
target: "static"

params:
dateFormat: "January 2, 2006"

menu:
main:
- name: "Hacks"
url: "/"
weight: 10
identifier: "hacks"
url: '/'
- name: "About"
url: "/about/"
weight: 20
identifier: "about"
url: '/about/'
- name: "GitHub"
url: "https://github.com/goooseman/devsparks-blog"
weight: 30
identifier: "github"
url: 'https://github.com/goooseman/devsparks-blog'

module:
mounts:
- source: "../../content"
target: "content"
- source: "../../static"
target: "static"
40 changes: 35 additions & 5 deletions versions/latest/shared_dependencies.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,37 @@
the app is: DevSparks Blog Specification
Shared dependencies:

the files we have decided to generate are: Makefile, .gitignore, config.yaml, themes/devsparks/layouts/_default/baseof.html, themes/devsparks/layouts/_default/list.html, themes/devsparks/layouts/_default/single.html, themes/devsparks/layouts/shortcodes/hackermans-tip.html, themes/devsparks/layouts/shortcodes/padawans-playground.html, themes/devsparks/static/css/main.css, themes/devsparks/static/css/syntax-highlighting.css, themes/devsparks/static/css/theme-light.css, themes/devsparks/static/css/theme-dark.css, themes/devsparks/static/js/theme.js, themes/devsparks/static/js/footer-image.js, themes/devsparks/static/js/remark42.js
Exported variables:
- baseURL: `https://devsparks.goooseman.dev`

Now that we have a list of files, we need to understand what dependencies they share.
Please name and briefly describe what is shared between the files we are generating, including exported variables, data schemas, id names of every DOM elements that javascript functions will use, message names, and function names.
Exclusively focus on the names of the shared dependencies, and do not add any other explanation.
Data schemas:
- None

ID names of DOM elements:
- theme-switch
- remark42
- footer-image-human
- footer-image-robot

Message names:
- None

Function names:
- None

Classnames:
- .layout__header
- .header__theme_switch
- .layout__link__active
- .section__tip__hackerman
- .section__tip__padawan
- .tip__container
- .tip__title
- .tip__image
- .article__title
- .article__date
- .article__tags
- .article__content
- .article__remark42
- .footer__container
- .footer__about_text
- .footer__author-photo
79 changes: 37 additions & 42 deletions versions/latest/themes/devsparks/layouts/_default/baseof.html
Original file line number Diff line number Diff line change
@@ -1,47 +1,42 @@
<!DOCTYPE html>
<html lang="en">
<html lang="{{ .Site.Language.Lang }}">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ .Title }}</title>
<link rel="stylesheet" href="{{ "css/main.css" | relURL }}">
<link rel="stylesheet" href="{{ "css/syntax-highlighting.css" | relURL }}">
<link rel="stylesheet" href="{{ "css/theme-light.css" | relURL }}">
<link rel="stylesheet" href="{{ "css/theme-dark.css" | relURL }}">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ if .Title }}{{ .Title }} | {{ end }}{{ .Site.Title }}</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Fira+Code&display=swap">
<link rel="stylesheet" href="{{ "css/main.css" | relURL }}">
<link rel="stylesheet" href="{{ "css/syntax-highlighting.css" | relURL }}">
<link rel="stylesheet" href="{{ "css/theme-light.css" | relURL }}">
<link rel="stylesheet" href="{{ "css/theme-dark.css" | relURL }}">
<script src="{{ "js/theme.js" | relURL }}" defer></script>
<script src="{{ "js/footer-image.js" | relURL }}" defer></script>
<script src="{{ "js/remark42.js" | relURL }}" defer></script>
</head>
<body class="body__theme__light">
<header class="layout__header">
<nav>
{{ $currentPage := . }}
{{ range .Site.Menus.main }}
<a class="{{ if or (eq $currentPage.RelPermalink .URL) (eq $currentPage.Section .Identifier) }}layout__link__active{{ end }}" href="{{ .URL }}">{{ .Name }}</a>
{{ end }}
</nav>
<nav>
<a href="https://github.com/goooseman/devsparks-blog">GitHub</a>
<a href="https://github.com/goooseman/devsparks-blog/issues/new?title=DevSparks+Feedback&body=I+found+something+wrong+on+this+page%3A%0A%0A++{{ .Permalink }}%0A%0A++Here%27s+what+it+is%3A">Fix typo</a>
<button id="theme-switch" class="header__theme_switch" aria-label="{{ if eq .Site.Params.theme "dark" }}Switch to light theme{{ else }}Switch to dark theme{{ end }}">
{{ if eq .Site.Params.theme "dark" }}🌞{{ else }}🌒{{ end }}
</button>
</nav>
</header>
<main>
{{ block "main" . }}{{ end }}
</main>
<footer>
<div class="footer__container">
<img id="footer-image-human" class="footer__author-photo" src="/human.png" srcset="/human.png 1x, /[email protected] 2x" alt="Author Photo">
<img id="footer-image-robot" class="footer__author-photo" src="/robot.png" srcset="/robot.png 1x, /[email protected] 2x" alt="Author Photo">
<p class="footer__about_text">Hello, I'm Alex.<br />
Welcome to DevSparks, a cosy corner of the web where code meets fun. I've always believed that the best way to learn is
by doing, and the best way to do is by having fun. That's why I've created DevSparks - to share the joy and the power of
development with you.<br />
Here, you'll find bite-sized lifehacks about everything from CLI power usage to git tricks, all crafted with a dash of
humor and a bucketload of passion.<br />
So grab a cup of coffee, get comfy, and let's explore the incredible world of coding together!</p>
</div>
</footer>
<script src="{{ "js/theme.js" | relURL }}" defer></script>
<script src="{{ "js/footer-image.js" | relURL }}" defer></script>
<body class="{{ with .Site.Params.theme }}body__theme__{{ . }}{{ else }}body__theme__light{{ end }}">
<header class="layout__header">
<nav>
{{ $currentPage := . }}
{{ range .Site.Menus.main }}
<a class="{{if or (eq $currentPage.RelPermalink .URL) (eq $currentPage.Section .Identifier) }} layout__link__active{{end}}" href="{{.URL}}">{{ .Name }}</a>
{{ end }}
</nav>
<nav>
<a href="https://github.com/goooseman/devsparks-blog/issues/new?title=DevSparks+Feedback&body=I+found+something+wrong+on+this+page%3A%0A%0A++{{ .Permalink }}%0A%0A++Here%27s+what+it+is%3A" target="_blank" rel="noopener noreferrer">Fix typo</a>
<button id="theme-switch" class="header__theme_switch" aria-label="Switch to dark theme">🌒</button>
</nav>
</header>
<main>
{{ block "main" . }}{{ end }}
</main>
<footer>
<div class="footer__container">
<img id="footer-image-human" src="/human.png" srcset="/[email protected] 2x" alt="Author photo">
<img id="footer-image-robot" src="/robot.png" srcset="/[email protected] 2x" alt="Author photo" style="display: none;">
<div class="footer__about_text">
Footer Ipsum
</div>
</div>
</footer>
</body>
</html>
47 changes: 24 additions & 23 deletions versions/latest/themes/devsparks/layouts/_default/list.html
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
{{ define "main" }}
{{ if eq .Title "Hacks" }}
<h1>{{ .Title }}</h1>
{{ else }}
<h1>{{ .Title }}</h1>
{{ end }}
{{ range (where .Site.RegularPages "Type" "in" (slice "hacks")).GroupByDate "2006" }}
<h2>{{ .Key }}</h2>
<ul>
{{ range .Pages }}
<li>
<span class="date">{{ .Date.Format (.Site.Params.dateFormat | default "January 2, 2006" ) }}</span>
<a class="title" href="{{ .Params.externalLink | default .RelPermalink }}">{{ .Title }}</a>
{{ if .Params.tags }}
<span class="tags">
{{ range .Params.tags }}
<a href="/tags/{{ . | urlize }}">{{ . }}</a>
{{ end }}
</span>
{{ end }}
</li>
{{ end }}
</ul>
{{ end }}
{{ if eq .Kind "home" }}
<h1>Hacks</h1>
{{ else }}
<h1>{{ .Title }}</h1>
{{ end }}

{{ range (where .Site.RegularPages "Type" "in" (slice "hacks")).GroupByDate "2006" }}
<h2>{{ .Key }}</h2>
<ul>
{{ range .Pages }}
<li>
<a class="title" href="{{ .Params.externalLink | default .RelPermalink }}">{{ .Title }}</a>
<span class="date">{{ .Date.Format (.Site.Params.dateFormat | default "January 2, 2006" ) }}</span>
{{ with .Params.tags }}
<span class="tags">
{{ range . }}
<a class="tag" href="{{ $.Site.BaseURL }}tags/{{ . | urlize }}">{{ . }}</a>
{{ end }}
</span>
{{ end }}
</li>
{{- end -}}
</ul>
{{ end }}
{{ end }}
32 changes: 16 additions & 16 deletions versions/latest/themes/devsparks/layouts/_default/single.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{{ define "main" }}
<article>
<h1 class="article__title">{{ .Title }}</h1>
{{ with .Date }}
<p class="article__date">{{ .Format "January 2, 2006" }}</p>
<article>
<h1 class="article__title">{{ .Title }}</h1>
{{ if .Date }}
<time class="article__date">{{ .Date.Format "January 2, 2006" }}</time>
{{ end }}
{{ with .Params.tags }}
<div class="article__tags">
{{ range . }}
<a href="{{ $.Site.BaseURL }}tags/{{ . | urlize }}">{{ . }}</a>
{{ end }}
{{ with .Params.tags }}
<p class="article__tags">
{{ range . }}
<a href="/tags/{{ . | urlize }}">{{ . }}</a>
{{ end }}
</p>
{{ end }}
<div class="article__content">
{{ .Content }}
</div>
<div id="remark42" class="article__remark42"></div>
</article>
</div>
{{ end }}
<div class="article__content">
{{ .Content }}
</div>
<div id="remark42" class="article__remark42"></div>
</article>
{{ end }}
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{{< hackermans-tip >}}
<div class="tip__container section__tip__hackerman">
<h4 class="tip__title">Hackerman's tip</h4>
<img class="tip__image" src="/hackerman.png" srcset="/hackerman.png 1x, /hackerman@2x.png 2x" alt="Hackerman Image">
<img class="tip__image" src="/hackerman.png" srcset="/[email protected] 2x" alt="Hackerman's tip image">
{{ .Inner | markdownify }}
</div>
</div>
{{< /hackermans-tip >}}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="tip__container section__tip__padawan">
<h4 class="tip__title">Padawan's Playground</h4>
<img class="tip__image" src="/padawan.png" srcset="/padawan.png 1x, /padawan@2x.png 2x" alt="Padawan Image">
<img class="tip__image" src="/padawan.png" srcset="/[email protected] 2x" alt="Padawan's Playground">
{{ .Inner | markdownify }}
</div>
Loading

0 comments on commit 6053084

Please sign in to comment.