mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-09 09:05:11 -04:00
Squashed 'themes/gohugoioTheme/' changes from 042112e2d..b7853ae70
b7853ae70 Import docsearch.js styles from node_modules. (#124) 37f678164 Remove highlight.js since it's unused. 9bfe65dc6 Correct a few links and minor meta tweaks. git-subtree-dir: themes/gohugoioTheme git-subtree-split: b7853ae70353cc881c396a5b6d739107122b0bf3
This commit is contained in:
parent
ccb3ee5c57
commit
ccb1e38f38
@ -16,7 +16,7 @@
|
||||
</a>
|
||||
</li>
|
||||
<li class="mb3 f4">
|
||||
<a href="http://themes.gohugo.io" class="link mid-gray dim">
|
||||
<a href="https://themes.gohugo.io/" class="link mid-gray dim">
|
||||
Design a theme {{ partial "svg/link-ext.svg" (dict "fill" "#333" "size" "14") }}
|
||||
</a>
|
||||
</li>
|
||||
|
@ -1 +1 @@
|
||||
<pre><code class="hljs nohighlight">{{ .Inner }}</code></pre>
|
||||
<pre><code class="nohighlight">{{ .Inner }}</code></pre>
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,11 +0,0 @@
|
||||
/* modified from:*/
|
||||
@import 'highlight.js/styles/atom-one-light.css';
|
||||
|
||||
/* hljs-template-variable covers the handlebars templating*/
|
||||
.hljs-template-variable {
|
||||
color: var(--primary-color);
|
||||
}
|
||||
|
||||
.hljs-attr {
|
||||
color: var(--accent-color-light);
|
||||
}
|
@ -10,7 +10,7 @@
|
||||
@import '_animation';
|
||||
@import '_documentation-styles';
|
||||
|
||||
@import '_algolia';
|
||||
@import 'docsearch.js/dist/cdn/docsearch.min';
|
||||
@import '_carousel';
|
||||
@import '_code';
|
||||
@import '_tabs';
|
||||
@ -21,7 +21,6 @@
|
||||
@import '_definition-lists';
|
||||
@import '_fluid-type';
|
||||
@import '_font-family';
|
||||
/*@import '_hljs';*/
|
||||
@import '_hugo-internal-template-styling';
|
||||
@import '_no-js';
|
||||
@import '_social-icons';
|
||||
|
@ -1,19 +0,0 @@
|
||||
var hljs = require('highlight.js/lib/highlight.js');
|
||||
|
||||
hljs.registerLanguage('bash', require('highlight.js/lib/languages/bash'));
|
||||
hljs.registerLanguage('css', require('highlight.js/lib/languages/css'));
|
||||
hljs.registerLanguage('markdown', require('highlight.js/lib/languages/markdown'));
|
||||
hljs.registerLanguage('diff', require('highlight.js/lib/languages/diff'));
|
||||
// hljs.registerLanguage('go', require('highlight.js/lib/languages/go'));
|
||||
hljs.registerLanguage('javascript', require('highlight.js/lib/languages/javascript'));
|
||||
hljs.registerLanguage('json', require('highlight.js/lib/languages/json'));
|
||||
hljs.registerLanguage('yaml', require('highlight.js/lib/languages/yaml'));
|
||||
hljs.registerLanguage('xml', require('highlight.js/lib/languages/xml'));
|
||||
hljs.registerLanguage('html', require('highlight.js/lib/languages/handlebars'));
|
||||
|
||||
hljs.registerLanguage("go", function(e) {
|
||||
var t = { keyword: "code output note warning break default func interface select case map struct chan else goto package switch const fallthrough if range end type continue for import return var go defer bool byte complex64 complex128 float32 float64 int8 int16 int32 int64 string uint8 uint16 uint32 uint64 int uint uintptr rune id autoplay Get", literal: "file download copy true false iota nil Pages with", built_in: "append cap close complex highlight copy imag len make new panic print println real recover delete Site Data tweet speakerdeck youtube ref relref vimeo instagram gist figure innershortcode" };
|
||||
return { aliases: ["golang","hugo"], k: t, i: "</", c: [e.CLCM, e.CBCM, { cN: "string", v: [e.QSM, { b: "'", e: "[^\\\\]'" }, { b: "`", e: "`" }] }, { cN: "number", v: [{ b: e.CNR + "[dflsi]", r: 1 }, e.CNM] }, { b: /:=/ }, { cN: "function", bK: "func", e: /\s*\{/, eE: !0, c: [e.TM, { cN: "params", b: /\(/, e: /\)/, k: t, i: /["']/ }] }] }
|
||||
});
|
||||
|
||||
hljs.initHighlightingOnLoad();
|
@ -3,7 +3,6 @@ import './anchorforid.js'
|
||||
import './clipboardjs.js'
|
||||
import './codeblocks.js'
|
||||
import './docsearch.js'
|
||||
//import './hljs.js'
|
||||
import './lazysizes.js'
|
||||
import './menutoggle.js'
|
||||
import './scrolldir.js'
|
||||
|
6
src/package-lock.json
generated
6
src/package-lock.json
generated
@ -2690,12 +2690,6 @@
|
||||
"minimalistic-assert": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"highlight.js": {
|
||||
"version": "9.12.0",
|
||||
"resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.12.0.tgz",
|
||||
"integrity": "sha1-5tnb5Xy+/mB1HwKvM2GVhwyQwB4=",
|
||||
"dev": true
|
||||
},
|
||||
"hmac-drbg": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz",
|
||||
|
@ -21,7 +21,6 @@
|
||||
"docsearch.js": "^2.3.3",
|
||||
"extract-text-webpack-plugin": "^2.1.0",
|
||||
"file-loader": "^0.11.1",
|
||||
"highlight.js": "^9.11.0",
|
||||
"lazysizes": "^3.0.0",
|
||||
"postcss": "^5.2.16",
|
||||
"postcss-cssnext": "^2.10.0",
|
||||
|
@ -1,20 +1,20 @@
|
||||
## Welcome to the SRC folder for the Gohugo Theme.
|
||||
|
||||
The contents of this folder are used to generate CSS and javascript. You may never have to touch anything here, unless you want to more deeply customize your styles.
|
||||
The contents of this folder are used to generate CSS and JavaScript. You may never have to touch anything here, unless you want to more deeply customize your styles.
|
||||
|
||||
## Tools
|
||||
|
||||
### NPM
|
||||
### npm
|
||||
|
||||
We use [NPM](https://www.npmjs.com/) for package management The theme's `.gitignore` file should be kept intact to make sure that all files in the `node_modules` folder are not pushed to the repository.
|
||||
We use [npm](https://www.npmjs.com/) for package management The theme's `.gitignore` file should be kept intact to make sure that all files in the `node_modules` folder are not pushed to the repository.
|
||||
|
||||
### Webpack
|
||||
|
||||
We use Webpack to manage our asset pipeline. Arguably, Webpack is overkill for this use-case, but we're using it here because once it's set up (which we've done for you), it's really easy to use. If you want to use an external script, just add it via Yarn, and reference it in main.js. You'll find instructions in the js/main.js file.
|
||||
|
||||
### PostCSS
|
||||
PostCSS is just CSS. You'll find `postcss.config.js` in the css folder. There you'll find that we're using [`postcss-import`](https://github.com/postcss/postcss-import) which allows us import css files directly from the node_modules folder, [`postcss-cssnext`](http://cssnext.io/features/) which gives us the power to use upcoming CSS features today. If you miss Sass you can find PostCss modules for those capabilities, too.
|
||||
|
||||
PostCSS is just CSS. You'll find `postcss.config.js` in the css folder. There you'll find that we're using [`postcss-import`](https://github.com/postcss/postcss-import) which allows us import css files directly from the node_modules folder, [`postcss-cssnext`](http://cssnext.io/features/) which gives us the power to use upcoming CSS features today. If you miss Sass you can find PostCss modules for those capabilities, too.
|
||||
|
||||
### Tachyons
|
||||
|
||||
@ -24,16 +24,14 @@ This theme uses the [Tachyons CSS Library](http://tachyons.io/). It's about 15kb
|
||||
|
||||
You'll find the commands to run in `src/package.json`.
|
||||
|
||||
For development, you'll need Node with NPM installed:
|
||||
For development, you'll need Node with npm installed:
|
||||
|
||||
```
|
||||
```bash
|
||||
$ cd themes/gohugo-theme/src/
|
||||
|
||||
$ npm install
|
||||
|
||||
$ npm start
|
||||
|
||||
```
|
||||
|
||||
This will process both the postcss and scripts.
|
||||
|
||||
For production, instead of `npm start`, run `npm run build:production,` which will output minified versions of your files.
|
||||
|
2
static/dist/main.css
vendored
2
static/dist/main.css
vendored
File diff suppressed because one or more lines are too long
@ -3,9 +3,9 @@
|
||||
|
||||
name = "Hugo Theme"
|
||||
license = "MIT"
|
||||
licenselink = "https://github.com/budparr/gohugo.io/blob/master/LICENSE.md"
|
||||
licenselink = "https://github.com/gohugoio/gohugoioTheme/blob/master/license.md"
|
||||
description = ""
|
||||
homepage = "https://github.com/budparr/gohugo.io"
|
||||
homepage = "https://github.com/gohugoio/gohugoioTheme"
|
||||
tags = ["website"]
|
||||
features = ["", ""]
|
||||
min_version = 0.38
|
||||
|
Loading…
x
Reference in New Issue
Block a user