Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Comment thread
lidavidm marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ site locally:
bundle exec rake
```

To include posts with future dates:

```shell
JEKYLL_FUTURE=1 bundle exec rake
```

## Deployment

### apache/arrow-site
Expand Down
13 changes: 8 additions & 5 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,12 @@ end

desc "Serve site locally"
task :serve => webpacked_js do
sh("jekyll",
"serve",
"--incremental",
"--livereload",
"--host", ENV["HOST"] || "127.0.0.1")
command_line = ["jekyll", "serve"]
command_line << "--incremental"
command_line << "--livereload"
command_line << "--host=#{ENV["HOST"] || "127.0.0.1"}"
command_line << "--future"
sh(*command_line)
end

task :default => :serve
Expand All @@ -57,5 +58,7 @@ task :generate => webpacked_js do
command_line << "--config=_config.yml,#{extra_config}" if extra_config
destination = ENV["JEKYLL_DESTINATION"]
command_line << "--destination=#{destination}" if destination
future = ENV["JEKYLL_FUTURE"]
command_line << "--future" if future
Comment on lines +61 to +62
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can simplify this:

Suggested change
future = ENV["JEKYLL_FUTURE"]
command_line << "--future" if future
command_line << "--future" if ENV["JEKYLL_FUTURE"]

BTW, do we need this? If we need this, how about enable this only for preview?

diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index 9b963f13831..86236479f95 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -64,6 +64,9 @@ jobs:
           export JEKYLL_DESTINATION=../build
           export JEKYLL_ENV=production
           export JEKYLL_EXTRA_CONFIG=_extra_config.yml
+          if [ "${GITHUB_REPOSITORY}" != "apache/arrow-site" ]; then
+            export JEKYLL_FUTURE=1
+          fi
           bundle exec rake generate
       - name: Checkout asf-site
         uses: actions/checkout@v6

sh(*command_line)
end