Added faqtory

This commit is contained in:
Will McGugan
2022-12-18 09:50:44 +00:00
parent 15417d47a6
commit 3cfebb0423
8 changed files with 107 additions and 1 deletions

20
.faq/FAQ.md Normal file
View File

@@ -0,0 +1,20 @@
# Frequently Asked Questions
{%- for question in questions %}
- [{{ question.title }}](#{{ question.slug }})
{%- endfor %}
{%- for question in questions %}
<a name="{{ question.slug }}"></a>
## {{ question.title }}
{{ question.body }}
{%- endfor %}
<hr>
Generated by [FAQtory](https://github.com/willmcgugan/faqtory)

20
.faq/suggest.md Normal file
View File

@@ -0,0 +1,20 @@
{%- if questions -%}
{% if questions|length == 1 %}
We found the following entry in the [FAQ]({{ faq_url }}) which you may find helpful:
{%- else %}
We found the following entries in the [FAQ]({{ faq_url }}) which you may find helpful:
{%- endif %}
{% for question in questions %}
- [{{ question.title }}]({{ faq_url }}#{{ question.slug }})
{%- endfor %}
Feel free to close this issue if you found an answer in the FAQ. Otherwise, please give us a little time to review.
{%- else -%}
Thank you for your issue. Give us a little time to review it.
PS. You might want to check the [FAQ]({{ faq_url }}) if you haven't done so already.
{%- endif %}
This is an automated reply, generated by [FAQtory](https://github.com/willmcgugan/faqtory)

27
.github/workflows/new_issue.yml vendored Normal file
View File

@@ -0,0 +1,27 @@
name: issues
on:
issues:
types: [opened]
jobs:
add-comment:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- uses: actions/checkout@v3
with:
ref: main
- name: Install FAQtory
run: pip install FAQtory
- name: Run Suggest
run: faqtory suggest "${{ github.event.issue.title }}" > suggest.md
- name: Read suggest.md
id: suggest
uses: juliangruber/read-file-action@v1
with:
path: ./suggest.md
- name: Suggest FAQ
uses: peter-evans/create-or-update-comment@a35cf36e5301d70b76f316e867e7788a55a31dae
with:
issue-number: ${{ github.event.issue.number }}
body: ${{ steps.suggest.outputs.content }}

14
FAQ.md Normal file
View File

@@ -0,0 +1,14 @@
# Frequently Asked Questions
- [Does Textual support images?](#does-textual-support-images)
<a name="does-textual-support-images"></a>
## Does Textual support images?
Textual doesn't have built in support for images yet, but it is on the [Roadmap](https://textual.textualize.io/roadmap/).
See also the [rich-pixels](https://github.com/darrenburns/rich-pixels) project for a Rich renderable for images that works with Textual.
<hr>
Generated by [FAQtory](https://github.com/willmcgugan/faqtory)

7
faq.yml Normal file
View File

@@ -0,0 +1,7 @@
# FAQtory settings
faq_url: "https://github.com/textualize/textual/blob/main/FAQ.md" # Replace this with the URL to your FAQ.md!
questions_path: "./questions" # Where questions should be stored
output_path: "./FAQ.md" # Where FAQ.md should be generated
templates_path: ".faq" # Path to templates

7
questions/README.md Normal file
View File

@@ -0,0 +1,7 @@
# Questions
Your questions should go in this directory.
Question files should be named with the extension ".question.md".

View File

@@ -0,0 +1,11 @@
---
title: "Does Textual support images?"
alt_titles:
- "Can Textual display PNG / SVG files?"
- "Render images"
---
Textual doesn't have built in support for images yet, but it is on the [Roadmap](https://textual.textualize.io/roadmap/).
See also the [rich-pixels](https://github.com/darrenburns/rich-pixels) project for a Rich renderable for images that works with Textual.

View File

@@ -18,7 +18,7 @@ DEFAULT_DARK_BACKGROUND = "#121212"
DEFAULT_DARK_SURFACE = "#1e1e1e"
DEFAULT_LIGHT_SURFACE = "#f5f5f5"
DEFAULT_LIGHT_BACKGROUND = "#efefef"
DEFAULT_LIGHT_BACKGROUND = "#e9e9e9"
class ColorSystem: