Git Product home page Git Product logo

Comments (12)

scottbedard avatar scottbedard commented on July 19, 2024 1

Your crossed out text is correct. The theme.htm file is like your layout, and the .vue files are what hold your actual content.

Sorry to hear that the learning curve was too high for you, I see how it can be a lot to take in at once. Hopefully soon I'll make some screencasts to go with this theme.

from vuetober.

scottbedard avatar scottbedard commented on July 19, 2024 1

Yes and no. You can't prevent the webpack assets directory from being cleared, because it needs to kill off old assets. But you can change the directory that webpack is using by modifying these lines

https://github.com/scottbedard/oc-vuetober-theme/blob/master/template/build/webpack.base.conf.js#L15-L16

If you just append /spa or whatever onto the end of that, it should create a nice isolated area for your webpack assets to live.

from vuetober.

scottbedard avatar scottbedard commented on July 19, 2024

Yes, this should be possible by modifying the theme.htm file. By default, it is set up to catch all routes, but you could change it to read /dashboard/:all?* to catch only your dashboard urls.

https://github.com/scottbedard/oc-vuetober-theme/blob/master/template/src/theme.htm#L2

Outside of that, just use normal October layouts, pages, partials, etc...

from vuetober.

VitruxPT avatar VitruxPT commented on July 19, 2024

To do that i should also copy the pages, layouts, partials and assets folders from our main theme to this one in the folder /themes/SPA/src/ right (or the other way around)?

And, i will still be able to manage the pages from the CMS right?

from vuetober.

scottbedard avatar scottbedard commented on July 19, 2024

Either or, it doesn't really matter. I would recommend doing it the way you mentioned though so you don't have to mess with any of the build configuration.

And yes, for any of the non-spa pages, you'll be able to edit them the same way you normally would.

from vuetober.

VitruxPT avatar VitruxPT commented on July 19, 2024

I'm just having a problem right now.
I changed the root.vue file and the pages in the pages folder in /themes/my-theme/src but it is still showing me the intro page when i visit the url i set.

Are there any other files i need to remove/edit that i can't find?

from vuetober.

scottbedard avatar scottbedard commented on July 19, 2024

You shouldn't have to change the root.vue file to achieve what you're after. Simply changing the url property of /src/theme.htm should do it.

Once this is done, you'll need to rebuild your theme with the following command.

$ npm run build

from vuetober.

VitruxPT avatar VitruxPT commented on July 19, 2024

Oh ok, i got it to work now, thanks. (I'm still new to this suff)

Just to make sure, now to work on my app i just need to work on the pages/theme.htm file right? (I can edit it in the october CMS)

Nevermind, i've been reading how vue-loader works and i think i got it. The layout of my app can be in the pages/theme.htm file and the app it self should be in pages in /themes/my-theme/src/pages and to make everything work i just need to setup the routes.js right?

I have to give up on this... It's too hard for an 18 year old without a teacher :P Thanks anyway for the help

from vuetober.

VitruxPT avatar VitruxPT commented on July 19, 2024

Quick question that i couldn't quite figure out on my own before:

Is there a way to prevent the folder /themes/my-theme/assets from being cleared when we run the command $ npm run build since the other pages that are not from vue use that folder to retrieve other assets besides the ones that vue uses with webpack?

from vuetober.

VitruxPT avatar VitruxPT commented on July 19, 2024

I did that and ran $ npm run build he still cleared the assets folder and created a folder named "pages" with the theme.htm inside

from vuetober.

scottbedard avatar scottbedard commented on July 19, 2024

Creating the /pages/theme.htm is required. You can name that file anything you want, but your SPA still needs a single entry point, which is what that file provides.
https://github.com/scottbedard/oc-vuetober-theme/blob/master/template/build/webpack.prod.conf.js#L56

As for clearing out the /assets folder, you changed the output directory and it's still clearing it? Something might be messed up in your build config, because it's set up to only clear the directly it's outputting to.

from vuetober.

VitruxPT avatar VitruxPT commented on July 19, 2024

Changing the path doesn't prevent the folder assets from being deleted. I even tried renaming the folder in the config to assets_spa an create an empty folder names assets but it still deleted the folder assets and created another folder named assets_spa

from vuetober.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.