Skip to content

What is the simplest way to add a custom command to my site? #655

Answered by davidstosik
davidstosik asked this question in Q&A
Discussion options

You must be logged in to vote

Here's the minimum amount of code I found would work to add a post command to my Bridgetown project:

diff --git c/Gemfile i/Gemfile
index baffc2c..2a83ea2 100644
--- c/Gemfile
+++ i/Gemfile
@@ -31,3 +31,7 @@ gem "bridgetown", "~> 1.1.0"
 # Puma is a Rack-compatible server used by Bridgetown
 # (you can optionally limit this to the "development" group)
 gem "puma", "~> 5.6"
+
+group :bridgetown_plugins do
+  gem "create_post", path: "./create_post"
+end
diff --git c/Gemfile.lock i/Gemfile.lock
index 967c373..836c114 100644
--- c/Gemfile.lock
+++ i/Gemfile.lock
@@ -1,3 +1,8 @@
+PATH
+  remote: create_post
+  specs:
+    create_post (0.1.0)
+
 GEM
   remote: https://rubygems.org/
   specs:
@…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by davidstosik
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant