def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) context['posts'] = state.posts markdown_file = None page = self.request.path.split("/")[2] if page: markdown_file = f"posts/{page}" return create_page_context(context, FILE_PATH, markdown_file)
def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) return create_page_context(context, FILE_PATH)
def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) context['portfolio'] = state.portfolio return create_page_context(context, FILE_PATH)
def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) context['homepage'] = state.homepage context['portfolio'] = state.portfolio[:2] context['posts'] = state.posts return create_page_context(context, FILE_PATH)