Skip to content

Commit 789b3ed

Browse files
committed
fix publish: right subdir and check if adoc db exists
1 parent 48e9636 commit 789b3ed

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

_plugins/asciidoctor-extensions.rb

+3-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,9 @@ def remove_pixels basename_noext
189189
class ExtractHeaderIds < Asciidoctor::Extensions::TreeProcessor
190190
def initialize(*args, &block)
191191
super(*args, &block)
192-
@db = SQLite3::Database.new File.join($PROJECT_ROOT, 'out', 'db.sqlite')
192+
db_dir = File.join($PROJECT_ROOT, 'out')
193+
FileUtils.mkdir_p db_dir
194+
@db = SQLite3::Database.new File.join(db_dir, 'db.sqlite')
193195
@table_name = 'sections'
194196
# Check if table exists and create it if it doesn't.
195197
if @db.execute("SELECT name FROM sqlite_master WHERE type='table' AND name='#{@table_name}';").empty?

publish

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# https://www.cirosantilli.com#how-to-develop-ciro-santillis-website
33
set -eux
44
rootdir="$(pwd)"
5-
outdir="${rootdir}/publish"
5+
outdir="${rootdir}/out/publish"
66
mkdir -p "$outdir"
77
# We maintain a safety clone in this directory,
88
# to avoid leaking .gitignored files through Jekyll.

0 commit comments

Comments
 (0)