Still34 / DocFx.Plugin.LastModified

A post-processor plugin for DocFX v2 that adds last modified date to conceptual articles.
Other
7 stars 18 forks source link

LastModifiedPostProcessor not working for all the files #1

Closed Souradeep2304 closed 4 years ago

Souradeep2304 commented 4 years ago

I used the LastModifiedPostProcessor plugin and the issue I am facing is the last commit date for only one file(index.md) is showing up which is in the same folder as the docfx.json file, the same for other files mentioned in the docfx.json files is not showing the correct last commit date, it shows the local system date for them.

This is my docfx.json file for the same.

{
    "build": {
      "content": [
        {
          "files": [
            "index.md",
            "toc.yml"
          ]
        },
        {
          "files": [

            "Cloud Readiness/**.md",
            "Cloud Readiness/toc.yml",
            "Migrate/**.md",
            "Migrate/toc.yml",
            "Workload Landing Zone/**.md",
            "Workload Landing Zone/toc.yml",
            "Plan/**.md",
            "Plan/toc.yml",
            "Strategy/**.md",
            "Strategy/toc.yml"

          ],
          "src": ".."
        }
      ],
      "resource": [
        {
          "files": [
            "Cloud Readiness/**.png",
            "Cloud Readiness/**.jpg",
            "Migrate/**.png",
            "Migrate/**.jpg",
            "Workload Landing Zone/**.png",
            "Workload Landing Zone/**.jpg",
            "images/**.png",
            "Plan/**.png",
            "Plan/**.jpg",
            "Strategy/**.png",
            "Strategy/**.jpg",
            "Strategy/**.pptx"
          ],
          "src": ".."
        }
      ],
      "dest": "_site",
      "globalMetadataFiles": [],
      "fileMetadataFiles": [],
      "template": [
        "default",
        "templates/ais"
      ],
      "globalMetadata": {
        "_appFaviconPath": "../images/favicon.png"
      },
      "postProcessors": ["LastModifiedPostProcessor"],
      "markdownEngineName": "markdig",
      "noLangKeyword": false,
      "keepFileLink": false,
      "cleanupCacheHistory": false,
      "disableGitFeatures": false
    }
  }
Still34 commented 4 years ago

Hi, did you include libgit2sharp in your plugin directory along with DocFx.Plugin.LastModified.dll?

Souradeep2304 commented 4 years ago

Hi again! So i fixed the issue on my own. I just put all the folders in same location as the build json file and it worked like a charm! Thanks again!