I am using the last-updated plugin and when I use vuepress dev it works as expected (aka the mention "Last Updated: 5/15/2019, 10:06:31 AM" is at the bottom of the page but when I use vuepress build the lastUpdated line no longer shows up in my pages.
The Last Updated date does not show up at all when I am building the site.
package.json
{
"name": "MyProject",
"version": "1.0.0",
"main": "index.js",
"author": "Me",
"license": "MIT",
"scripts": {
"site:dev": "vuepress dev site",
"site:build": "vuepress build site"
},
"devDependencies": {
"@vuepress/plugin-back-to-top": "^1.0.0-alpha.48",
"@vuepress/plugin-last-updated": "^1.0.0-alpha.48",
"@vuepress/plugin-medium-zoom": "^1.0.0-alpha.48",
"vuepress": "^1.0.0-alpha.47",
"vuepress-plugin-reading-time": "^0.1.1"
},
"dependencies": {
"jdenticon": "^2.1.1",
"tailwindcss": "^0.7.4"
}
}
config.js
module.exports = {
title: 'Data Site',
description: Mysite',
head: [
['link', { rel: 'icon', type: "image/x-icon", href: `/img/dig.png` }]
],
themeConfig: {
logo: '/img/logo3.png',
users: users,
pageSize: 6,
startPage: 0,
editLinks: true,
editLinkText: 'Edit this page on Bitbucket',
lastUpdated: 'Last Updated',
repo: 'https://bitbucket.org/myaccount/mysite/',
docsDir: 'site',
newestFirst: true,
nav: [
{ text: 'Home', link: '/' },
{ text: 'Dashboards',
items: [
{ text: 'FirstPage', link:'/dashboards/first/' },
]
},
{ text: 'Documentation', link: '/docs/' },
{ text: 'Contributors', link: '/contributors/' },
],
sidebar: {
'/docs/': [
{
title: 'Documentation',
collapsable: false,
children: [
'/docs/'
]
},
{
title: 'Dashboards',
collapsable: true,
children: [
'/docs/dashboards/'
]
},
{
title: 'Pipelines',
collapsable: true,
children: [
'/docs/pipelines/'
]
},
{
title: 'Models',
collapsable: true,
children: [
'/docs/models/'
]
},
{
title: 'Infrastructure',
collapsable: true,
children: [
'/docs/infrastructure/ECScluster',
'/docs/infrastructure/ECR'
]
},
{
title: 'Other',
collapsable: true,
children: [
'/docs/other/bitbucket',
'/docs/other/terminal',
'/docs/other/asana',
]
}
]
},
},
plugins: [
'vuepress-plugin-reading-time',
'@vuepress/plugin-back-to-top',
'@vuepress/plugin-last-updated',
require('./custom-search/index.js',
'@vuepress/plugin-medium-zoom')
],
postcss: {
plugins: [
require("tailwindcss")("./site/.vuepress/tailwind.config.js"),
require("autoprefixer"),
],
}
}
[x ] My VuePress version is lower and euqal than 1.0.0-alpha.47:
[ ] My VuePress version is higher than 1.0.0-alpha.47, the following is the output of npx vuepress info in my VuePress project:
I also can't get the plugin medium-zoom to work...
I am also using docker to deploy my build with the following Dockerfile:
#Stage 1 Build the App
FROM node:8.16 as build-deps
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y git
WORKDIR /usr/src/app
COPY package.json yarn.lock ./
RUN yarn
COPY . ./
RUN yarn site:build
#Stage 2 Productionalize the app
FROM nginx:alpine
#Copying build file from previous stage
COPY --from=build-deps /usr/src/app/site/.vuepress/dist /usr/share/nginx/html
# Remove default configuration from Nginx
RUN rm /etc/nginx/conf.d/default.conf
# Copy the modified Nginx conf
COPY /srv/nginx.conf /etc/nginx/conf.d/
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
Not sure if it has an impact on it or not
Solved my issue I had .git in my .dockerignore file which is what last-updated uses to fetch the date. Mistery solved!
Most helpful comment
Solved my issue I had
.gitin my.dockerignorefile which is what last-updated uses to fetch the date. Mistery solved!