ulivz / 70-lines-of-vuepress-blog-theme

A VuePress Blog Theme implemented in around 70 lines.
https://70-lines-of-vuepress-blog-theme.ulivz.com/
42 stars 26 forks source link

Setting up the project #6

Open EricTalv opened 4 years ago

EricTalv commented 4 years ago

Hi!

I've been trying to setup the project but so far I've only gotten as far as a 404 with the default layout and everything.

the steps ive taken:

  1. npm install
  2. vuepress build examples
  3. copy the layout files to /examples/.vuepress/theme/layouts
  4. copy _posts to examples

My folder structure looks like this right now:

70-lines...
|-- examples
|   |-- .vuepress
|   |   |-- dist
|   |   `-- theme
|   |       |-- layouts
|   |       |   |-- GlobalLayout.vue
|   |       |   |-- Layout.vue
|   |       |   |-- Post.vue
|   |       |   `-- Tag.vue
|   |       `-- config.js
|   `-- _posts
|-- node_modules
|-- index.js
|-- package.json
|-- package-lock.json
`-- Readme.md

I go to -> /examplesand run vuepress dev to get my 404 page

I am confused as to what purpose some files serve and this all seems very half-assed to me or maybe i'm just missing something.

The confusion is set from firstly config.js this basically wants to require.resolve something out in the root folder id guess the Index.js? why wouldn't you just put the configuration, into the configuration file, not have them separately.

But the main problem i think is is the GlobalLayout.vue, my 404 page shows neatly with the general styling and everything, but since there is no component folder, where should this component be coming from? how does this work?