thuliteio / thulite

Web framework designed for speed, security, and SEO — all powered by Hugo and npm.

Home Page:https://thulite.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Adding images in markdown breaksdown

kaanguru opened this issue · comments

Description

Can not add image in markdown!

Steps to reproduce

  1. Create new hyas site
  2. insert ![alt](/logo-hyas.png) to any .md file inside content

Expected result

display logo-hyas.png

Actual result

ERROR ... _default_markup\render-image.html::7:18": execute of template failed: template: _default/_markup/render-image.html:7:18: executing "_default/_markup/render-image.html" at <$image.Resize>: nil pointer evaluating resource.Resource.Resize

Environment

{
name: '@hyas/core',
'dist-tags': {
latest: '1.5.5'
},
versions: [
'1.4.3',
'1.4.4',
'1.5.0',
'1.5.1',
'1.5.2',
'1.5.3',
'1.5.4',
'1.5.5'
],
time: {
created: '2021-02-24T12:48:47.290Z',
'1.4.3': '2021-02-24T12:48:47.726Z',
modified: '2022-02-04T10:44:42.902Z',
'1.4.4': '2021-02-25T12:41:04.283Z',
'1.5.0': '2021-06-29T14:25:58.558Z',
'1.5.1': '2021-08-27T08:56:16.465Z',
'1.5.2': '2021-09-21T12:27:58.340Z',
'1.5.3': '2021-11-05T14:56:39.708Z',
'1.5.4': '2022-01-07T13:16:31.604Z',
'1.5.5': '2022-02-04T10:44:41.066Z'
},
maintainers: [
{
name: 'h-enk',
email: 'henk@ventizo.com'
}
],
description: 'Hyas core',
license: 'MIT',
readmeFilename: 'README.md',
homepage: 'https://github.com/h-enk/hyas#readme',
repository: {
type: 'git',
url: 'git+https://github.com/h-enk/hyas.git'
},
bugs: {
url: 'https://github.com/h-enk/hyas/issues'
},
version: '1.5.5',
browserslist: [
'defaults'
],
publishConfig: {
access: 'public'
},
scripts: {
init: 'shx rm -rf .git && git init -b main',
create: 'exec-bin node_modules/.bin/hugo/hugo new',
prestart: 'npm run clean',
start: 'exec-bin node_modules/.bin/hugo/hugo server --bind=0.0.0.0 --disableFastRender --baseURL=http://localhost',
'start:lan': 'exec-bin node_modules/.bin/hugo/hugo server --bind=0.0.0.0 --baseURL=http://192.168.1.10 --port=1313',
prebuild: 'npm run clean',
build: 'exec-bin node_modules/.bin/hugo/hugo --gc --minify',
'build:lan': 'exec-bin node_modules/.bin/hugo/hugo --gc --minify --baseURL=http://192.168.1.10:8080',
'build:preview': 'npm run build -D -F',
clean: 'shx rm -rf public resources',
'clean:install': 'shx rm -rf package-lock.json node_modules ',
lint: 'npm run -s lint:scripts && npm run -s lint:styles && npm run -s lint:markdown',
'lint:scripts': 'eslint assets/js config functions',
'lint:styles': 'stylelint "assets/scss//.{css,sass,scss,sss,less}"',
'lint:markdown': 'markdownlint-cli2 "
.md" "content/
/.md"',
'lint:markdown-fix': 'markdownlint-cli2-fix "
.md" "content/**/.md"',
server: 'exec-bin node_modules/.bin/hugo/hugo server',
test: 'npm run -s lint',
env: 'env',
precheck: 'npm version',
check: 'exec-bin node_modules/.bin/hugo/hugo version',
'latest:hugo': 'gh release view --repo gohugoio/hugo',
'latest:hyas': 'gh release view --repo h-enk/hyas',
'copy:katex-fonts': 'shx cp ./node_modules/katex/dist/fonts/
./static/fonts/',
postinstall: 'hugo-installer --version otherDependencies.hugo --extended --destination node_modules/.bin/hugo',
version: 'auto-changelog -p && git add CHANGELOG.md'
},
devDependencies: {
'@babel/cli': '^7.17',
'@babel/core': '^7.17',
'@babel/preset-env': '^7.16',
'@fullhuman/postcss-purgecss': '^4.1',
'@popperjs/core': '^2.11',
'auto-changelog': '^2.4',
autoprefixer: '^10.4',
bootstrap: '^5.1',
eslint: '^8.8',
'exec-bin': '^1.0.0',
'hugo-installer': '^3.1',
lazysizes: '^5.3',
'markdownlint-cli2': '^0.4.0',
postcss: '^8.4',
'postcss-cli': '^9.1',
'purgecss-whitelister': '^2.4',
quicklink: '^2.2.0',
shx: '^0.3',
stylelint: '^14.3',
'stylelint-config-standard-scss': '^3.0'
},
otherDependencies: {
hugo: '0.92.1'
},
gitHead: 'ed477efd5354ea463e34ce34679b6e378cf85f40',
dist: {
integrity: 'sha512-05HhNG27nusD1yq5Yff4CsjRaofxDCLmklIdSkTjqreK5shS6dkqOjg+TCF8ReeaRufJqBf8qy8rax7CyWTFgA==',
shasum: 'f38d0cd74ca7f45a73a2f08af144f46635e15f15',
tarball: 'https://registry.npmjs.org/@hyas/core/-/core-1.5.5.tgz',
fileCount: 112,
unpackedSize: 323566,
'npm-signature': '-----BEGIN PGP SIGNATURE-----\r\n' +
'Version: OpenPGP.js v3.0.13\r\n' +
'Comment: https://openpgpjs.org\r\n' +
'\r\n' +
'wsFcBAEBCAAQBQJh/QOZCRA9TVsSAnZWagAAut8P/jwzzrbUE1VeOY43d+XL\n' +
'ipNaGnrvEDB7Z5qDrL/lBtRIYDXJn4Yz831ymKHoOOOv18BsiXU0olPjORzy\n' +
'/C6Fl1Qqxmmg6q6Ae6qs7C36KRBmOesp1HDE5RyKCYz8oNowcHcIp+wTOQkH\n' +
'udkkE6iWjE2KlWIR+9Jw4/8Rj0jHeRefPOPFpNqz0BEdQ+RqDIQjELUezgqf\n' +
'Iuo2j2YFwNwCBhDq6tD2Le4BGoW//O2Gmjth9tUy/3au25gjEo7QI/8hVpdE\n' +
'0D3PHscX0Gd5V7VHWqZMkd3+VAEi2GV1ACUtK/k4vhXmJVj4mFCB4fNLQyIu\n' +
'96QqHLhBIQOdGOPqDrFgM/pLts8Cls+b/0pvT2MJoU5FsofNBwnilBADN8Hd\n' +
'oeuFoIVb1vYyUqytFkRnW+UCrKwfBvtDvAg7Me2wW2kuQ5hMRfJlIxAhVR0I\n' +
'zE5n/ocMhaN5m7LHcuyuinwJ33MLRahwxMwIcTUdoividCW4MVq8EHXd7rtt\n' +
'YOhhb0Z0O8iiBeCELP4nGXsM7f3OUgDNhYTEWCxxqY02xfUf8LABlh1vL1E2\n' +
'n/hdjL3X8Bvn+CfqEkg8t5mgzlx+3kaR4KTeOueOo+SdAjTvxxi15IUgludi\n' +
'A+bl0uFeFw22cLdfLl+hmFxnJTW36Gk3yAaVdGxlEjZCSnF/08Mm4SnmxKKX\n' +
'TVar\r\n' +
'=+id2\r\n' +
'-----END PGP SIGNATURE-----\r\n'
},
directories: {}
}

_markup/render-image.html
{{ $image = .Page.Resources.GetMatch .Destination -}} is nil

Did you place the image in a page bundle? See also: https://gethyas.com/docs/recipes/images/#add-a-local-image

Other local locations are not supported — yet

Closing for solved