Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

papercuts #7

Open
9 tasks
apaleslimghost opened this issue Mar 22, 2020 · 2 comments
Open
9 tasks

papercuts #7

apaleslimghost opened this issue Mar 22, 2020 · 2 comments

Comments

@apaleslimghost
Copy link
Owner

apaleslimghost commented Mar 22, 2020

  • stops watching after the second compile (???)
  • bad console output esp with errors
  • double render dangerouslySetInnerHTML ugh i hate it who needs helmet
  • layouts, idk if i like them
  • layouts don't work from mdx?
  • need some concept of page type/template for things like common slugs & layouts?
  • doesn't resolve .jsx files
  • assets r clunky
  • opens the browser every single time ugh
@apaleslimghost
Copy link
Owner Author

idea (not sure if i like), loeb.config.js:

module.exports = {
	'./pages': true,
	'./posts': {
		layout: require('./layouts/post'),
		slug: ({ date, title }) => `/${date.getFullYear()}/${date.getMonth() + 1}/${date.getDate()}/${title.replace(/\W+/g, '-').toLowerCase()}`
	}
}

@apaleslimghost
Copy link
Owner Author

or, make it more webpacky:

module.exports = [
	require.context('./pages'),
	[require.context('./posts'), {
		layout: require('./layouts/post'),
		slug: ({ date, title }) => `/${date.getFullYear()}/${date.getMonth() + 1}/${date.getDate()}/${title.replace(/\W+/g, '-').toLowerCase()}`
	}]
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant