Skip to content

Commit 13c2776

Browse files
authored
Tools enhancements (#231)
2 parents 55b5a97 + c01409b commit 13c2776

File tree

3 files changed

+14
-10
lines changed

3 files changed

+14
-10
lines changed

_plugins/generate_tooltips.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,14 +392,15 @@ def gen_page_link_data(links_dir, link_files_pattern)
392392

393393
def generate_tooltips(page, write_back)
394394
puts "collection: " + (page.respond_to?(:collection) ? page.collection.label : "") + ", ndx: #{page.data["nav_ndx"]}, relative_path: #{page.relative_path}"
395-
puts "------------------------------------"
396395

397396
process_page(page)
398397
#puts "\n\n\n" + page.content
399398

400399
if write_back
401400
write_to_file(page.path, page.content)
402401
end
402+
403+
puts "-----------"
403404
end # def generate_tooltips
404405

405406
end # class << self

_tools/navgen

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ add_warning_header ()
183183

184184
gen_navigation()
185185
{
186+
echo "Generating navigation data..."
186187
> "${OUTPUT_FILE}"
187188
add_warning_header "${OUTPUT_FILE}"
188189

@@ -200,20 +201,22 @@ gen_navigation()
200201

201202
shift
202203
done
203-
echo "YAML navigation structure is generated and saved to $OUTPUT_FILE"
204+
echo -e "YAML navigation structure is generated and saved to $OUTPUT_FILE\n\n\n"
204205
}
205206

206207
gen_links()
207208
{
209+
echo "Generating Jekyll page links..."
208210
rm -Rf _data/links
209211
JEKYLL_BUILD_LINKS='yes' JEKYLL_BUILD_TOOLTIPS='no' bundle exec jekyll build
210-
echo "Jekyll page links are generated and saved to _data/links"
212+
echo -e "Jekyll page links are generated and saved to _data/links\n\n\n"
211213
}
212214

213215
gen_tooltips()
214216
{
217+
echo "Generating Jekyll tooltips..."
215218
JEKYLL_BUILD_LINKS='no' JEKYLL_BUILD_TOOLTIPS='yes' bundle exec jekyll build
216-
echo "Jekyll tooltips are generated and saved"
219+
echo -e "Jekyll tooltips are generated and saved\n\n\n"
217220
}
218221

219222
process_params()

_tools/serve

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ stop_dir_watcher() {
2626

2727
# Function to start to serve in the background
2828
start_process() {
29+
echo ""
30+
2931
# FIXME:This would report al the file changes, must parse and filter out waht we are really interested in
3032
#start_dir_watcher
3133

32-
echo -e "\nStarting to serve...\n"
33-
3434
reset_watcher
3535

3636
rm -Rf _site
@@ -42,13 +42,13 @@ start_process() {
4242
# as the output of it must already be presented to be able to serve a valid content
4343
#
4444
if [ "${JEKYLL_BUILD_LINKS}" == "yes" ]; then
45-
echo -e "Generating navigation data..."
46-
./_tools/navgen ./doc ./_data/navigation.yml
45+
# tooltips will be built at jekyll serve startup automatically if enabled, do not do it twice
46+
JEKYLL_BUILD_TOOLTIPS='no' ./_tools/navgen ./doc ./_data/navigation.yml
4747
fi
48+
49+
echo -e "\nStarting to serve...\n"
4850
JEKYLL_BUILD_LINKS='no' bundle exec jekyll serve ${ALL_PARAMS} &
4951
PROC_PID=$!
50-
51-
echo -e "\n\n\n"
5252
}
5353

5454
stop_process() {

0 commit comments

Comments
 (0)