qa
This commit is contained in:
parent
3617a09b2e
commit
72e6b66a52
@ -55,6 +55,7 @@ PLUGINS = ["i18n_subsites", "pelican-css", "series", "subcategory", "tag_cloud",
|
||||
ASCIIDOCTOR_CMD = "asciidoctor"
|
||||
ASCIIDOCTOR_EXTRA_OPTIONS = [
|
||||
'--require', 'asciidoctor-diagram',
|
||||
'--require', '{}/themes/pdf/qa.rb'.format(os.getcwd()),
|
||||
'--attribute=imagesdir={}/wiki/images'.format(os.getcwd()),
|
||||
'--attribute=source-highlighter=pygments',
|
||||
'--attribute=pygments-style=manni',
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 7e40890fd4d6140303671e26b89bd18265eff63e
|
||||
Subproject commit 4168da84689e24c9d96ad3f8b979ea79a5b78771
|
60
themes/pdf/qa.rb
Normal file
60
themes/pdf/qa.rb
Normal file
@ -0,0 +1,60 @@
|
||||
require 'asciidoctor/extensions'
|
||||
|
||||
class QuestionBlock < Asciidoctor::Extensions::BlockProcessor
|
||||
use_dsl
|
||||
named :QUESTION
|
||||
on_context :example
|
||||
|
||||
def process parent, reader, attrs
|
||||
attrs['name'] = 'question'
|
||||
attrs['caption'] = 'Question'
|
||||
admon = create_block parent, :admonition, nil, attrs, content_model: :compound
|
||||
parse_content admon, reader
|
||||
admon
|
||||
end
|
||||
end
|
||||
|
||||
class QuestionBlockCss < Asciidoctor::Extensions::DocinfoProcessor
|
||||
use_dsl
|
||||
|
||||
def process doc
|
||||
'<style>
|
||||
.admonitionblock td.icon .icon-question:before{content:"\f128";color:#000}
|
||||
</style>'
|
||||
end
|
||||
end
|
||||
|
||||
Asciidoctor::Extensions.register do
|
||||
block QuestionBlock
|
||||
docinfo_processor QuestionBlockCss
|
||||
end
|
||||
|
||||
class AnswerBlock < Asciidoctor::Extensions::BlockProcessor
|
||||
use_dsl
|
||||
named :ANSWER
|
||||
on_context :example
|
||||
|
||||
def process parent, reader, attrs
|
||||
attrs['name'] = 'answer'
|
||||
attrs['caption'] = 'Answer'
|
||||
admon = create_block parent, :admonition, nil, attrs, content_model: :compound
|
||||
parse_content admon, reader
|
||||
admon
|
||||
end
|
||||
end
|
||||
|
||||
class AnswerBlockCss < Asciidoctor::Extensions::DocinfoProcessor
|
||||
use_dsl
|
||||
|
||||
def process doc
|
||||
'<style>
|
||||
.admonitionblock td.icon .icon-answer:before{content:"\f0eb";color:#000}
|
||||
</style>'
|
||||
end
|
||||
end
|
||||
|
||||
Asciidoctor::Extensions.register do
|
||||
block AnswerBlock
|
||||
docinfo_processor AnswerBlockCss
|
||||
end
|
||||
|
@ -9,3 +9,14 @@ image:
|
||||
font-style: normal
|
||||
caption:
|
||||
font-style: normal
|
||||
admonition:
|
||||
icon:
|
||||
question:
|
||||
name: fa-question
|
||||
stroke_color: 000000
|
||||
size: 24
|
||||
answer:
|
||||
name: fa-lightbulb
|
||||
stroke_color: 000000
|
||||
size: 24
|
||||
|
||||
|
@ -18,40 +18,37 @@ git clone https://git.246060.ru/f1x1t/uncrustify-config ~/.config/uncrustify
|
||||
|
||||
== Полезные заметки и решение проблем
|
||||
|
||||
:question-caption: Q
|
||||
|
||||
[QUESTION]
|
||||
|
||||
====
|
||||
Проект на CMake перестал настраиваться. Сообщения вида:
|
||||
|
||||
----
|
||||
Не удалось разобрать проект CMake: потеряно соединение с сервером CMake.
|
||||
----
|
||||
====
|
||||
|
||||
:reply-caption: О
|
||||
|
||||
[REPLY]
|
||||
|
||||
Решение:
|
||||
|
||||
[ANSWER]
|
||||
====
|
||||
. Закрыть проект в Qt Creator
|
||||
. Удалить файл `CMakeLists.txt.user` и целевой каталог сборки, например `_build`
|
||||
. Открыть проект в Qt Creator
|
||||
====
|
||||
|
||||
//-
|
||||
|
||||
[QUESTION]
|
||||
====
|
||||
* Отсутствует необходимый для сборки пакет. Пример:
|
||||
|
||||
[.text-center]
|
||||
.Отсутствие требуемого пакета
|
||||
image::qtcreator-setup/errors01.png[errors01,pdfwidth=70%,scaledwidth=90%,align="center"]
|
||||
|
||||
* Решение:
|
||||
image::qtcreator-setup/errors01.png[errors01,align="center"]
|
||||
====
|
||||
|
||||
[ANSWER]
|
||||
====
|
||||
. Установить недостающий пакет
|
||||
. Выполнить menu:Сборка[Запустить CMake]
|
||||
|
||||
<<<
|
||||
====
|
||||
|
||||
== Плагины
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user