Why aren't my customized template files being applied by docfx when building with a custom template specified...












1















The docfx documentation site shows how to customize the various .partial files used in the default template (see https://dotnet.github.io/docfx/tutorial/walkthrough/advanced_walkthrough.html).



I've followed those instructions, creating a new template folder and putting a modified stylesmain.css file in it, and also took the step under the Apply the Template section where the custom template name is specified in addition to the default:



"template": [
"default",
"templates/<name of your your HTML template folder>"
],


However, when I build the site, the _site/styles/main.css file doesn't have my changes.










share|improve this question



























    1















    The docfx documentation site shows how to customize the various .partial files used in the default template (see https://dotnet.github.io/docfx/tutorial/walkthrough/advanced_walkthrough.html).



    I've followed those instructions, creating a new template folder and putting a modified stylesmain.css file in it, and also took the step under the Apply the Template section where the custom template name is specified in addition to the default:



    "template": [
    "default",
    "templates/<name of your your HTML template folder>"
    ],


    However, when I build the site, the _site/styles/main.css file doesn't have my changes.










    share|improve this question

























      1












      1








      1








      The docfx documentation site shows how to customize the various .partial files used in the default template (see https://dotnet.github.io/docfx/tutorial/walkthrough/advanced_walkthrough.html).



      I've followed those instructions, creating a new template folder and putting a modified stylesmain.css file in it, and also took the step under the Apply the Template section where the custom template name is specified in addition to the default:



      "template": [
      "default",
      "templates/<name of your your HTML template folder>"
      ],


      However, when I build the site, the _site/styles/main.css file doesn't have my changes.










      share|improve this question














      The docfx documentation site shows how to customize the various .partial files used in the default template (see https://dotnet.github.io/docfx/tutorial/walkthrough/advanced_walkthrough.html).



      I've followed those instructions, creating a new template folder and putting a modified stylesmain.css file in it, and also took the step under the Apply the Template section where the custom template name is specified in addition to the default:



      "template": [
      "default",
      "templates/<name of your your HTML template folder>"
      ],


      However, when I build the site, the _site/styles/main.css file doesn't have my changes.







      docfx






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 15 '18 at 18:33









      Brett ZookBrett Zook

      63




      63
























          1 Answer
          1






          active

          oldest

          votes


















          0














          I'm using docfx on Windows 10, with docfx located at C:docfx, and I exported the default template and created my custom template within that same directory.



          The project I'm building is located elsewhere, at C:source...documentation



          I'm running the docfx build after navigating to C:source...documentation, and I found that in order for my customized template to work, I had to include the full path to the template folders in docfx.json, as in



          "template": [
          "C:/docfx/_exported_templates/default",
          "C:/docfx/templates/MyCustomTemplate"
          ],


          UPDATE:
          As pointed out by @hcdocs, if the custom "templates" folder is moved into C:source...documentation rather than C:docfx, there's no need to use full paths. This config worked fine after doing that:



          "template": [
          "default",
          "templates/MyCustomTemplate"
          ],





          share|improve this answer


























          • You shouldn't have to include the full path or reference the exported template. If I understand your file setup correctly, the custom templates directory should be in your C:Source...documentation directory, not your C:docfx directory.

            – hcdocs
            Nov 15 '18 at 22:02











          • @hcdocs, you are correct. I realized after posting this that I wanted to move my custom templates folder into the C:source...documentation folder so it would be under source control, and doing that prevents the need to use full paths, for both the default template and my custom one. I'll be updating my answer above

            – Brett Zook
            Nov 27 '18 at 20:32











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53325868%2fwhy-arent-my-customized-template-files-being-applied-by-docfx-when-building-wit%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          I'm using docfx on Windows 10, with docfx located at C:docfx, and I exported the default template and created my custom template within that same directory.



          The project I'm building is located elsewhere, at C:source...documentation



          I'm running the docfx build after navigating to C:source...documentation, and I found that in order for my customized template to work, I had to include the full path to the template folders in docfx.json, as in



          "template": [
          "C:/docfx/_exported_templates/default",
          "C:/docfx/templates/MyCustomTemplate"
          ],


          UPDATE:
          As pointed out by @hcdocs, if the custom "templates" folder is moved into C:source...documentation rather than C:docfx, there's no need to use full paths. This config worked fine after doing that:



          "template": [
          "default",
          "templates/MyCustomTemplate"
          ],





          share|improve this answer


























          • You shouldn't have to include the full path or reference the exported template. If I understand your file setup correctly, the custom templates directory should be in your C:Source...documentation directory, not your C:docfx directory.

            – hcdocs
            Nov 15 '18 at 22:02











          • @hcdocs, you are correct. I realized after posting this that I wanted to move my custom templates folder into the C:source...documentation folder so it would be under source control, and doing that prevents the need to use full paths, for both the default template and my custom one. I'll be updating my answer above

            – Brett Zook
            Nov 27 '18 at 20:32
















          0














          I'm using docfx on Windows 10, with docfx located at C:docfx, and I exported the default template and created my custom template within that same directory.



          The project I'm building is located elsewhere, at C:source...documentation



          I'm running the docfx build after navigating to C:source...documentation, and I found that in order for my customized template to work, I had to include the full path to the template folders in docfx.json, as in



          "template": [
          "C:/docfx/_exported_templates/default",
          "C:/docfx/templates/MyCustomTemplate"
          ],


          UPDATE:
          As pointed out by @hcdocs, if the custom "templates" folder is moved into C:source...documentation rather than C:docfx, there's no need to use full paths. This config worked fine after doing that:



          "template": [
          "default",
          "templates/MyCustomTemplate"
          ],





          share|improve this answer


























          • You shouldn't have to include the full path or reference the exported template. If I understand your file setup correctly, the custom templates directory should be in your C:Source...documentation directory, not your C:docfx directory.

            – hcdocs
            Nov 15 '18 at 22:02











          • @hcdocs, you are correct. I realized after posting this that I wanted to move my custom templates folder into the C:source...documentation folder so it would be under source control, and doing that prevents the need to use full paths, for both the default template and my custom one. I'll be updating my answer above

            – Brett Zook
            Nov 27 '18 at 20:32














          0












          0








          0







          I'm using docfx on Windows 10, with docfx located at C:docfx, and I exported the default template and created my custom template within that same directory.



          The project I'm building is located elsewhere, at C:source...documentation



          I'm running the docfx build after navigating to C:source...documentation, and I found that in order for my customized template to work, I had to include the full path to the template folders in docfx.json, as in



          "template": [
          "C:/docfx/_exported_templates/default",
          "C:/docfx/templates/MyCustomTemplate"
          ],


          UPDATE:
          As pointed out by @hcdocs, if the custom "templates" folder is moved into C:source...documentation rather than C:docfx, there's no need to use full paths. This config worked fine after doing that:



          "template": [
          "default",
          "templates/MyCustomTemplate"
          ],





          share|improve this answer















          I'm using docfx on Windows 10, with docfx located at C:docfx, and I exported the default template and created my custom template within that same directory.



          The project I'm building is located elsewhere, at C:source...documentation



          I'm running the docfx build after navigating to C:source...documentation, and I found that in order for my customized template to work, I had to include the full path to the template folders in docfx.json, as in



          "template": [
          "C:/docfx/_exported_templates/default",
          "C:/docfx/templates/MyCustomTemplate"
          ],


          UPDATE:
          As pointed out by @hcdocs, if the custom "templates" folder is moved into C:source...documentation rather than C:docfx, there's no need to use full paths. This config worked fine after doing that:



          "template": [
          "default",
          "templates/MyCustomTemplate"
          ],






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 27 '18 at 20:36

























          answered Nov 15 '18 at 18:37









          Brett ZookBrett Zook

          63




          63













          • You shouldn't have to include the full path or reference the exported template. If I understand your file setup correctly, the custom templates directory should be in your C:Source...documentation directory, not your C:docfx directory.

            – hcdocs
            Nov 15 '18 at 22:02











          • @hcdocs, you are correct. I realized after posting this that I wanted to move my custom templates folder into the C:source...documentation folder so it would be under source control, and doing that prevents the need to use full paths, for both the default template and my custom one. I'll be updating my answer above

            – Brett Zook
            Nov 27 '18 at 20:32



















          • You shouldn't have to include the full path or reference the exported template. If I understand your file setup correctly, the custom templates directory should be in your C:Source...documentation directory, not your C:docfx directory.

            – hcdocs
            Nov 15 '18 at 22:02











          • @hcdocs, you are correct. I realized after posting this that I wanted to move my custom templates folder into the C:source...documentation folder so it would be under source control, and doing that prevents the need to use full paths, for both the default template and my custom one. I'll be updating my answer above

            – Brett Zook
            Nov 27 '18 at 20:32

















          You shouldn't have to include the full path or reference the exported template. If I understand your file setup correctly, the custom templates directory should be in your C:Source...documentation directory, not your C:docfx directory.

          – hcdocs
          Nov 15 '18 at 22:02





          You shouldn't have to include the full path or reference the exported template. If I understand your file setup correctly, the custom templates directory should be in your C:Source...documentation directory, not your C:docfx directory.

          – hcdocs
          Nov 15 '18 at 22:02













          @hcdocs, you are correct. I realized after posting this that I wanted to move my custom templates folder into the C:source...documentation folder so it would be under source control, and doing that prevents the need to use full paths, for both the default template and my custom one. I'll be updating my answer above

          – Brett Zook
          Nov 27 '18 at 20:32





          @hcdocs, you are correct. I realized after posting this that I wanted to move my custom templates folder into the C:source...documentation folder so it would be under source control, and doing that prevents the need to use full paths, for both the default template and my custom one. I'll be updating my answer above

          – Brett Zook
          Nov 27 '18 at 20:32




















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53325868%2fwhy-arent-my-customized-template-files-being-applied-by-docfx-when-building-wit%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          List item for chat from Array inside array React Native

          Thiostrepton

          Caerphilly