postnhost 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/README.md +11 -9
  4. data/Rakefile +28 -0
  5. data/app/assets/builds/postnhost/application.css +1 -1
  6. data/app/assets/stylesheets/application.tailwind.css +5 -1
  7. data/app/helpers/postnhost/application_helper.rb +0 -11
  8. data/app/views/layouts/postnhost/application.html.erb +2 -2
  9. data/app/views/layouts/postnhost/articles.html.erb +3 -3
  10. data/app/views/layouts/postnhost/product.html.erb +3 -3
  11. data/app/views/layouts/postnhost/public/templates/default.html.erb +2 -2
  12. data/app/views/layouts/postnhost/public/templates/swiss-editorial.html.erb +2 -2
  13. data/app/views/layouts/postnhost/public/templates/workspace-journal.html.erb +2 -2
  14. data/app/views/postnhost/onboarding/_post_install_checklist.html.erb +8 -8
  15. data/app/views/postnhost/pages/index.html.erb +1 -1
  16. data/app/views/postnhost/templates/edit.html.erb +1 -1
  17. data/lib/generators/postnhost/install/install_generator.rb +11 -12
  18. data/lib/generators/postnhost/locale/locale_generator.rb +1 -1
  19. data/lib/generators/postnhost/static_pages/static_pages_generator.rb +1 -1
  20. data/lib/generators/postnhost/tailwindcss/install_generator.rb +28 -25
  21. data/lib/generators/postnhost/tailwindcss/templates/host.tailwind.css +0 -3
  22. data/lib/generators/postnhost/user/user_generator.rb +1 -1
  23. data/lib/generators/postnhost/views/views_generator.rb +5 -7
  24. data/lib/postnhost/css_build.rb +68 -0
  25. data/lib/postnhost/css_scope.rb +77 -0
  26. data/lib/postnhost/sample_data.rb +1 -1
  27. data/lib/postnhost/tailwind_compiler.rb +75 -0
  28. data/lib/postnhost/tailwind_input.rb +32 -0
  29. data/lib/postnhost/version.rb +1 -1
  30. data/lib/tasks/postnhost_tasks.rake +40 -65
  31. metadata +19 -2
  32. data/lib/generators/postnhost/tailwindcss/templates/tailwind.config.js +0 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f12e20da143bbf828f95af42951dcfc1bbce4e9152dd47630ea8a668b73b8a6b
4
- data.tar.gz: 8ae19423f07e68ec8fef6ba7a4014751b25b658e218a939bf802157247b96c05
3
+ metadata.gz: 1558c66e1ac90ab08507a78ffea0bac3294003f1ac89107090a2e0dd27e234d8
4
+ data.tar.gz: 95d7eaa5879b8b964c21a50b73ee87a941b577341b6a0a55f824fb7bdbedc1eb
5
5
  SHA512:
6
- metadata.gz: c40643ed0fd03ec5bc35a717c08a50a7942f9b64df50e397ab4de7217a46090c60d3ae2f25684fb8c5629bb264a1fb4ca87ab6119a819512db90eb84d0f6b2ff
7
- data.tar.gz: af8cd76fde91eaad7ac5c175721ca1b7b5a26a80caad882fcfe404ce5bd486252a57dd3681ed108fa51d90d8c500c969e05863b234c4034804502937971186db
6
+ metadata.gz: 54a365175843db9416fa0be1725e0acd6cc86574b81f8b8e6dccec2c4dc029161998bbd9901d1ed0c62768f30a46234b622b533395211f63d23592cd4910267c
7
+ data.tar.gz: 759fec551c44bd9060c87d183468aed04875881733e163262bf01100562837f2b6c1999379a80204ce1e5b603d26a0f1e36f74510173349d9a0596ffed0e8cfb
data/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to PostnHost are documented in this file.
4
4
 
5
+ ## [0.1.1] - 2026-08-31
6
+
7
+ ### Fixed
8
+
9
+ - Scoped packaged and host-generated CSS to PostnHost layouts and replaced competing stylesheets with one combined host build that transparently shadows the packaged logical asset.
10
+ - Corrected installer, template customization, Tailwind setup, and production checklist instructions.
11
+
5
12
  ## [0.1.0] - 2026-08-29
6
13
 
7
14
  First open source release of PostnHost.
@@ -22,4 +29,5 @@ First open source release of PostnHost.
22
29
 
23
30
  Authored by Kirill Shevchenko (Ruby/Rails engineering) and Maxim Sova (technical SEO expertise).
24
31
 
