Giter Site home page Giter Site logo

Comments (6)

Kenji776 avatar Kenji776 commented on July 17, 2024 1

from apexdocs.

cesarParra avatar cesarParra commented on July 17, 2024

Hi @Kenji776

I'm actually having trouble replicating both of these issues. Would you be able to share some of the apex docs of the files that are giving you issues? Doesn't need to be the entire thing, but maybe just the structure of the class level docs.

For the linking, how are you getting the HTML <a> tags? Are you running the .md through a tool to get HTML that you could share with me or are you serving them through a static site generator? I'm trying to see if I can replicate the environment since at least Github pages seems to be linking things correctly for me.

from apexdocs.

Kenji776 avatar Kenji776 commented on July 17, 2024

Hey @cesarParra

Ah yeah, replicating bugs is always a pain. I can send you a copy of my project if you like and you can then see exactly what's happening. Is there a place I can send you a zip file?

For the HTML a tags, I have a browser extension just called 'markdown viewer'. Once allowed to view local files you can just open up markdown files and it'll process them for you. Those links are just from inspecting the source of what it generates, but even looking at the markdown source it's including the directory when it shouldn't. This is what the markdown looks like in the raw source file.

**See** [StripeRESTService](/Misc/StripeRESTService.md)

Which markdown viewer then converts into

<a href="/Misc/StripeRESTServiceTest.md">StripeRESTServiceTest</a>

When the'/Misc'/ really shouldn't be there.

As for generation actual HTML files, I have another package I use just called markdown-to-html which does most of the conversion. I then have to do some post processing as the HTML it generates isn't quite perfect.

Just to give a little overview understanding of what I've got going it's like this. I have a NodeJS script that copies all the desired apex class files from your actual working directory to a local temp directory. It then uses your generator to create markdown files from all those classes. After that I convert the markdown to html and do my post processing to fix it up (as best I can, still working on that). I then zip both folders and save that as a new file for delivery to the customer. So all I have to do is re-run my script and the newest code documentation is pulled and generated for everything I've worked on. It's pretty nifty, or will be when I can get these last few bugs worked out.

from apexdocs.

cesarParra avatar cesarParra commented on July 17, 2024

@Kenji776

Thanks for that background, and that sounds pretty sweet!

You can send files to my email: [email protected].

from apexdocs.

cesarParra avatar cesarParra commented on July 17, 2024

@Kenji776, here's a quick update on this:

The Misc issue unfortunately I haven't been able to replicate, but I was able to see the issue with the markdown viewer extension, which seems to be an issue in general when viewing the files locally through file:// paths.

The reasoning behind the leading / is because is because that indicates to both Github Pages and Docsify that it is a root relative link, so that allows for easy linking between classes that link to different groups without having to figure out dynamically if the path should go up a directory or not.

I've prototyped something that allows the linking to be more dynamic and figure out where to link to. For this I've added a new generator that simply creates the markdown files called plain-markdown, which should also fit your use case a bit better since it will also stop printing the Jekyll front matter at the top of the file (the table at the top that says: Layout | default).

I've released this as a beta if you want to test it out. To install you can run npm install @cparra/[email protected] and to run you can specify the -g argument to be plain-markdown (eg. apexdocs-generate -s src -t docs -g plain-markdown --scope public global .Things should also work without the -g override but it will just output that table at the top which I'm guessing is not desired.

Let me know if things look good and I can release that version to the GA channel.

from apexdocs.

cesarParra avatar cesarParra commented on July 17, 2024

That's great to hear! I've gone ahead and released a GA version (2.5.0) with these changes as well.

from apexdocs.

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.