Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
shivan-s committed Oct 11, 2024
0 parents commit 25b1194
Show file tree
Hide file tree
Showing 18 changed files with 238 additions and 0 deletions.
4 changes: 4 additions & 0 deletions archetypes/default.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
---
9 changes: 9 additions & 0 deletions content/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: "Home"
---

# Hi there

Welcome to your new Hugo site.

Now go build something great.
5 changes: 5 additions & 0 deletions content/about/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: "About"
---

Here's a bit about me.
6 changes: 6 additions & 0 deletions content/posts/my-first-post.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: "My First Post"
date: 2020-09-03T17:27:59+07:00
---

Here's an example blog post.
9 changes: 9 additions & 0 deletions exampleSite/content/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: "Home"
---

# Hi there

Welcome to your new Hugo site.

Now go build something great.
5 changes: 5 additions & 0 deletions exampleSite/content/about/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: "About"
---

Here's a bit about me.
6 changes: 6 additions & 0 deletions exampleSite/content/posts/my-first-post.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: "My First Post"
date: 2020-09-03T17:27:59+07:00
---

Here's an example blog post.
16 changes: 16 additions & 0 deletions exampleSite/hugo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
baseURL = "https://mynewhugosite.com"
title = "My New Hugo Site"
theme = "hugo-starter"

[menu]
[[menu.main]]
identifier = "posts"
name = "Posts"
url = "/posts"
weight = 10

[[menu.main]]
identifier = "about"
name = "About"
url = "/about"
weight = 20
16 changes: 16 additions & 0 deletions hugo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
baseURL = "https://mynewhugosite.com"
title = "My New Hugo Site"
theme = "hugo-starter"

[menu]
[[menu.main]]
identifier = "posts"
name = "Posts"
url = "/posts"
weight = 10

[[menu.main]]
identifier = "about"
name = "About"
url = "/about"
weight = 20
9 changes: 9 additions & 0 deletions layouts/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{{ partial "header.html" . }}

<h1>Page Not Found</h1>

<p>This page doesn't exist.</p>

<p><a href="/">Go back to the home page</a></p>

{{ partial "footer.html" . }}
18 changes: 18 additions & 0 deletions layouts/_default/list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{{ partial "header.html" . }}

<h1>{{ .Title }}</h1>

{{ .Content }}

{{ range.Data.Pages }}
<article class="post-snippet">
<h3>
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
</h3>
<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">
{{ .Date.Format "January 2, 2006" }}
</time>
</article>
{{ end }}

{{ partial "footer.html" . }}
7 changes: 7 additions & 0 deletions layouts/_default/single.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{{ partial "header.html" . }}

<h1>{{ .Title }}</h1>

{{ .Content }}

{{ partial "footer.html" . }}
5 changes: 5 additions & 0 deletions layouts/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{{ partial "header.html" . }}

{{ .Content }}

{{ partial "footer.html" . }}
8 changes: 8 additions & 0 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
</main>

<footer>
<p>&copy;{{ dateFormat "2006" now }} {{ .Site.Title }}</p>
</footer>

</body>
</html>
22 changes: 22 additions & 0 deletions layouts/partials/header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html lang="en">
<head>

<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<title>{{ if not .IsHome }}{{ .Title }} | {{ end }}{{ .Site.Title }}</title>

<link rel="stylesheet" href="/css/style.css" type="text/css" media="all" />

{{ with .OutputFormats.Get "rss" -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end -}}

</head>

<body>

{{ partial "nav.html" . }}

<main class="content">
14 changes: 14 additions & 0 deletions layouts/partials/nav.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<header class="site-header">
<nav class="site-nav">
<a class="logo" href="{{ .Site.BaseURL }}">
{{ .Site.Title }}
</a>
<ul class="main-menu">
{{ range.Site.Menus.main }}
<li>
<a href="{{ .URL }}">{{ .Name }}</a>
</li>
{{ end }}
</ul>
</nav>
</header>
20 changes: 20 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Hugo Starter Theme

Dead-simple Hugo theme with everything you need to get started. Intended to be a starter for creating your own theme without including useless bloat like most Hugo themes.

## Getting started

Inside your project folder, copy the theme to your `themes` folder. Since you're just using it as a starter for your theme, remove the git history.

```bash
git clone https://github.com/ericmurphyxyz/hugo-starter-theme themes/your-theme-name
rm -rf themes/your-theme-name/.git
```

If you'd like some example content and an example config file to get started, you can copy the `exampleSite` directory into your root Hugo directory.

```bash
cp -r themes/your-theme-name/exampleSite/* ./
```

To learn more about building themes in Hugo, refer to Hugo's [templating documentation](https://gohugo.io/templates/).
59 changes: 59 additions & 0 deletions static/css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/* LAYOUT */

body {
color: #333;
font-size: 125%;
line-height: 1.5;
max-width: 45rem;
padding: 1rem;
margin: 0 auto;
}

.content {
margin-bottom: 2rem;
}

/* NAVIGATION */

.site-nav {
display: flex;
}

.site-nav a {
display: block;
padding: 1rem;
}

.site-nav .logo {
font-weight: bold;
padding-left: 0;
}

.main-menu {
display: flex;
list-style: none;
margin: 0;
padding: 0;
}

@media screen and (max-width: 48rem) {
.site-nav,
.main-menu {
flex-direction: column;
}

.site-nav a {
padding: 0.5rem;
padding-left: 0;
}
}

/* LISTS */

.post-snippet {
margin-bottom: 1rem;
}

.post-snippet h3 {
margin-bottom: 0.25rem;
}

0 comments on commit 25b1194

Please sign in to comment.