diff --git a/app/services/github.rb b/app/services/github.rb index 908094fb8130308e31c50b67d964f85fa6532c76..c5f183ba35ba0c07ff6275fa2e9d5cece7e7ad47 100644 --- a/app/services/github.rb +++ b/app/services/github.rb @@ -19,17 +19,27 @@ class Github end def publish_article(article) + data = ApplicationController.render( + template: 'admin/research/journal/articles/jekyll', + layout: false, + assigns: { article: article } + ) publish local_directory: "tmp/articles", local_file: "#{article.id}.md", - data: "---\ntitle: #{ article.title }\n\n---\n#{ article.text }", + data: data, remote_file: "_articles/#{article.id}.md", commit_message: "Save article #{ article.title }" end def publish_volume(volume) + data = ApplicationController.render( + template: 'admin/research/journal/volumes/jekyll', + layout: false, + assigns: { volume: volume } + ) publish local_directory: "tmp/volumes", local_file: "#{volume.id}.md", - data: "---\ntitle: #{ volume.title }\nnumber: #{ volume.number }\n---", + data: data, remote_file: "_volumes/#{volume.id}.md", commit_message: "Save volume #{ volume.title }" end diff --git a/app/views/admin/research/journal/articles/jekyll.html.erb b/app/views/admin/research/journal/articles/jekyll.html.erb new file mode 100644 index 0000000000000000000000000000000000000000..eddbd1ef5e4f6fe07f68b4113b7ad410e071df24 --- /dev/null +++ b/app/views/admin/research/journal/articles/jekyll.html.erb @@ -0,0 +1,5 @@ +--- +title: <%= @article.title %> +volume: <%= @article.volume.id %> +--- +<%= simple_format @article.text %> diff --git a/app/views/admin/research/journal/volumes/jekyll.html.erb b/app/views/admin/research/journal/volumes/jekyll.html.erb new file mode 100644 index 0000000000000000000000000000000000000000..69fc89713a47dec0640447a2517879de629bde67 --- /dev/null +++ b/app/views/admin/research/journal/volumes/jekyll.html.erb @@ -0,0 +1,25 @@ +--- +title: <%= @volume.title %> +number: <%= @volume.number %> +issn: 1473-2866 +tags: + - Andy Stirling + - anti-imperialism + - de colonial degrowth + - degrowth + - economic growth + - ideology of growth + - pluriverse + - post-growth + - Saurabh Arora + - The Political Economy of Degrowth +lang: Français +date: 2021-09-01 17:53 +image: /assets/img/volume-1.png +articles: +<% @volume.articles.each do |article| %> + - title: "<%= article.title %>" + id: "<%= article.id %>" +<% end %> +--- +The internal dynamics of political parties were a central concern for the founders of both organization theory and political sociology, yet contemporary research tends to neglect the importance and value of studying these electoral machines from a truly organizational point of view. The present issue seeks to remedy this shortcoming by allowing curious and creative scholars to reimagine what it might mean for organization scholars and activists alike to engage actively with political parties. While some contributions reflect on the idiosyncrasies of political parties in general, most articles and notes cultivate a so-called immersive approach to the study of party organization, in which the researcher ventures beyond the glossy surface of party propaganda in order to experience and analyze party organizing in practice rather than on paper. These ambitions yield fascinating accounts of parties such as Podemos, En Marche, DiEM25, Movimento 5 Stelle, the British Labour Party, as well as the German and Icelandic Pirate Party.