Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install and build documentation (beginner and advanced) #54

Closed
11 of 20 tasks
badlydrawnrob opened this issue Aug 21, 2019 · 3 comments
Closed
11 of 20 tasks

Install and build documentation (beginner and advanced) #54

badlydrawnrob opened this issue Aug 21, 2019 · 3 comments
Labels
difficulty: easy This is an easy edit difficulty: hard This could be difficult to achieve enhancement

Comments

@badlydrawnrob
Copy link
Owner

badlydrawnrob commented Aug 21, 2019

Simplify this issue down to a single paragraph!!

Change terminology for documentation to easy and hard (so-so isn't very helpful)

Already thought about ...

Screenshot 2023-12-01 at 21 31 24

🏆 cmd ⌘ + click: Turns the link blue and takes you to the correct .md page!

Screenshot 2023-12-01 at 18 30 35

Use a CLI tool: 34 bloody dependencies to check your links

test-screen-record.mov

Create a gif how to video with this convertor

@badlydrawnrob
Copy link
Owner Author

I removed this for now from the advanced docs but may need to put it back in if people are struggling with dependancies:

  1. npm update print-first-css
  2. npm update <package> if necessary

¶: Sometimes print-first-css doesn't update properly, so make sure to npm update print-first-css. You might also have to npm audit and npm audit fix to make sure dependencies have no errors. Follow the prompts.

@badlydrawnrob badlydrawnrob pinned this issue Dec 1, 2023
@badlydrawnrob badlydrawnrob changed the title Build documentation Install and build documentation (beginner and advanced) Dec 1, 2023
@badlydrawnrob
Copy link
Owner Author

badlydrawnrob commented Dec 2, 2023

Anki theme cards are in source/themes/cards/... but the demo is in source/themes/demo/... folders.

  • I've also changed the ★ Key point (code block or image) in the demo .json file:
    • — cloze front
    • — cloze reverse

This allows me to check the CSS styles and mimic the {{cloze::text}} field in Anki app (which is actually the same field in the front and the back card.

With mustache, you need to make sure that the .json file is formatted correctly. For basic html, you don't need to escape the JSON — however, as soon as you have HTML tags that have " " double quotes, you'll need to escape that value or else it will throw the following error:

Screenshot 2023-12-02 at 19 34 44

Use a tool like this one to escape the JSON value.

Screenshot 2023-12-02 at 19 51 27

Furthermore, Anki expects {{ ... }} double quotes only. Mustache allows for {{{ ... }}} triple quotes, or {{& ... }} symbol to make sure that the value DOES NOT GET ESCAPED!

So for the time being, I've copied the front and back templates into a demo/ folder which will handle the mustache templates and .json. I may rip this out completely but it's a bit useful for now.

Without the {{{ triple brackets }}}, you'll see a mess of a result:

Screenshot 2023-12-02 at 19 31 22 Screenshot 2023-12-02 at 19 31 49

badlydrawnrob added a commit that referenced this issue Dec 2, 2023
Move the demo files into their own folder (unfortunately this means copying the front and back templates, rather than including them. See the comment in #54 about both `{{{ ... }}}` triple brackets and `.json` formatting.
This was referenced Dec 4, 2023
@badlydrawnrob badlydrawnrob added the difficulty: easy This is an easy edit label Dec 25, 2023
@badlydrawnrob badlydrawnrob added the difficulty: hard This could be difficult to achieve label Jan 14, 2024
@badlydrawnrob
Copy link
Owner Author

This is all too overthinky. Keep your target audience and beginners and intermediates and that'll help you scope out what you should be doing. Very, very simple compiler and mostly what you see is what you get. The advanced guys should be able to do it alone anyways.

@badlydrawnrob badlydrawnrob unpinned this issue Jul 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty: easy This is an easy edit difficulty: hard This could be difficult to achieve enhancement
Projects
None yet
Development

No branches or pull requests

1 participant