mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Import nuxt at config file
This commit is contained in:
parent
085dfff323
commit
a5c297d2d6
2 changed files with 13 additions and 5 deletions
10
.eleventy.js
10
.eleventy.js
|
|
@ -1,9 +1,17 @@
|
||||||
// const eleventyVue = require("@11ty/eleventy-plugin-vue");
|
// const eleventyVue = require("@11ty/eleventy-plugin-vue");
|
||||||
|
import nuxtConfig from './nuxt.config'
|
||||||
|
|
||||||
module.exports = function ( eleventyConfig ) {
|
module.exports = function ( eleventyConfig ) {
|
||||||
// eleventyConfig.addPlugin(eleventyVue)
|
// eleventyConfig.addPlugin(eleventyVue)
|
||||||
|
|
||||||
|
// console.log('eleventyConfig', eleventyConfig)
|
||||||
|
|
||||||
|
eleventyConfig.addJavaScriptFunction('getNuxt', function () {
|
||||||
|
return nuxtConfig
|
||||||
|
})
|
||||||
|
// eleventyConfig.addGlobalData('nuxt', () => nuxtConfig)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
dir: {
|
dir: {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import config from '../nuxt.config'
|
import config from '../nuxt.config'
|
||||||
|
|
||||||
|
const year = new Date().getFullYear()
|
||||||
|
|
||||||
const makeTag = ( tag, tagName = 'meta') => {
|
const makeTag = ( tag, tagName = 'meta') => {
|
||||||
|
|
||||||
|
|
@ -72,9 +72,9 @@ class DefaultLayout {
|
||||||
}) {
|
}) {
|
||||||
return /* html */`
|
return /* html */`
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="${ config.head.htmlAttrs.lang }">
|
<html lang="${ this.getNuxt().head.htmlAttrs.lang }">
|
||||||
<head>
|
<head>
|
||||||
<title>${ title || config.head.title }</title>
|
<title>${ title || this.getNuxt().head.title }</title>
|
||||||
|
|
||||||
${ this.generateMetaTags() }
|
${ this.generateMetaTags() }
|
||||||
|
|
||||||
|
|
@ -145,7 +145,7 @@ class DefaultLayout {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p class="mt-8 text-center text-base leading-6 text-gray-400">© 2020 Does it ARM All rights reserved.</p>
|
<p class="mt-8 text-center text-base leading-6 text-gray-400">© ${ year } ${ this.getNuxt().head.title } All rights reserved.</p>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue