mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-13 22:16:02 +00:00
Move pipeline to root
This commit is contained in:
1 parent
0366c01b34
commit
c21fea827d
201 files changed
+111
-101
No files matched your search
+1
-1
@@ -1,4 +1,4 @@
|
||||
themes/hugodocs/pipeline/node_modules
|
||||
pipeline/node_modules
|
||||
ryans-notes.md
|
||||
notes-for-reviewers.md
|
||||
functions-page.md
|
||||
|
||||
+1
-1
@@ -42,7 +42,7 @@ stepAnalysis = true
|
||||
# This is the top-level, global site title
|
||||
title = "Hugo"
|
||||
# Change this once you've created your theme
|
||||
theme = "hugodocs"
|
||||
theme = ""
|
||||
# Set to true to convert mysite/section/ to mysite/section.html
|
||||
uglyURLs = false
|
||||
verbose = false
|
||||
|
||||
@@ -37,7 +37,7 @@ If you make use of the [multilingual feature](/content-management/multilingual/)
|
||||
|
||||
A menu entry has the following properties (i.e., variables) available to it:
|
||||
|
||||
{{< readfile file="readfiles/menuvars.md" markdown="true" >}}
|
||||
{{< readfile file="content/readfiles/menuvars.md" markdown="true" >}}
|
||||
|
||||
## Adding content to menus
|
||||
|
||||
|
||||
@@ -342,48 +342,7 @@ Hugo typically configures Blackfriday with sane default values. These defaults s
|
||||
|
||||
However, if you have specific needs with respect to Markdown, Hugo exposes some of its Blackfriday behavior options for you to alter. The following table lists these Hugo options, paired with the corresponding flags from Blackfriday's source code ( [html.go](https://github.com/russross/blackfriday/blob/master/html.go) and [markdown.go](https://github.com/russross/blackfriday/blob/master/markdown.go)).
|
||||
|
||||
**WIP: WORKING ON MOVING BF CONFIG FROM TABLE TO DL**
|
||||
|
||||
`taskLists`
|
||||
: default: **`true`**<br>
|
||||
Blackfriday flag: **``**<br>
|
||||
Purpose: `false` turns off GitHub-style automatic task/TODO list generation
|
||||
|
||||
`smartypants`
|
||||
: default: **`true`** <br>
|
||||
Blackfriday flag: **`HTML_USE_SMARTYPANTS`** <br>
|
||||
Purpose: `false` disables smart punctuation substitutions, including smart quotes, smart dashes, smart fractions, etc. If `true`, it may be fine-tuned with the `angledQuotes`, `fractions`, `smartDashes`, and `latexDashes` flags (see below).
|
||||
|
||||
`angledQuotes`
|
||||
: default: **`false`**<br>
|
||||
Blackfriday flag: **`HTML_SMARTYPANTS_ANGLED_QUOTES`**<br>
|
||||
Purpose: `true` enables smart, angled double quotes. Example: "Hugo" renders to renders to «Hugo» instead of “Hugo”.
|
||||
|
||||
`fractions`
|
||||
: default: **`true`**<br>
|
||||
Blackfriday flag: **`HTML_SMARTYPANTS_FRACTIONS`** <br>
|
||||
Purpose: <code>false</code> disables smart fractions.<br>
|
||||
Example: `5/12` renders to <sup>5</sup>⁄<sub>12</sub>(<code><sup>5</sup>&frasl;<sub>12</sub></code>).<br> <strong>Caveat:</strong> Even with <code>fractions = false</code>, Blackfriday still converts `1/2`, `1/4`, and `3/4` respectively to ½ (<code>&frac12;</code>), ¼ (<code>&frac14;</code>) and ¾ (<code>&frac34;</code>), but only these three.</small>
|
||||
|
||||
`smartDashes`
|
||||
: default: **`true`** <br>
|
||||
Blackfriday flag: **`HTML_SMARTY_DASHES`** <br>
|
||||
Purpose: `false` disables smart dashes; i.e., the conversion of multiple hyphens into an en dash or em dash. If `true`, its behavior can be modified with the `latexDashes` flag below.
|
||||
|
||||
`latexDashes`
|
||||
: default: **`true`** <br>
|
||||
Blackfriday flag: **`HTML_SMARTYPANTS_LATEX_DASHES`** <br>
|
||||
Purpose: `false` disables LaTeX-style smart dashes and selects conventional smart dashes. Assuming `smartDashes`: <br>
|
||||
If `true`, `--` is translated into – (`–`), whereas `---` is translated into — (`—`). <br>
|
||||
However, *spaced* single hyphen between two words is translated into an en dash— e.g., "`12 June - 3 July`" becomes `12 June ndash; 3 July` upon rendering.
|
||||
|
||||
`hrefTargetBlank`
|
||||
: default: **`false`** <br>
|
||||
Blackfriday flag: **`HTML_HREF_TARGET_BLANK`** <br>
|
||||
Purpose: `true` opens external links in a new window or tab.
|
||||
|
||||
|
||||
{{< bfconfig >}}
|
||||
{{< readfile file="content/readfiles/bfconfig.md" markdown="true" >}}
|
||||
|
||||
{{% note %}}
|
||||
1. Blackfriday flags are *case sensitive* as of Hugo v0.15.
|
||||
|
||||
@@ -9,8 +9,8 @@ These files are called using the [`readfile` shortcode (source)](../layouts/read
|
||||
|
||||
You can call this shortcode in the docs as follows:
|
||||
|
||||
```
|
||||
{{% readfile file="path/to/file.txt" markdown="true" %}}
|
||||
```
|
||||
|
||||
<code>{</code><code>{</code>% readfile file="path/to/file.txt" markdown="true" %<code>}</code><code>}</code>
|
||||
|
||||
|
||||
`markdown="true"` is optional (default = `"false"`) and parses the string through the Blackfriday renderer.
|
||||
@@ -0,0 +1,55 @@
|
||||
`taskLists`
|
||||
: default: **`true`**<br>
|
||||
Blackfriday flag: <br>
|
||||
Purpose: `false` turns off GitHub-style automatic task/TODO list generation
|
||||
|
||||
`smartypants`
|
||||
: default: **`true`** <br>
|
||||
Blackfriday flag: **`HTML_USE_SMARTYPANTS`** <br>
|
||||
Purpose: `false` disables smart punctuation substitutions, including smart quotes, smart dashes, smart fractions, etc. If `true`, it may be fine-tuned with the `angledQuotes`, `fractions`, `smartDashes`, and `latexDashes` flags (see below).
|
||||
|
||||
`angledQuotes`
|
||||
: default: **`false`**<br>
|
||||
Blackfriday flag: **`HTML_SMARTYPANTS_ANGLED_QUOTES`**<br>
|
||||
Purpose: `true` enables smart, angled double quotes. Example: "Hugo" renders to renders to «Hugo» instead of “Hugo”.
|
||||
|
||||
`fractions`
|
||||
: default: **`true`**<br>
|
||||
Blackfriday flag: **`HTML_SMARTYPANTS_FRACTIONS`** <br>
|
||||
Purpose: <code>false</code> disables smart fractions.<br>
|
||||
Example: `5/12` renders to <sup>5</sup>⁄<sub>12</sub>(<code><sup>5</sup>&frasl;<sub>12</sub></code>).<br> <strong>Caveat:</strong> Even with <code>fractions = false</code>, Blackfriday still converts `1/2`, `1/4`, and `3/4` respectively to ½ (<code>&frac12;</code>), ¼ (<code>&frac14;</code>) and ¾ (<code>&frac34;</code>), but only these three.</small>
|
||||
|
||||
`smartDashes`
|
||||
: default: **`true`** <br>
|
||||
Blackfriday flag: **`HTML_SMARTY_DASHES`** <br>
|
||||
Purpose: `false` disables smart dashes; i.e., the conversion of multiple hyphens into an en dash or em dash. If `true`, its behavior can be modified with the `latexDashes` flag below.
|
||||
|
||||
`latexDashes`
|
||||
: default: **`true`** <br>
|
||||
Blackfriday flag: **`HTML_SMARTYPANTS_LATEX_DASHES`** <br>
|
||||
Purpose: `false` disables LaTeX-style smart dashes and selects conventional smart dashes. Assuming `smartDashes`: <br>
|
||||
If `true`, `--` is translated into – (`–`), whereas `---` is translated into — (`—`). <br>
|
||||
However, *spaced* single hyphen between two words is translated into an en dash— e.g., "`12 June - 3 July`" becomes `12 June ndash; 3 July` upon rendering.
|
||||
|
||||
`hrefTargetBlank`
|
||||
: default: **`false`** <br>
|
||||
Blackfriday flag: **`HTML_HREF_TARGET_BLANK`** <br>
|
||||
Purpose: `true` opens external links in a new window or tab.
|
||||
|
||||
`plainIDAnchors`
|
||||
: default **`true`** <br>
|
||||
Blackfriday flag: **`FootnoteAnchorPrefix` and `HeaderIDSuffix`** <br>
|
||||
Purpose: `true` renders any heading and footnote IDs without the document ID. <br>
|
||||
Example: renders `#my-heading` instead of `#my-heading:bec3ed8ba720b970`
|
||||
|
||||
`extensions`
|
||||
: default: **`[]`** <br>
|
||||
Blackfriday flag: **`EXTENSION_*`** <br>
|
||||
Purpose: Enable one or more Blackfriday's Markdown extensions (if they aren't Hugo defaults). <br>
|
||||
Example: Include `hardLineBreak` in the list to enable Blackfriday's `EXTENSION_HARD_LINK_BREAK`
|
||||
|
||||
`extensionsmask`
|
||||
: default: **`[]`** <br>
|
||||
Blackfriday flag: **`EXTENSION_*`** <br>
|
||||
Purpose: Enable one or more of Blackfriday's Markdown extensions (if they aren't Hugo defaults). <br>
|
||||
Example: Include `autoHeaderIds` in the list of disable Blackfriday's `EXTENSION_AUTO_HEADER_IDS`.
|
||||
File renamed without changes.
File renamed without changes.
@@ -82,24 +82,24 @@ Here is the templating for our new `readfile` shortcode:
|
||||
This shortcode is [also part of the Hugo docs][readfilesource]. The Hugo docs also includes this [`testing.txt`][testfile] file in a `readfiles` directory. We can call pass this file into our new `readfile` shortcode as follows:
|
||||
|
||||
```
|
||||
{{</* readfile file="readfiles/testing.txt" */>}}
|
||||
{{</* readfile file="content/readfiles/testing.txt" */>}}
|
||||
```
|
||||
|
||||
The output "string" for calling this file is as follows:
|
||||
|
||||
```markdown
|
||||
{{< readfile file="readfiles/testing.txt" >}}
|
||||
{{< readfile file="content/readfiles/testing.txt" >}}
|
||||
```
|
||||
|
||||
However, if we want Hugo to pass this string through Blackfriday, we should add the `markdown="true"` optional parameter:
|
||||
|
||||
```html
|
||||
{{</* readfile file="readfiles/testing.txt" markdown="true" */>}}
|
||||
{{</* readfile file="content/readfiles/testing.txt" markdown="true" */>}}
|
||||
```
|
||||
|
||||
And here is it is [called directly in the Hugo docs][] content file used to creat this page and rendered for display:
|
||||
|
||||
{{< readfile file="readfiles/testing.txt" markdown="true">}}
|
||||
{{< readfile file="content/readfiles/testing.txt" markdown="true">}}
|
||||
|
||||
[called directly in the Hugo docs]: https://github.com/spf13/hugo/blob/master/docs/content/templates/local-file-templates.md
|
||||
[dirindex]: https://github.com/spf13/hugo/blob/master/docs/layouts/shortcodes/directoryindex.html
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,26 @@
|
||||
{{ define "main" }}
|
||||
<main id="homepage">
|
||||
<div class="homepage-image">
|
||||
<img src="{{"images/hugo-logo/hugo-h-only.png" | relURL}}" alt="Official full-size Hugo logo">
|
||||
</div>
|
||||
<ul class="homepage-cards">
|
||||
{{range $key,$values := sort (.Site.Data.sitenavigation) "order" }}
|
||||
<li class="homepage-card">
|
||||
<a href="{{ $values.url }}">
|
||||
<section>
|
||||
<div class="homepage-card-image-wrapper">
|
||||
<img class="hugo-icon" src="/images/hugo-icons/{{ $values.url }}.svg" alt="">
|
||||
</div>
|
||||
<div class="homepage-card-copy">
|
||||
<header>
|
||||
<h2>{{ $values.title }}</h2>
|
||||
</header>
|
||||
<p>{{ $values.desc | markdownify}}</p>
|
||||
</div>
|
||||
</section>
|
||||
</a>
|
||||
</li>
|
||||
{{end}}
|
||||
</ul>
|
||||
</main>
|
||||
{{ end }}
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -34,27 +34,27 @@ gulp.task('sass', function() {
|
||||
.pipe(prefix('last 2 versions', '> 1%', 'ie 10', 'Android 2', 'Firefox ESR'))
|
||||
.pipe(plumber())
|
||||
.pipe(rename('style.min.css'))
|
||||
.pipe(gulp.dest('../../../static/css'));
|
||||
.pipe(gulp.dest('../static/css'));
|
||||
});
|
||||
|
||||
gulp.task("image-resize", () => {
|
||||
return gulp.src("../../../source-images/*.{jpg,png,jpeg,gif}")
|
||||
return gulp.src("../source-images/*.{jpg,png,jpeg,gif}")
|
||||
.pipe(imagemin())
|
||||
.pipe(parallel(
|
||||
imageresize({ width: imagefull }),
|
||||
os.cpus().length
|
||||
))
|
||||
.pipe(gulp.dest("../../../static/images"))
|
||||
.pipe(gulp.dest("../static/images"))
|
||||
.pipe(parallel(
|
||||
imageresize({ width: imagehalf }),
|
||||
os.cpus().length
|
||||
))
|
||||
.pipe(gulp.dest("../../../static/images/half"))
|
||||
.pipe(gulp.dest("../static/images/half"))
|
||||
.pipe(parallel(
|
||||
imageresize({ width: imagethumb }),
|
||||
os.cpus().length
|
||||
))
|
||||
.pipe(gulp.dest("../../../static/images/thumb"));
|
||||
.pipe(gulp.dest("../static/images/thumb"));
|
||||
});
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ gulp.task('scripts', function(cb) {
|
||||
concat('script.min.js'),
|
||||
// sourcemaps.write('.'),
|
||||
uglify(),
|
||||
gulp.dest('../../../static/js/')
|
||||
gulp.dest('../static/js/')
|
||||
],
|
||||
cb
|
||||
);
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loaded 100 of 201 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user