summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSerghei Iakovlev <egrep@protonmail.ch>2022-04-25 22:30:05 +0200
committerSerghei Iakovlev <egrep@protonmail.ch>2022-04-25 22:30:05 +0200
commit7b2124ea5f535116ec526ad09babe834cf2fe0a1 (patch)
treeb89e18b5529eb257c1ba7e744f2bac9306f9e2d8
parentc40490eb087e2013057bda62f394f4043b678d15 (diff)
downloadgohugo-theme-ed-7b2124ea5f535116ec526ad09babe834cf2fe0a1.tar.gz
Setup code linting
-rw-r--r--.github/workflows/cs.yml27
-rw-r--r--exampleSite/.gitignore3
-rw-r--r--exampleSite/config.toml36
-rw-r--r--exampleSite/go.mod7
-rw-r--r--exampleSite/go.sum0
-rw-r--r--go.mod3
-rw-r--r--package-lock.json14
-rw-r--r--package.hugo.json4
-rw-r--r--package.json30
9 files changed, 106 insertions, 18 deletions
diff --git a/.github/workflows/cs.yml b/.github/workflows/cs.yml
index 0b24e63..8f2efdb 100644
--- a/.github/workflows/cs.yml
+++ b/.github/workflows/cs.yml
@@ -18,29 +18,20 @@ on:
jobs:
lint:
- runs-on: ${{ matrix.os }}
+ runs-on: ubuntu-20.04
name: Code linting
- # The maximum number of minutes to let a workflow run
- # before GitHub automatically cancels it. Default: 360
- timeout-minutes: 30
-
- strategy:
- # When set to true, GitHub cancels
- # all in-progress jobs if any matrix job fails.
- fail-fast: false
-
- matrix:
- node:
- - '14.x'
- os:
- - ubuntu-20.04
-
steps:
- name: Checkout code
uses: actions/checkout@v3
- - name: Set up Node ${{ matrix.node }}
+ - name: Set up Node 14.x
uses: actions/setup-node@v3
with:
- node-version: ${{ matrix.node }}
+ node-version: '14.x'
+
+ - name: Install npm dependencies
+ run: npm ci
+
+ - name: Code linting
+ run: npm run lint
diff --git a/exampleSite/.gitignore b/exampleSite/.gitignore
new file mode 100644
index 0000000..332ee17
--- /dev/null
+++ b/exampleSite/.gitignore
@@ -0,0 +1,3 @@
+/public/
+
+.hugo_build.lock
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
new file mode 100644
index 0000000..faf4f98
--- /dev/null
+++ b/exampleSite/config.toml
@@ -0,0 +1,36 @@
+title = "Ed."
+baseURL = "https://example.com"
+languageCode = "en-us"
+theme = ["github.com/sergeyklay/gohugo-theme-ed"]
+resourceDir = "../resources"
+
+[Author] # Used in authorbox
+ name = "John Doe"
+
+[Params]
+ # Site description. Used in meta description
+ description = 'Ed is a Hugo theme designed for textual editors based on minimal computing principles, and focused on legibility and flexibility.'
+ # Color scheme. Options: red, orange, magenta, cyan, blue, brown
+ color_scheme = ''
+ # Github project url. Used in sidebar
+ github_url = 'https://github.com/sergeyklay/gohugo-theme-ed'
+ # Used in header
+ tagline = 'a Hugo theme for minimal editions'
+
+[menu]
+ [[menu.nav]]
+ name = "Posts"
+ url = "/posts/"
+ weight = 1
+ [[menu.nav]]
+ name = "Tags"
+ url = "/tags/"
+ weight = 2
+ [[menu.nav]]
+ name = "Documentation"
+ url = "/documentation/"
+ weight = 3
+ [[menu.nav]]
+ name = "About"
+ url = "/about/"
+ weight = 4
diff --git a/exampleSite/go.mod b/exampleSite/go.mod
new file mode 100644
index 0000000..b284689
--- /dev/null
+++ b/exampleSite/go.mod
@@ -0,0 +1,7 @@
+module github.com/sergeyklay/gohugo-theme-ed/exampleSite
+
+go 1.18
+
+replace github.com/sergeyklay/gohugo-theme-ed => ../
+
+require github.com/sergeyklay/gohugo-theme-ed v0.0.0-20220424201054-c40490eb087e // indirect
diff --git a/exampleSite/go.sum b/exampleSite/go.sum
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/exampleSite/go.sum
diff --git a/go.mod b/go.mod
new file mode 100644
index 0000000..002ccfa
--- /dev/null
+++ b/go.mod
@@ -0,0 +1,3 @@
+module github.com/sergeyklay/gohugo-theme-ed
+
+go 1.18
diff --git a/package-lock.json b/package-lock.json
new file mode 100644
index 0000000..fdfa4c2
--- /dev/null
+++ b/package-lock.json
@@ -0,0 +1,14 @@
+{
+ "name": "gohugo-theme-ed",
+ "version": "0.1.0",
+ "lockfileVersion": 2,
+ "requires": true,
+ "packages": {
+ "": {
+ "name": "gohugo-theme-ed",
+ "version": "0.1.0",
+ "license": "MIT",
+ "devDependencies": {}
+ }
+ }
+}
diff --git a/package.hugo.json b/package.hugo.json
new file mode 100644
index 0000000..eebbed5
--- /dev/null
+++ b/package.hugo.json
@@ -0,0 +1,4 @@
+{
+ "name": "gohugo-theme-ed",
+ "version": "0.1.0"
+} \ No newline at end of file
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..cdc35be
--- /dev/null
+++ b/package.json
@@ -0,0 +1,30 @@
+{
+ "author": "Serghei Iakovlev",
+ "bugs": {
+ "url": "https://github.com/sergeyklay/gohugo-theme-ed/issues"
+ },
+ "comments": {
+ "dependencies": {},
+ "devDependencies": {}
+ },
+ "dependencies": {},
+ "description": "Ed theme for minimal editions",
+ "devDependencies": {},
+ "homepage": "https://github.com/sergeyklay/gohugo-theme-ed#readme",
+ "keywords": [
+ "hugo",
+ "theme",
+ "minimal"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "gohugo-theme-ed",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sergeyklay/gohugo-theme-ed.git"
+ },
+ "scripts": {
+ "deploy": " cd exampleSite; hugo;"
+ },
+ "version": "0.1.0"
+}