Skip to content

Commit

Permalink
Merge pull request #26 from eqs/feature/html
Browse files Browse the repository at this point in the history
add html
  • Loading branch information
eqs authored Apr 24, 2021
2 parents b056360 + c730a81 commit 4f166ef
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions yacho/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ def __init__(self, path: str, sketchbook_cfg: SketchbookConfig):
else:
self.cfg = None

if self.is_draft():
self.cfg.cover = None
self.cfg.images = None
return

# 設定ファイルに画像の記載が無い
# & カバー画像,画像リストのフォルダが存在するならフォルダからの
# デプロイにする
Expand Down
2 changes: 1 addition & 1 deletion yacho/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class SketchConfig:

video: VideoConfig = field(default_factory=lambda: VideoConfig())
public: List[str] = field(default_factory=lambda: [
'*.pde', 'sketch.js', '*.py'
'*.pde', 'index.html', 'sketch.js', '*.py'
])


Expand Down
2 changes: 1 addition & 1 deletion yacho/templates/sketch_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ <h1 class="entry-title">{{ page_title }}</h1>
</div>
{% for code_info in code_infos %}
<h2 class="code-name">{{ code_info.filename }}</h2>
<pre class="code rounded-lg mx-auto d-block"><code class="{{ code_info.lang }}">{{ code_info.code }}</code></pre>
<pre class="code rounded-lg mx-auto d-block"><code class="{{ code_info.lang }}">{{ code_info.code | e }}</code></pre>
{% endfor %}
</main>
{% include "footer.html" %}

0 comments on commit 4f166ef

Please sign in to comment.