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

Add support for code examples #1

Open
6 tasks done
anandology opened this issue Aug 10, 2022 · 2 comments
Open
6 tasks done

Add support for code examples #1

anandology opened this issue Aug 10, 2022 · 2 comments

Comments

@anandology
Copy link
Member

anandology commented Aug 10, 2022

It should support including code examples using the following syntax.

```{.feather .python}
print("hello, world!")
```

The following things need to be added to the mkdocs.yml to enable this plugin.

plugins:
  - mkdocs-feather:
        server_url: https://feather.pipal.in/

Tasks

  • create a python package
  • inject javascript and css files
  • inject codemirror files for python
  • provide option to specify the codemirror modes to enable
  • added feature.js with livecode integration
  • support customizing server_url
@anandology
Copy link
Member Author

We may want to support extended configuration. for example:

When there are multiple servers for each runtime:

plugins:
  - mkdocs-feather:
        server_url: 
            default: https://feather.pipal.in/
            python: https://python-feather.pipal.in/
            go: https://go-feather.pipal.in/
        modes:
            c-joy: 
                runtime: cjoy
                syntax: c

This need not be part of this issue, but leaving as note so that it is tracked.

anandology added a commit that referenced this issue Aug 10, 2022
anandology added a commit that referenced this issue Aug 10, 2022
- Added a placeholder feather.js file in assets and that gets included the generated html

Issue #1
anandology added a commit that referenced this issue Aug 10, 2022
anandology added a commit that referenced this issue Aug 10, 2022
- enabled python mode always
- hardcoded the feather url

Issue #1
anandology added a commit that referenced this issue Aug 10, 2022
@anandology
Copy link
Member Author

Done. currently supported config:

site_name: Python Tutorial

plugins:
  - feather:
      modes:
        - python
        - ruby
        - htmlmixed
      server_url: http://127.0.0.1:5000/
theme:
  name: material

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant