Merge pull request #16 from jakewies/fixes

This commit is contained in:
Jake Wiesler 2020-06-17 11:46:46 -04:00 committed by GitHub
commit 02b7d5f354
7 changed files with 47 additions and 94 deletions

View File

@ -5,39 +5,20 @@ A minimal blog theme built for [Hugo](https://gohugo.io/) 🍜
- An about page 👋🏻 and a blog 📝
- Blog posts can be tagged 🏷
### Getting Started
### Getting started
**1. Start a new `hugo` site**
At the root of your Hugo project, run:
```
hugo new site my-new-site
cd my-new-site
```
**2. Initialize project with `git`**
```
git init
```
**3. Add `hugo-theme-codex` as a submodule**
```
```bash
git submodule add https://github.com/jakewies/hugo-theme-codex.git themes/codex
```
**4. List `"codex"` as the name of your theme in `config.toml`**
Next, copy the contents of the [default `config.toml`](https://github.com/jakewies/hugo-theme-codex/blob/master/exampleSite/config.toml) to your site's `config.toml`. Make sure to read all the comments, as there a few nuances with Hugo themes that require some changes to that file.
```toml
# config.toml
theme = "codex"
```
**5. Start the server**
Finally, run:
```
hugo server -D
hugo server -D
```
**Note: If you are seeing a blank page it is probably because you have nothing in your `content/` directory. Read on to fix that.**

View File

@ -1,29 +0,0 @@
# OVERRIDE #
languageCode = "en-us"
title = "Codex"
baseURL = "https://example.org/"
copyright = "© {year}"
# OVERRIDE #
# DONT OVERRIDE #
[[menu.main]]
identifier = "about"
name = "about"
title = "About"
url = "/"
[[menu.main]]
identifier = "blog"
name = "blog"
title = "Blog"
url = "/blog"
preserveTaxonomyNames = true
[taxonomies]
tag = "tags"
# DONT OVERRIDE #

View File

@ -1,19 +1,44 @@
title = "Codex"
baseURL = "https://example.com"
# Override these settings with your own
languageCode = "en-us"
baseURL = "https://example.org/"
copyright = "© {year}"
# This is just to get the exampleSite to work with the theme
# in this repository. Don't mimic this. When using the theme
# you should place it in themes/codex and list theme = "codex"
theme = "hugo-theme-codex"
themesDir = "../../"
# The value "hugo-theme-codex" is only to get the exampleSite
# to work in this repo. Change to whatever name you gave the theme
# when you added it. If you followed the README, you should have
# added the theme using the name "codex".
theme = "hugo-theme-codex"
# REMOVE THIS!
# This is only to get the exampleSite to work in this repo.
themesDir = "../../"
# Optional params
[params]
# This will show the twitter icon which will link to twitter.com/your-twitter-handle
# You can omit the @ symbol
twitter = "your-twitter-handle"
# This will show the github icon which will link to github.com/your-github-handle
# You can omit the @ symbol
github = "your-github-handle"
# Show Twitter icon linking to twitter.com/your-twitter-handle
twitter = "your-twitter-handle" # omit @
# Show Github icon linking to github.com/your-github-handle
github = "your-github-handle" # omit @
# This disables Hugo's default syntax highlighting in favor
# of prismjs. If you wish to use Hugo's default syntax highlighting
# over prismjs, remove this. You will also need to remove the prismjs
# vendor script in layouts/blog/single.html.
[markup]
[markup.highlight]
codeFences = false
# Controls the navigation
[[menu.main]]
identifier = "about"
name = "about"
title = "About"
url = "/"
[[menu.main]]
identifier = "blog"
name = "blog"
title = "Blog"
url = "/blog"

View File

@ -33,10 +33,6 @@ gulp.task("js", function () {
.pipe(gulp.dest("static/js"));
});
gulp.task("vendor", function () {
return gulp.src("src/vendor/**/**").pipe(gulp.dest("static/vendor"));
});
gulp.task("watch", function () {
gulp.watch("src/styles/**/*.styl", gulp.series("styles"));
gulp.watch("src/js/**/*.js", gulp.series("js"));
@ -46,4 +42,4 @@ gulp.task("watch", function () {
// before watching the src/styles and src/js directoryies
gulp.task("default", gulp.series(gulp.parallel("styles", "js"), "watch"));
// The build task is run on yarn build:assets
gulp.task("build", gulp.parallel("styles", "js", "vendor"));
gulp.task("build", gulp.parallel("styles", "js"));

View File

@ -25,5 +25,5 @@
<p>{{ replace .Site.Copyright "{year}" now.Year }}</p>
</footer>
{{ end }} {{ define "scripts" }}
<script src="/vendor/prism/prism.js"></script>
<script src="https://unpkg.com/prismjs@^1.2"></script>
{{ end }}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long