Skip to content

Commit

Permalink
try again
Browse files Browse the repository at this point in the history
  • Loading branch information
sytranvn committed May 23, 2023
1 parent b0d940d commit ff12abd
Show file tree
Hide file tree
Showing 33 changed files with 31 additions and 2,737 deletions.
1 change: 0 additions & 1 deletion .github/workflows/hugo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ jobs:
HUGO_ENVIRONMENT: production
HUGO_ENV: production
run: |
hugo mod npm install && \
hugo \
--gc \
--minify \
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/public
.hugo_build.lock
/assets/jsconfig.json
/resources
10 changes: 10 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[submodule "hugo-coder"]
path = hugo-coder
url = https://github.com/luizdepra/hugo-coder
[submodule "themes/hugo-coder"]
path = themes/hugo-coder
url = https://github.com/luizdepra/hugo-coder
[submodule "themes/hugo-pdf"]
path = themes/hugo-pdf
url = https://github.com/sytranvn/hugo-pdf
branch = master
13 changes: 0 additions & 13 deletions assets/scss/slate/docuapi_overrides.scss

This file was deleted.

72 changes: 15 additions & 57 deletions config.toml
Original file line number Diff line number Diff line change
@@ -1,66 +1,24 @@
languageCode = "en-us"
baseurl = "https://sytranvn.dev/hugo-pdf"
title = "Hugo PDF"
theme = ["hugo-coder", "hugo-pdf"]

disableKinds = ["taxonomyTerm"]

# Code higlighting settings
pygmentsCodefences = true
pygmentsCodeFencesGuesSsyntax = false
pygmentsOptions = ""
pygmentsStyle = "monokai"
pygmentsUseClasses = false
[markup.highlight]
style = "github-dark"

defaultContentLanguage = "en"

[markup]
[markup.goldmark]
[markup.goldmark.parser]
autoHeadingIDType = "github-ascii"
[markup.goldmark.renderer]
unsafe = true
colorScheme = "dark"
hideColorSchemeToggle = true
# Series see also post count
maxSeeAlsoItems = 5
# Custom CSS
customCSS = []
# Custom SCSS, file path is relative to Hugo's asset folder (default: {your project root}/assets)
customSCSS = []

[module]
[module.hugoVersion]
[[module.imports]]
# This is replaced in go.mod to point to the directory above.
path="github.com/bep/docuapi/v2"

[params]
search = true
maxMenuDepth = 3 # (optional) available options are: 1, 2, or 3 (default: 2)

# Configure the language example tabs.
# [[params.language_tabs]]
# key = "go"
# name = "Go"
# [[params.language_tabs]]
# key = "shell"
# name = "Shell"
# [[params.language_tabs]]
# key = "ruby"
# name = "Ruby"
# [[params.language_tabs]]
# key = "python"
# name = "Python"
# [[params.language_tabs]]
# key = "javascript"
# name = "Javascript"

#Languages
[languages]

[languages.en]
languageName = "English"
weight = 2
title = "DocuAPI Example Site"

# Left sidebar footer items. Use HTMl or Markdown.
toc_footers = [
"Visit my blog at [sytranvn.dev](https://sytranvn.dev)",
"Documentation Powered by [DocuAPI](https://github.com/bep/docuapi)",
]
[languages.en.blackfriday]
angledQuotes = false
hrefTargetBlank = true
# Custom JS
customJS = []

# Custom remote JS files
customRemoteJS = []
7 changes: 3 additions & 4 deletions content/main.md → content/index.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
---
weight: 5
anchor: Hugo PDF
title: "Hugo PDF"
git_repo: https://github.com/sytranvn/hugo-pdf
summary: "This shortcode allows you to add PDF file to your pages using browser native PDF renderer. Therefore, no additional Javascripts needed."


type: single
---

# hugo-pdf
This shortcode allows you to add PDF file to your pages using browser native
PDF renderer. Therefore, no additional Javascripts needed.

Expand Down Expand Up @@ -56,7 +55,7 @@ Or use this as a theme.
{{</* pdf src="./path/to/example.pdf#view=Fit&page=1" width="100%" height="500px" */>}}
```

{{< pdf src="landscape.pdf#view=Fit" width="50%" height="500px" >}}
{{< pdf src="landscape.pdf#view=Fit" width="100%" height="500px" >}}

You can also add parameters to url to customize PDF viewer.
| Parameters | Value | Description | Browser |
Expand Down
3 changes: 0 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
module github.com/sytranvn/hugo-pdf

go 1.16

require github.com/bep/docuapi/v2 v2.2.0 // indirect

11 changes: 0 additions & 11 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,11 +0,0 @@
github.com/bep/docuapi/v2 v2.0.4 h1:TU6CzjdfiWI+D/d911r8ZQG7R8h64ayEaC6iWNbJ/NQ=
github.com/bep/docuapi/v2 v2.0.4/go.mod h1:hoeibCSjXWJ/fLOwPSo8WZbgl5EO3zQjS/nrAs2v2Ro=
github.com/bep/docuapi/v2 v2.2.0 h1:rd5R3XZMjp45lXpfjPM9+C0Prt2pJzgiHXvdA2U48Mw=
github.com/bep/docuapi/v2 v2.2.0/go.mod h1:61SkJTCwqcIBqpMsUokAjyljnSiRHV74idrhPF2f+os=
github.com/gohugoio/hugo-mod-jslibs-dist/alpinejs/v3 v3.500.100 h1:yIymGxglvwr9Guhk7cr9VoMQ3IgLLJ0E4PKcKCg+kJY=
github.com/gohugoio/hugo-mod-jslibs-dist/alpinejs/v3 v3.500.100/go.mod h1:WWQxcmPs5Xy3xDgi29ipkmZT6NKVb3bsqyCDTY3eYYY=
github.com/gohugoio/hugo-mod-jslibs-dist/alpinejs/v3 v3.21000.20200/go.mod h1:WWQxcmPs5Xy3xDgi29ipkmZT6NKVb3bsqyCDTY3eYYY=
github.com/olivernn/lunr.js v2.3.9+incompatible h1:eH8iBnjlR4mwlYDdNuqy9PCNLjp2bEs6aoNnTSaccx0=
github.com/olivernn/lunr.js v2.3.9+incompatible/go.mod h1:yEkQ1DUSMtNsn8n2CqvQXZd0ErWPEG8g9QRmblR+KS8=
github.com/slatedocs/slate v2.9.2+incompatible h1:PnIMTR1S7pE6tImIjF6ny9UaRrt6fukM93lwUwJPtjw=
github.com/slatedocs/slate v2.9.2+incompatible/go.mod h1:n698aXLkExWIlF7prJey0Kq6wlKIKvj/stVb5oouZDM=
Empty file.
Empty file.
10 changes: 0 additions & 10 deletions layouts/shortcodes/pdf.html

This file was deleted.

Loading

0 comments on commit ff12abd

Please sign in to comment.