GithubHelp home page GithubHelp logo

Comments (5)

TheBoxyBear avatar TheBoxyBear commented on September 25, 2024

Having a similar issue with a .NET 8 project although I'm having issues reproducing it.

The building enters this recursion loop until the limit is exceeded while applying template AppData\Local\Temp\docfx\viewmodel\api\toc.html.raw.json

object Render(BlockToken block, Context context)
void Write(StringRender renderer, SectionToken obj, Context context)
void Write(RendererBase<TContext> renderer, MustacheToken obj, TContext context)
void Write<T>(T obj, TContext context)

Important to note that I'm able to build locally using the docfx version bundled in the docfx.console version 2.59.4 NuGet package, which runs docfx build when building the solution. Running docfx build manually from a fresh install however leads to the resursion issue.

This is making it more difficult to deploy as I'm using Nuint/docfx-action 3.0.0 which encounters the same issue on the container. 3.0.0 is the minimum usable version as I'm using .NET 8.

from docfx.

yufeih avatar yufeih commented on September 25, 2024

Seems like the problem can be fixed by renaming toc.html.tmpl file name to toc.html.primary.tmpl in custom templates.

from docfx.

TheBoxyBear avatar TheBoxyBear commented on September 25, 2024

Seems like the problem can be fixed by renaming toc.html.tmpl file name to toc.html.primary.tmpl in custom templates.

This worked flawlessly, thanks.

from docfx.

filzrev avatar filzrev commented on September 25, 2024

@yufeih
For the original issue.
It seems UniversalReference.html.primary cause the problem. It can't fixed by renaming toc.html.tmpl.

from docfx.

rst4 avatar rst4 commented on September 25, 2024

Actually I experience the same error. However, my custom template contains only toc.html.primary.tmpl and this produces the same error:

/Users/alexry/***/user-manual-v3/tutorials/toc.yml: error ApplyTemplateRendererError: Error applying template "toc.html.primary" to view model "/Users/alexry/***/user-manual-v3/_docfx_debug/viewmodel/tutorials/toc.html.raw.json" generated from "tutorials/toc.yml". You have reached the maximum recursion limit of 256.

docfx version is 2.73.0.

If I rename the file to toc.html.tmpl the build works but docfx seemingly doesn't include this template at all. Can you please advise?

Thank you.

from docfx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.