Browse Source

refactor: move test/ and yarn to repo root

Also lint and format entire repo, beyond just wowchemy/ dir

URL encode `(` and `)` in `[#MadeWithWowchemy](...(..)...)` in Readme.md for Prettier
George Cushen 3 years ago
parent
commit
3f1c4b4df2

+ 1 - 0
wowchemy/.eslintignore → .eslintignore

@@ -1,3 +1,4 @@
 **/*.min.js
 **/_vendor/
 **/vendor/
+public/

+ 0 - 0
wowchemy/.eslintrc.yml → .eslintrc.yml


+ 8 - 7
.github/ISSUE_TEMPLATE/bug-report.md

@@ -10,9 +10,9 @@ Welcome to Wowchemy's GitHub repo 👋
 
 We use GitHub only for bug reports and feature requests - it's our project management tool.
 
-🚑 For **help** and **questions**, solve common issues with the [Troubleshooting Guide](https://wowchemy.com/docs/faq/).
+🚑 For **help** and **questions**, solve common issues with the [Troubleshooting Guide](https://wowchemy.com/docs/guide/troubleshooting/).
 
-For other issues, search if your question has already been asked on the community **[chat](https://discord.gg/z8wNYzb)**  and **[forum](https://github.com/wowchemy/wowchemy-hugo-modules/discussions)**, and if not, consider posting a new thread there.
+For other issues, search if your question has already been asked on the community **[chat](https://discord.gg/z8wNYzb)** and **[forum](https://github.com/wowchemy/wowchemy-hugo-modules/discussions)**, and if not, consider posting a new thread there.
 
 Also, you can search and browse the extensive [Wowchemy](https://wowchemy.com/docs/) and [Hugo](https://gohugo.io/documentation/) **documentation**.
 
@@ -25,6 +25,7 @@ A clear and concise description of what the bug is.
 ### To Reproduce
 
 Steps to reproduce the behavior:
+
 1. Go to '...'
 2. Click on '....'
 3. See error '...'
@@ -35,10 +36,10 @@ A clear and concise description of what you expected to happen.
 
 ### Technical details:
 
-* Link to your GitHub project: 
-* Wowchemy Version (from your `go.mod`): 
-* Hugo Version (run `hugo version`): 
-* Browser/OS: 
-* Wowchemy Template: 
+- Link to your GitHub project:
+- Wowchemy Version (from your `go.mod`):
+- Hugo Version (run `hugo version`):
+- Browser/OS:
+- Wowchemy Template (e.g. Academic):
 
 If applicable, add screenshots to help explain the issue.

+ 6 - 7
.github/contributing.md

@@ -22,12 +22,11 @@ If you have an idea for a new feature, please start by [searching the issues](ht
 
 Code linting and formatting form part of the Continuous Integration process to help catch bugs and code issues in contributions.
 
-Contributors can also run the flow on their fork of the  "Wowchemy Hugo Modules" repo when making contributions (you'll need Node and Yarn to run):
+Contributors can also run the flow on their fork of the "Wowchemy Hugo Modules" repo when making contributions (you'll need Node and Yarn to run):
+
 ```sh
-cd wowchemy
 yarn install
-yarn run lint:js
-yarn run lint:style
+yarn run lint
 yarn run format
 ```
 
@@ -39,7 +38,7 @@ yarn run format
 
 [Create and publish your own shortcode](https://github.com/wowchemy/wowchemy-shortcode-starter)
 
-### Contribute a language pack 
+### Contribute a language pack
 
 To contribute a **new language pack** or an improvement to a language pack, refer to the [language pack guide](https://wowchemy.com/docs/language/#create-or-modify-a-language-pack). Once created, [fork Wowchemy Hugo Modules](https://github.com/wowchemy/wowchemy-hugo-modules), place your language pack in `wowchemy/i18n/`, add the name of the language to `wowchemy/data/i18n/language.yaml`, and open a Pull Request on Github with these two files.
 
@@ -59,8 +58,8 @@ To contribute to **Hugo Academic CLI**, the automatic publication importer, refe
 
 To help us develop this free software sustainably under the open source license, we ask all individuals and businesses that use it to help support its ongoing maintenance and development via sponsorship:
 
-  - ☕️ [**Donate a coffee**](https://paypal.me/cushen)
-  - ❤️ [**Become a sponsor and unlock awesome rewards**](https://wowchemy.com/plans/)
+- ☕️ [**Donate a coffee**](https://paypal.me/cushen)
+- ❤️ [**Become a sponsor and unlock awesome rewards**](https://wowchemy.com/plans/)
 
 ## Other ways to help
 

+ 2 - 2
.github/support.md

@@ -1,8 +1,8 @@
 # How to get support for Wowchemy 👨‍💬👩‍💬
 
-🚑 For **help** and **questions**, solve common issues with the [**Troubleshooting Guide**](https://wowchemy.com/docs/faq/).
+🚑 For **help** and **questions**, solve common issues with the [**Troubleshooting Guide**](https://wowchemy.com/docs/guide/troubleshooting/).
 
-For other issues, search if your question has already been asked on the community **[chat](https://discord.gg/z8wNYzb)**  and **[forum](https://github.com/wowchemy/wowchemy-hugo-modules/discussions)**, and if not, consider posting a new thread there.
+For other issues, search if your question has already been asked on the community **[chat](https://discord.gg/z8wNYzb)** and **[forum](https://github.com/wowchemy/wowchemy-hugo-modules/discussions)**, and if not, consider posting a new thread there.
 
 Please **_do not_** raise an issue on GitHub.
 

+ 1 - 7
.github/workflows/build-test-site.yaml

@@ -4,13 +4,9 @@ on:
   push:
     branches:
       - master
-    paths:
-      - 'wowchemy/**'
   pull_request:
     branches:
       - master
-    paths:
-      - 'wowchemy/**'
 
 jobs:
   build:
@@ -34,11 +30,9 @@ jobs:
 
       - name: Install JS dependencies
         run: rm -rf node_modules && yarn install --frozen-lockfile
-        working-directory: ./wowchemy
 
       - name: Check for linting errors
         run: yarn run lint
-        working-directory: ./wowchemy
 
 #  format:
 #    runs-on: ubuntu-latest
@@ -75,4 +69,4 @@ jobs:
 
       - name: Build
         run: hugo --minify
-        working-directory: ./wowchemy/test
+        working-directory: test

+ 13 - 0
.prettierignore

@@ -0,0 +1,13 @@
+_vendor/
+vendor/
+
+public/
+resources/
+
+*.html
+
+wowchemy/assets/css/reveal.css
+wowchemy/assets/scss/main.scss
+
+wowchemy/layouts/index.json
+wowchemy/layouts/index.webmanifest

+ 4 - 6
wowchemy/.prettierrc.js → .prettierrc.js

@@ -8,12 +8,10 @@ module.exports = {
   printWidth: 120,
   overrides: [
     {
-      files: [
-        "*.html"
-      ],
+      files: ['*.html'],
       options: {
-        parser: "go-template"
-      }
-    }
+        parser: 'go-template',
+      },
+    },
   ],
 };

+ 7 - 0
.stylelintignore

@@ -0,0 +1,7 @@
+**/*.min.css
+**/vendor/
+**/_vendor/
+public/
+
+wowchemy/assets/scss/main.scss
+wowchemy/assets/css/reveal_custom.css

+ 0 - 0
wowchemy/.stylelintrc.yaml → .stylelintrc.yaml


+ 5 - 5
README.md

@@ -17,7 +17,7 @@
 - 👉 [**Get Started**](https://wowchemy.com/templates/)
 - 📚 [View the **documentation**](https://wowchemy.com/docs/)
 - 💬 [Chat with the **Wowchemy community**](https://discord.gg/z8wNYzb) or [**Hugo community**](https://discourse.gohugo.io)
-- 🐦 Twitter: [@wowchemy](https://twitter.com/wowchemy) [@GeorgeCushen](https://twitter.com/GeorgeCushen) [#MadeWithWowchemy](https://twitter.com/search?q=(%23MadeWithWowchemy%20OR%20%23MadeWithAcademic)&src=typed_query)
+- 🐦 Twitter: [@wowchemy](https://twitter.com/wowchemy) [@GeorgeCushen](https://twitter.com/GeorgeCushen) [#MadeWithWowchemy](https://twitter.com/search?q=%28%23MadeWithWowchemy%20OR%20%23MadeWithAcademic%29&src=typed_query)
 - 💡 [Request a **feature** or report a **bug** for _Wowchemy_](https://github.com/wowchemy/wowchemy-hugo-modules/issues)
 - ⬆️ **Updating Wowchemy?** View the [Update Guide](https://wowchemy.com/docs/update/) and [Release Notes](https://wowchemy.com/updates/)
 
@@ -29,8 +29,8 @@ To help us develop this template and software sustainably under the MIT license,
 
 ## Ecosystem
 
-* **[Hugo Academic CLI](https://github.com/wowchemy/hugo-academic-cli/):** Automatically import academic publications from BibTeX
-* **[Hugo Assistant](https://github.com/sourcethemes/hugo-assistant):** Scripts to help migrate content to new versions of Hugo
+- **[Hugo Academic CLI](https://github.com/wowchemy/hugo-academic-cli/):** Automatically import academic publications from BibTeX
+- **[Hugo Assistant](https://github.com/sourcethemes/hugo-assistant):** Scripts to help migrate content to new versions of Hugo
 
 ## Features
 
@@ -38,7 +38,7 @@ To help us develop this template and software sustainably under the MIT license,
 
 **Key features:**
 
-- **Page builder** - Create *anything* with [**widgets**](https://wowchemy.com/docs/page-builder/) and [**elements**](https://wowchemy.com/docs/writing-markdown-latex/)
+- **Page builder** - Create _anything_ with [**widgets**](https://wowchemy.com/docs/page-builder/) and [**elements**](https://wowchemy.com/docs/writing-markdown-latex/)
 - **Edit any type of content** - Blog posts, publications, talks, slides, projects, and more!
 - **Create content** in [**Markdown**](https://wowchemy.com/docs/writing-markdown-latex/), [**Jupyter**](https://wowchemy.com/docs/import/jupyter/), or [**RStudio**](https://wowchemy.com/docs/install-locally/)
 - **Plugin System** - Fully customizable [**color** and **font themes**](https://wowchemy.com/templates/)
@@ -70,7 +70,7 @@ Choose a stunning theme for your site and [customize it](https://wowchemy.com/do
 
 ## Join the community
 
-Feel free to *star* the project on [Github](https://github.com/wowchemy/wowchemy-hugo-modules), [join the community](https://discord.gg/z8wNYzb) on Discord, and follow [@wowchemy](https://twitter.com/wowchemy) on Twitter to be the first to hear about new features.
+Feel free to _star_ the project on [Github](https://github.com/wowchemy/wowchemy-hugo-modules), [join the community](https://discord.gg/z8wNYzb) on Discord, and follow [@wowchemy](https://twitter.com/wowchemy) on Twitter to be the first to hear about new features.
 
 ## License
 

+ 1 - 1
netlify-cms-academic/README.md

@@ -8,7 +8,7 @@ Install the Hugo Module by adding the following to the bottom of your `config/_d
 
 ```toml
 [module]
-  
+
   # Any existing modules here...
 
   # Install Netlify CMS

+ 3 - 2
wowchemy/package.json → package.json

@@ -30,8 +30,9 @@
   "scripts": {
     "test": "echo \"Error: no test specified\" && exit 1",
     "lint": "yarn run lint:js && yarn run lint:style",
-    "lint:js": "eslint assets/js/",
-    "lint:style": "stylelint \"assets/scss/**/*.scss\"",
+    "lint:js": "eslint '*/**/*.{js,ts,tsx}'",
+    "lint:js:fix": "eslint '*/**/*.{js,ts,tsx}' --fix",
+    "lint:style": "stylelint '*/**/*.{css,scss}'",
     "format": "prettier --write \"*.{css,js,json,md,scss}\" \"./**/*.{css,js,json,md,scss}\"",
     "stylelint-conflict-check": "stylelint-config-prettier-check"
   }

+ 1 - 1
wowchemy/test/config.yaml → test/config.yaml

@@ -21,4 +21,4 @@ params:
       policy:
       report_only: false
   cms:
-    netlify_cms: false
+    branch: master

+ 0 - 0
wowchemy/test/content/home/index.md → test/content/home/index.md


+ 0 - 0
wowchemy/test/content/home/section.md → test/content/home/section.md


+ 2 - 2
wowchemy/test/go.mod → test/go.mod

@@ -2,6 +2,6 @@ module github.com/wowchemy/wowchemy-hugo-modules/test
 
 go 1.15
 
-require github.com/wowchemy/wowchemy-hugo-modules/wowchemy master
+require github.com/wowchemy/wowchemy-hugo-modules/wowchemy v0.0.0-20210202235530-9bbf6fa2a698
 
-replace github.com/wowchemy/wowchemy-hugo-modules/wowchemy => ../
+replace github.com/wowchemy/wowchemy-hugo-modules/wowchemy => ../wowchemy

+ 0 - 0
wowchemy/test/view.sh → test/view.sh


+ 1 - 1
themes/hello-world/assets/scss/template.scss

@@ -4,7 +4,7 @@
     max-width: 880px;
   }
 }
-@media (min-width: 992px){
+@media (min-width: 992px) {
   .home-section .container {
     max-width: 880px;
   }

+ 0 - 13
wowchemy/.prettierignore

@@ -1,13 +0,0 @@
-_vendor/
-vendor/
-
-public/
-resources/
-
-*.html
-
-assets/css/reveal.css
-assets/scss/main.scss
-
-layouts/index.json
-layouts/index.webmanifest

+ 0 - 5
wowchemy/.stylelintignore

@@ -1,5 +0,0 @@
-**/*.min.css
-**/vendor/
-**/_vendor/
-
-assets/scss/main.scss

+ 0 - 0
wowchemy/yarn.lock → yarn.lock