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

Editor config #241

Merged
merged 9 commits into from
Jun 28, 2021
Merged

Editor config #241

merged 9 commits into from
Jun 28, 2021

Conversation

edditler
Copy link
Contributor

Includes the possibility to set up the markdown-it settings in the archivy configuration (#209).

I also prettified the javascript a bit.

@Uzay-G
Copy link
Member

Uzay-G commented Jun 26, 2021

It seems the tests are erroring on the .items() call on the plugins. I can help you fix that later if you'd like.

Otherwise, I was thinking it'd be more powerful if we can directly render the options into the JS, instead of specifying, like instead of:

typographer: {{ ... }},
linkify: {{ ... }}

it would be:

{% for key, val in conf.items() %}
  {{ key }}: {{ val | lower }},
{% endfor %}

^^ something like this.

That way, the user can also configure any non-configured options that haven't been set.

@codecov
Copy link

codecov bot commented Jun 28, 2021

Codecov Report

Merging #241 (a8bc8eb) into master (042ac4b) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #241   +/-   ##
=======================================
  Coverage   83.63%   83.64%           
=======================================
  Files          27       27           
  Lines        2121     2122    +1     
=======================================
+ Hits         1774     1775    +1     
  Misses        347      347           
Impacted Files Coverage Δ
archivy/config.py 92.85% <100.00%> (+0.26%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 042ac4b...a8bc8eb. Read the comment docs.

@edditler
Copy link
Contributor Author

edditler commented Jun 28, 2021

{% for key, val in conf.items() %}
  {{ key }}: {{ val | lower }},
{% endfor %}

Then we need to check for the plugins key and not apply that one. or would you rather split the config in

EDITOR_CONF:
  plugins: ...
  settings: ...

?

@Uzay-G
Copy link
Member

Uzay-G commented Jun 28, 2021

{% for key, val in conf.items() %}
  {{ key }}: {{ val | lower }},
{% endfor %}

Then we need to check for the plugins key and not apply that one. or would you rather split the config in

EDITOR_CONF:
  plugins: ...
  settings: ...

?

Yeah we could split it into plugins and generalSettings, or something like that.

@Uzay-G Uzay-G merged commit d16df87 into archivy:master Jun 28, 2021
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

Successfully merging this pull request may close these issues.

None yet

2 participants