32
+ [0.1.1]: https://github.com/postnhost/postnhost/compare/v0.1.0...v0.1.1
25
33
  [0.1.0]: https://github.com/postnhost/postnhost/releases/tag/v0.1.0
data/README.md CHANGED
@@ -43,7 +43,7 @@ Mount this engine into an existing Rails app, or use the <a href="https://github
43
43
  - [Host app i18n](#host-app-i18n-optional)
44
44
  - [Static pages](#static-pages-terms-privacy-etc)
45
45
  - [Routes](#routes)
46
- - [Manual configuration](#manual-configuration)
46
+ - [Production checklist](#production-checklist)
47
47
  - [Development](#development)
48
48
  - [License](#license)
49
49
 
@@ -194,7 +194,6 @@ bin/dev
194
194
 
195
195
  This generator creates:
196
196
 
197
- - `postnhost.tailwind.config.js`
198
197
  - `app/assets/stylesheets/postnhost/host.tailwind.css`
199
198
  - `Procfile.dev` watcher entry:
200
199
  - `postnhost_css: bundle exec rails postnhost:tailwindcss:watch`
@@ -202,8 +201,9 @@ This generator creates:
202
201
  - `postnhost:tailwindcss`
203
202
  - `postnhost:tailwindcss:watch`
204
203
 
205
- When host-tailwind mode files are present, PostnHost layouts automatically include `postnhost/host.css` after `postnhost/application.css`.
206
- You do not need to edit layout tags.
204
+ Host-tailwind mode builds one combined stylesheet from the engine and host view sources at `app/assets/builds/postnhost/application.css`. That host-owned file transparently overrides the packaged asset with the same logical path; the engine always requests `postnhost/application`. This avoids competing Tailwind builds and lets copied views use ordinary classes such as `bg-red-500` or `md:grid`.
205
+
206
+ If the host build is absent, Rails uses the packaged engine asset automatically. Both packaged and combined stylesheets are limited to PostnHost layouts through the `data-postnhost` root attribute. You do not need to edit layout tags or prefix Tailwind classes. Host customization requires Tailwind CSS 4.
207
207
 
208
208
  ### Robots.txt sitemap URL (required)
209
209
 
@@ -319,13 +319,15 @@ mount Postnhost::Engine, at: "/blog"
319
319
  - `GET /sitemap.xml` - XML sitemap
320
320
  - `GET /sitemap.xsl` - Sitemap stylesheet
321
321
 
322
- ## Manual configuration
322
+ ## Production checklist
323
323
 
324
- Some parts must still be configured manually in code:
324
+ Review these host-application settings before deployment:
325
325
 
326
- - Favicons
327
- - Robots.txt
328
- - Error pages 404/500 etc.
326
+ - Replace the host app’s favicon and related icon files if needed.
327
+ - Update `public/robots.txt` so its sitemap URL matches the production domain and engine mount path.
328
+ - Review the host app’s static `public/404.html` and `public/500.html` pages.
329
+ - Configure the generated CarrierWave initializer for S3-compatible production storage, or replace it with another storage configuration.
330
+ - If you customize the public templates, copy the required views and enable host Tailwind support when your changes introduce new utility classes.
329
331
 
330
332
  ## Development
331
333
 
data/Rakefile CHANGED
@@ -2,6 +2,34 @@ require "bundler/setup"
2
2
  require "fileutils"
3
3
 
4
4
  require "bundler/gem_tasks"
5
+ require_relative "lib/postnhost/css_build"
6
+
7
+ css_build = lambda do |watch:|
8
+ root = __dir__
9
+ unscoped_path = File.join(root, "app/assets/builds/postnhost/application.unscoped.css")
10
+ output_path = File.join(root, "app/assets/builds/postnhost/application.css")
11
+ command = [
12
+ File.join(root, "node_modules/.bin/tailwindcss"),
13
+ "-i", File.join(root, "app/assets/stylesheets/application.tailwind.css"),
14
+ "-o", unscoped_path,
15
+ "--minify"
16
+ ]
17
+ command << "--watch" if watch
18
+
19
+ Postnhost::CssBuild.run(command:, unscoped_path:, output_path:, watch:)
20
+ end
21
+
22
+ namespace :css do
23
+ desc "Build the engine stylesheet"
24
+ task build: :environment do
25
+ css_build.call(watch: false)
26
+ end
27
+
28
+ desc "Build the engine stylesheet and watch for changes"
29
+ task watch: :environment do
30
+ css_build.call(watch: true)
31
+ end
32
+ end
5
33
 
6
34
  # Load dummy app so the Rails `environment` task exists (required by prepare_test_db).
7
35
  require_relative "spec/dummy/config/application"